Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Mansur Khan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks manur i got it now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic