• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Attributes for Methods in the Entity Bean Class?

 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems to me that all the methods in Entity Bean class don't need any transaction attribute. But I am sure. Tell me some if someone find any methods need to be specified transaction attributes.
 
Goan Balchao
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should find the answer in the HFE book or the spec. But at the top of my head
setEntityContext
unsetEntityContext
ejbActivate
ejbPassivate
would execute in an "unspecified transaction context" . These are not exposed to the client anyway.
Also
ejbLoad would be invoked in the transaction context of the calling "business method"
ejbStore would be invoked in the transaction context of either the "ejbLoad" or the "ejbCreate"
ejbPostCreate would be invoked in the transaction context of ejbCreate
These are again not exposed to the client
For CMP / BMP entity beans, since they are "CMT" , all the other methods should have a transaction attribute defined, either generically (wildcard) or specifically.
Hope this helps
 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... For CMP / BMP entity beans, since they are "CMT" , all the other methods should have a transaction attribute defined, either generically (wildcard) or specifically.

What I can find the methods in entity beans need the transaction attributes are only those business methods in the bean class. What else?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic