[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-05 Thread FabBoco
Christian, anonymous wrote : | Yes, you have a fuzzy picture about what system transactions are and now look for the wrong solutions. Seam and Java EE have _all_ options you need to handle transactions. Don't jump into the middle trying to use nested conversations, long-running persistence

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-05 Thread [EMAIL PROTECTED]
You believe that there are nested transactions and that transactions span requests. These things do not happen or don't exist. It took me a while to realize that you actually wanted to say persistence context whenever you said transaction, because that is what you are looking for. View the

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-05 Thread [EMAIL PROTECTED]
OK, last post from me, this is what you need: - A long-running conversation that is started when the form in 1) is rendered - A Seam-managed persistence context with @In EntityManager (read the docs) that is bound to that conversation (automatically) - The conversation should begin with

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-05 Thread FabBoco
Christian, thank you again. anonymous wrote : | You believe that there are nested transactions and that transactions span requests. These things do not happen or don't exist. | Your answers helped me to realize that this is not true. anonymous wrote : | It took me a while to realize

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-04 Thread [EMAIL PROTECTED]
anonymous wrote : | 1) Can you give me some reference to learn more about transactions that span HTTP requests ? | This is extremely rare, it involves suspension of the transaction on a Java EE server. I'd rather not give you any references on this because you will certainly try it -

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-03 Thread FabBoco
Christian, thank you for your explanations. I have some more questions: 1) Can you give me some reference to learn more about transactions that span HTTP requests ? 2) Can @Begin(flushMode=MANUAL) help me ? 3) Why seam has not options that let user manage the transactions as needed ? Am I

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-02 Thread FabBoco
Christian, tank you very much for your answers. Now everything is clearer. Since every call to a SFSB method is performed into a different database transaction, my final question is how can I manage transactions so that two or more SFSB methods are executed into the same transaction ? What I

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-02 Thread FabBoco
Christian, if you tell me to use TransactionalSeamPhaseListener again, I say you again that I am using it :) Nevertheless, each method call issue a begin/commit transaction to the database. To me this means that each method is called into a different transaction. Isn't it ? Probably, I had

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-02 Thread [EMAIL PROTECTED]
anonymous wrote : | Nevertheless, each method call issue a begin/commit transaction to the database. To me this means that each method is called into a different transaction. Isn't it ? | This can't be the case if you use TSPL. EJB method calls with no transaction annotation will just

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-02 Thread [EMAIL PROTECTED]
System transactions do not (this is not 100% but I'm not going to explain the special cases) span HTTP requests. TSPL uses two transactions for each JSF request. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042613#4042613 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-01 Thread [EMAIL PROTECTED]
If you use TransactionalSeamPhaseListener, the transaction demarcation is decoupled from conversations and bean calls, it's simply bound to the JSF lifecycle. You should use it if you don't. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042123#4042123 Reply

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-01 Thread FabBoco
Christian, thank you very much for your promptly reply. I am using TransactionalSeamPhaseListener. I can't understand what you mean saying: anonymous wrote : | If you use TransactionalSeamPhaseListener, the transaction demarcation is decoupled from conversations and bean calls, it's simply

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-01 Thread [EMAIL PROTECTED]
Read the documentation about TransactionalSeamPhaseListener in the reference to get more details, here is the Javadoc: * Transaction management for extended persistence contexts. * A transaction spans the restore view, apply request values, process validations, * update model values and

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-01 Thread FabBoco
Christian, thank you again, but I can't solve the problem. 1) @Transactional - My mistake, it was there for a previous experiment. Removed 2) Switched to Seam-managed persistence context, nothing changed 3) Now, each method has @TransactionAttribute(TransactionAttributeType.REQUIRED),

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-01 Thread FabBoco
Now I am really confused. First of all let me update the sample code. | @Stateful | @Name(A) | @Scope(ScopeType.CONVERSATION) | public class ABean implements Serializable, A | { |@In |private EntityManagerem; | |@In(create = true) |

[jboss-user] [JBoss Seam] - Re: Nested conversations and transaction management

2007-05-01 Thread [EMAIL PROTECTED]
OK, I really have no idea what you are doing, your code does not match your description. Stop using stuff like nested conversations until you have the basics working. anonymous wrote : | a) Is the database transaction started when the conversation starts, committed when the conversation is