[jboss-user] [EJB/JBoss] - Re: Atomic process in Local SSB -Urgent !!!!!!!

kahzoo do-not-reply at jboss.com
Mon May 19 21:06:07 EDT 2008


anonymous wrote : One thing that worries me with Synchronization is that Synch is on whole bean and not the methods :).
  | 
  | Now I need to have more than one Stateful session bean.
  | 

I'm sorry, but I'm failing to understand what your concern is.

Are you saying that you have to split the logic in two different beans?

That is not the case, and you can implement the logic in one stateful session bean(, in which you will have both your business method and the synchronization methods). You just call the business method and the synchronization methods will be automatically called at appropriate points of the CMT transaction.

If StatefulSessionBean/SessionSynchronization is not satisfactory, the other option would be to switch from CMT to BMT (bean-managed transaction). 

With BMT, you need to do the transaction demarcation (begin, commit, rolback) yourself, but since your bean will know the outcome of the transaction, it can decide to write/do-not-write data in the file accordingly.
 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151876#4151876

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151876



More information about the jboss-user mailing list