-
1. Re: De-Allocating Connections
davidjencks May 17, 2002 11:37 PM (in response to hamish)Actually you will only call cm.allocateConnection if you are the connection factory (or the person writing the connection factory). A client will never call this method: they will use a connection factory
cf.getConnection() or something equivalent.
All you can do is conn.close(). If you aren't using local tx, this will definitely put the connection back in the pool. If you are using local tx, it will put the connection in the pool once the tx (if any) is over.
The jboss 3 rc1/2 connection manager does a lot of work so even if you hold a connection over a method boundary it is returned to the pool if possible, and your connection handle reconnected when you get back to the same object. I can't recommend useing this however, I think explictly acquiring and closing your connection handles in the smallest possible scope is the best idea. -
2. Re: De-Allocating Connections
hamish May 19, 2002 1:58 PM (in response to hamish)Will follow instructions...
I was looking for the jar containing PoolEventListener in RC2 and could not find anything. I copied jboss-pool.jar from RC1.
Is this the latest version? -
3. Re: De-Allocating Connections
davidjencks May 19, 2002 9:21 PM (in response to hamish)NOOOOOOO!!!!!!
rc2 includes a complete reimplementation of the jca framework. I did this because I couldn't fix the problems and limitations of the earlier implementation. Please don't bring back my nightmares!
What are you trying to do that you are looking at these internals? -
4. Re: De-Allocating Connections
hamish May 20, 2002 8:39 AM (in response to hamish)Oops, spotted the mistake. I was using the example from RC1 which used PoolEvent.
The new example seems more straight forward.
thank you