File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes transaction context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "transaction context" Watch "transaction context" New topic

transaction context

Carlos Llona

Joined: Apr 09, 2004
Posts: 15

does anybody know witch methods (Entity bean) run in the transaction context of the method that causes their invocations???

I know that ejbSelect method performs like that type, other?

thanks a lot

Christian D. Th. Sellberg

Joined: Apr 02, 2004
Posts: 10
Hi Carlos,

All entity bean methods which are invoked by the container in relation to a client call can participate in the clients transaction i.e. ejbCreate, ejbPostCreate, ejbRemove, ejbHome, ejbLoad, ejbStore and all business methods.

The following methods are invoked by the container unrelated to a client call: setEntityContext, unsetEntityContext, ejbActivate and ejbPassivate.

Kind regards
Lionel Orellana
Ranch Hand

Joined: Mar 19, 2004
Posts: 87
Depends on the transaction attribute Carlos. If your ejbCreate for example is marqued with Required, RequiresNew or Mandatory then it will run in the context of the caller, assuming the caller was in a transaction ...
I agree. Here's the link:
subject: transaction context
It's not a secret anymore!