[jboss-dev-forums] [Design of JBoss ESB] - Re: JmsConnectionPool: Allowing control over the number of S
tfennelly
do-not-reply at jboss.com
Tue May 12 06:47:32 EDT 2009
OK... I'm going with option #1 for now. I'm happy enough with that too.
So the current JmsConnectionPool maintains a relationship between a single connection and multiple sessions. So (termed loosely), what I think we need is a pool of JmsConnectionPools (as it's currently badly called :) ). OK... we can't do it exactly like that, so what I was thinking was to push the connection:sessions management code down into a new class called "JmsSessionPool".
Each JmsSessionPool will be responsible for maintaining the relationship between a single connection and its set of sessions (just like JmsConnectionPool is doing today). It would not be responsible for creating the connection (unlike todays JmsConnectionPool), but would be responsible for creating the sessions off a connection, cleaning them up the sessions etc.
Then, the roll of the JmsConnectionPool would change slightly in that it's now responsible for the management of a pool of JmsSessionPools. It would be responsible for creating the Connection instances and the JmsSessionPool associated with each instance.
When asked for a session, JmsConnectionPool would need to locate a JmsSessionPool that has a free session. If non are available, it will need to have the logic that decides whether or not a new JmsSessionPool needs to be created, or otherwise go into that "pool empty" loop.
Am I making sense?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230407#4230407
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230407
More information about the jboss-dev-forums
mailing list