• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about @PostConstruct

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Session Beans have a lifecycle callback function @PostConstruct, it's different than the class constructor, because it will be called later after dependence injection.
So my question is, can man call another EJB which is injected with @EJB in this lifecycle function and if yes, how about the transaction propagation? (JTA, CMT, transactional persistence context)

thanks
 
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

EJB 3.1 specification, p. 374, 13.6.5 wrote:The term "an unspecified transaction context" is used in the EJB specification to refer to the cases in which the EJB architecture does not fully define the transaction semantics of an enterprise bean method execution.

This includes the following cases:
(...)
- The execution of a PostConstruct, PreDestroy, PostActivate, or PrePassivate callback method of a session bean with container-managed transaction demarcation (Except Singleton PostConstruct/PreDestroy methods)"

reply
    Bookmark Topic Watch Topic
  • New Topic