This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes TransactionAttribute for the remove() of home and remote interface of an Entity Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "TransactionAttribute for the remove() of home and remote interface of an Entity Bean" Watch "TransactionAttribute for the remove() of home and remote interface of an Entity Bean" New topic
Author

TransactionAttribute for the remove() of home and remote interface of an Entity Bean

Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264

For a EJB 2.1 (and earlier) entity bean, the transaction attributes are specified for the methods defined in the bean�s component interface and all the direct and indirect superinterfaces of the component interface, excluding the getEJBHome, getEJBLocalHome, getHandle,getPrimaryKey, and isIdentical methods; for the methods defined in the bean�s home interface and all the direct and indirect superinterfaces of the home interface, excluding the getEJBMetaData and getHomeHandle methods specific to the remote home interface;and for the timeout callback method, if any.


Does this implies that transaction attributes can be set for the remove() methods of the home and remote interfaces of the Entity bean 2.1 if so, tell me why would we include a remove method to a transaction.


when you really want something, all the universe always conspires in your favour.<br /> <br />SCJP1.5-77%<br />SCWCD-89%
Mansur Khan
Ranch Hand

Joined: Mar 27, 2007
Posts: 50
remove() in Entity Beans corresponds to deleting a record in the DB. Since this is a DB operation, it need to be in a transaction. However remove() in Session Beans has nothing to do with the DB. Hence it is not required to be in a transactional enclosure.


SCDJWS, SCBCD, SCJP
Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
thanks manur i got it now
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TransactionAttribute for the remove() of home and remote interface of an Entity Bean
 
Similar Threads
Do we need specify transaction attribute for ejbRemove of Entity Bean
Transaction attributes question
HFEJP p.520 Q3: Why MUST every business method have a transaction attribute?
Which the default trans-attribute for all Stateless SB methods ?
What transaction attributes can apply to session bean methods in EJB 2.0?