[jboss-user] [JBoss Seam] - Transactions & Persistence Context

clemente.cioffi do-not-reply at jboss.com
Wed Aug 8 07:34:54 EDT 2007


HI,
I'm figuring out how using the transactions and the persistence Context in a good way. My environment is : JbossAs 4.0.0, Seam 1.2 and Icefaces 1.6

The back-end of my application is compounded by pojos with conversation scope that call stateless ejb3s which a Seam-managed Entity Manager is injected in.I'm not using the seam-managed transactions.
I'd like to know If I can use the transaction demarcation on EJB3 methods.
I tried that but It doesn't seem work.

Example:
beginning from front-end,I call a method on pojo that calls a method on EJB3 where some operations on DB are carried out.
Now it seems that the transaction starts and then ends when the ejb3  method finishes.If during this method I call others methods of the same ejb or of others that has a 
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
a new transaction doesn't start.in fact the commit operation is always made at the end of the first ejb3 method called.
So do you have some experience in that?
Using the seam-managed transactions I have strange anomalies,somentimes the commit is made at the end of Ejb3 method,sometimes at the end of Pojo method.

Can you help me?

Thank you




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

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



More information about the jboss-user mailing list