sandrotosi
04-03-2007, 07:35
Hi All,
i'm trying to design a solution to let only a single instance of service be running at a given time, let other service execution request be in wait. i mean, a monitor...
I've identified a couple of solution:
1. the "dirty&ugly" one
write a wrapper java flow with a syncronized { ... } block where inside it I'll call the service I need to serialize execution
2. using docs & triggers
a more wM-ish way would be to define a service to publish locally a document that a trigger elaborates in a sequential fashion invoking the single-running service.
I know, that if I'm going to ask you what's better, you'd say the 2nd, but I'd like to here from you some pros&cons on them.
Thanks in advance,
Sandro
i'm trying to design a solution to let only a single instance of service be running at a given time, let other service execution request be in wait. i mean, a monitor...
I've identified a couple of solution:
1. the "dirty&ugly" one
write a wrapper java flow with a syncronized { ... } block where inside it I'll call the service I need to serialize execution
2. using docs & triggers
a more wM-ish way would be to define a service to publish locally a document that a trigger elaborates in a sequential fashion invoking the single-running service.
I know, that if I'm going to ask you what's better, you'd say the 2nd, but I'd like to here from you some pros&cons on them.
Thanks in advance,
Sandro