Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PostConstruct/PreDestory are transactional with BMT singleton?

Himai Minh
Ranch Hand
Posts: 1361
  • 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.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic