Help : Why the difference in behaviour for connection handling
posted 14 years ago
Hi, I have a question which I'd appreciate any advice. In a EJB, I have a method e.g. public void ejbMethod() and a ServiceLocator that return a DB connection to me using ServiceLocator.getConnection(). In the ejbMethod, I use an action object with the connection to access databse, but the connection is not release if I handle it in the action instead of the ejbMethod. e.g. If I do the following in JBoss
What is the reason that in the 2nd snippet, the connection is not released? Any advice is greatly appreciated. Thanks.