Win a copy of Kotlin in Action this week in the Kotlin forum!
  • 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
I have a question which I'd appreciate any advice.
In a EJB, I have a method
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.
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.

Han Ming
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!