• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Who close the connections

 
Chen ZhiJiang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a session bean passivated, who close all the connections, Session Bean-Self or Container?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The external resources must be explicitly closed by the developer in the ejbPassivate() lifecycle method which is called whenever an ejb is passivated. The resources can then be reacquired in ejbActivate() which is called whenever an ejb is re-activated.
BTW, only Stateful Session Beans and Entity Beans can be passivated by the EJB Container.
 
zhenlong guan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does your connections refer to?
when session bean passivated,network connection may not be closed.The container implementation decide that
Originally posted by Chen ZhiJiang:
When a session bean passivated, who close all the connections, Session Bean-Self or Container?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic