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#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...