Hi all,
I am writing an EJB with BMP. I would like to know if I have to call any method in the UserTransaction object (that is used in the EJB) in the ejbPassivate/Activate methods as we have to release all the resources.
I am not very sure if UserTransaction is a resource.
Thanks,
Srinivas.J
-
UserTransaction in EJB (3 messages)
- Posted by: Srinivas Janakiraman
- Posted on: February 23 2001 11:49 EST
Threaded Messages (3)
- UserTransaction in EJB by Ramasubramanian Balasubramanian on February 23 2001 13:48 EST
- UserTransaction in EJB by Srinivas Janakiraman on February 23 2001 15:01 EST
- UserTransaction in EJB by Eric Ma on February 23 2001 04:37 EST
- UserTransaction in EJB by Srinivas Janakiraman on February 23 2001 15:01 EST
-
UserTransaction in EJB[ Go to top ]
- Posted by: Ramasubramanian Balasubramanian
- Posted on: February 23 2001 13:48 EST
- in response to Srinivas Janakiraman
Hi
If you want to write beanmanaged transaction then you have to call methods on UserTransaction object.
bye
Rama -
UserTransaction in EJB[ Go to top ]
- Posted by: Srinivas Janakiraman
- Posted on: February 23 2001 15:01 EST
- in response to Ramasubramanian Balasubramanian
Hi,
I have used the begin, commit, rollback methods of the transaction.
In ejbactivate/passivate methods we have to release system resources like connections, files etcs and get back the resources when activated.
Should I release & restore UserTransaction also in ejbactivate/passivate?
-
UserTransaction in EJB[ Go to top ]
- Posted by: Eric Ma
- Posted on: February 23 2001 16:37 EST
- in response to Srinivas Janakiraman
You can only use BMT with session beans, not entity beans.
ejbActivate and ejbPassivate are not called by the container on stateless beans, only with stateful beans.
You should definitely avoid doing TX control stuff in the ejbActivate and ejbPassivate methods. That is poor design!