[jboss-user] [Beginners Corner] - Re: CachedConnectionManager is closing connection for me - w

weston.price@jboss.com do-not-reply at jboss.com
Sun Mar 4 20:36:24 EST 2007


You should not attempt to cache connections. The typical usage pattern is
acquire the connection, use the connection, close the connection. JBossJCA 

1) Acquire the connection
2) Use the connection
3) Close the connection

JBossJCA is telling you two thing with the errror message

1) You are not correctly closing your JDBC connections as a result, JBossJCA is having to close them for you. 

2)You are attempting to reuse a connection handle that has already been closed (by JBossJCA). 

Review your code and make sure it conforms to the above pattern. Note, there is nothing wrong with caching a DataSource as this is just a simple connection factory. However, the connection should be released (closed) after use. 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024958#4024958

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024958



More information about the jboss-user mailing list