• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction completion on stateful session beans (EJB 3.1)

 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm reading the book Enterprise JavaBeans by Bill Burke and Andrew Lee and I got kind confused with something. On the transactions chapter there is a subtopic called "Transactional stateful session beans", there they explain a lot about the behavior, characteristics and how to use / add SessionSynchronization to your bean.

What I haven't understood is how the transaction manager will know that the transaction ended once there is no such boundaries as method begin and end or UserTransaction.begin() and UserTransaction.commit() / .rollback(). How can I demarcate the end of a transaction in SFB?

I know that I can't call the method annotated with @Remove because it will throw an exception. I must explicitly end my transaction before doing it.

Someone knows?
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer found in http://www.coderanch.com/t/491473/java-EJB-SCBCD/certification/Remove-method-inside-transaction-stateful
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!