• 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

PostConstruct/PreDestory are transactional with BMT singleton?

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The specification session 4.8.3 Transaction semantics of initialization and destruction says the postConstruct and preDestroy methods use REQUIRED, REQUIRES_NEW or NOT_SUPPORTED with singleton under CMT.
But the specification does not say if postConstruct/PreDestroy are transactional under BMT.

Are these two methods not transactional ?

Even in session 14.3.3 table 19, it says

If singleton, rollback any container-started transaction


It does not even say if the bean managed transaction should be rollback or not.

 
Hold that thought. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic