• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help : Why the difference in behaviour for connection handling  RSS feed

 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Han Ming
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!