-
1. Re: Close EJB Connections
jonlee Oct 9, 2003 7:17 PM (in response to judybramlette)For container managed persistence (CMP), the entity beans will manage the connections themselves (usually unless someone has put explicit connection code in the EJBs). Any stateless and stateful session beans that obtain connections from the connection pool themselves will need to close them as well. So you would be looking for code that explicitly performed a myConnection = pool.getConnection(...);
However, JBoss 3.2.x will usually put warnings in the server.log about connections it had to clean up itself. So if you are not getting messages "clean up your own connections" or something like that, you are probably fine. For your own peace of mind, you can of course inspect the code for occurrences of the above and a corresponding myConnection.close(); This requires an understanding of EJBs as there are rules about where the close() should appear.
JBoss will not protect you (nor will any other application server) if you connect directly to the database, not through a connection pool.
Hope that helps. -
2. Re: Close EJB Connections
judybramlette Oct 11, 2003 3:57 PM (in response to judybramlette)The numerous messages we were getting is what caused me to post the question. Your reply helped. We were able to find several places where they were not being closed. Thanks.