• Post Reply Bookmark Topic Watch Topic
  • New Topic

PostConstruct/PreDestory are transactional with BMT singleton?

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • Mark post as helpful
  • send pies
  • 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.

 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!