• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Stateless/stateful beans and lifecycle

 
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
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic