Ivan Pazmino [http://community.jboss.org/people/iapazmino] created the 
discussion

"Stateless EJB lifecycle"

To view the discussion, visit: http://community.jboss.org/message/569354#569354

--------------------------------------------------------------
I have a stateless ejb3 component that's serving to business methods an  insert 
to the database and a query to the data base. In a @postconstruct  method I get 
a connection from an injected datasource, and, in a  @predestroy method i close 
the connection and null the datasource  reference.
 
 In a client I get a reference to the stateless component injected. Then,  in 
different times, I call one of the method business and then the  other. Always 
the that is called first performs its task and finishes  successfully. But the 
second method fails complaining the connection is  not associated with a 
managed connection.
 
 Shouldn't the connection be alive as long as the slsb has not been destroyed?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/569354#569354]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to