With what transaction level are ejbCreate and ejbRemove method called for Entity Beans?

Gautam Marwaha

Additional info:
What is the transaction level with which the ejbCreate and ejbRemove will be executed? For business method I can have any attributes in my DD, as TX.Reqd, TX.Reqd_New, TX.Support etc...
Does ejbCreate and ejbRemove methods have any default transaction levels?
If not can we set it as we do for other business methods?
   <container-transaction>
      <method>
        <ejb-name>myBean</ejb-name>
	<method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
In the above, do all the methods including ejbCreate ejbRemove will have transaction attribute of Required?
If not then with what transaction level these methods are executed (if they have any default transaction level)?
ejbCreate() and ejbRemove are called using an unspecified transaction context. In short, you can't set a tx attribute for these.
Refer sections 7.5.7 - "Transaction context of session bean methods" and 17.6.5 - "Handling of methods that run with “an unspecified transaction context" of EJB 2.0 spec.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.