Hi guys,

I wrote a service engine that works much the same way as servicemix-eip's
split-aggregator but it contains some other functionality that's specific to
our environment for e.g.:
- aggregation is created (per custom generated session ID) when a "start
aggregation" arrives & aggregates when a "stop aggregation" message arrives
- we persist our aggregations in various persistence stores (memory, jms,
database) depending on the system involved
- etc

An example usage would be:
1. "start aggregation" message with session ID 1 arrives on input endpoint,
aggregation is created
2. "content" for session ID 1 arrives on input endpoint, is added to
previous aggregation
3. "content" for session ID 1 arrives on input endpoint, is added to
previous aggregation
4. "content" for session ID 1 arrives on input endpoint, is added to
previous aggregation
5. "stop aggregation" message for session ID 1 arrives on input endpoint,
aggregation finishes and result is put on output endpoint

I just pumped 2000 messages through to my input endpoint and it looks like
multiple instances of this service engine/assembly is launched for the input
messages (like some sort of thread pooling). The messages are then being
processed not in the order that I sent them from my test class, causing
exceptions. This happens because for example a "content" messages gets
processed before its "start aggregation" message got processed thus throwing
my SessionNotFound exception because the session has not been created yet...

Do any of you know how I can make this service engine/unit to be a Singleton
/ only 1 thread run at a time, thus causing my messages to be processed in
the order that they arrive on my input endpoint? Can you just configure this
in one of the XML configuration files like you can in Spring?

(I'm running this in FUSE version 1.2.1)

Please help!

Many thanks!
Anthony
-- 
View this message in context: 
http://www.nabble.com/Singleton-Service-Endpoint--tf2965466s12049.html#a8296840
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Reply via email to