[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Session execution and thread pooling
timfox
do-not-reply at jboss.com
Sat Jul 29 07:46:32 EDT 2006
Messages need to be delivered to the message listeners of a session in a serial order.
Currently we are implementing this by the session maintaining a EDU.oswego.cs.dl.util.QueuedExecutor which queues up deliveries for listeners in the session.
The QueuedExecutor maintains it's own thread which excecutes Runnables from the queue, one by one.
I would like to avoid maintaining a thread per session, and be able to execute the Runnables using a global pool, but still maintaining serial order on a per session basis.
This could be done by maintaining a queue per session, but actually executing the Runnables on a thread from this global pool.
I'd like to avoid writing this class myself, but I can't see how I can use the Doug Lea concurrent classes to do this.
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961681#3961681
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961681
More information about the jboss-dev-forums
mailing list