• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateless/stateful beans and lifecycle

 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
I have a doubt about page 79 specs: for stateful session beans, you can access to enterprise beans at lifecycle callback methods. However, this is not true for stateless session beans. The specs say that this is due to the fact that there is not transaction context (pag. 90), but at paragraph 13.6.5, the specs say that "The execution of a PostConstruct, [...], PrePassivate callback method of a session bean with container-managed transaction demarcation" are executed in an unspecified transaction context.
So, why can a stateful session bean invoke, for example, an enterprise bean, in a lifecycle callback interceptor method even if there is not transaction context?

Thanks in advances
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic