[jboss-user] [JBoss Seam] - Trying to understand transactions

joaobmonteiro do-not-reply at jboss.com
Thu Nov 22 12:33:14 EST 2007

Hi guys,

I am using Seam 1.2 GA + JSF + Apache 6 and I got some problems in handling transactions. I tried hard to find when Seam opens, commit and flushes an transaction during a request without success. 

Why Seam commits/flushes a transcation when I do em.find(clazz,id) ?

I have a transient object (an user instance) inside a managed object (Issue instance, for example), so I need to get a managed user instance, for that, I use em.find and I got a really nice Transient Object Exception because someone tryies to flush the transction during em.find.

You could think that I only need to do merge() instead of trying to find() but in my case, the user instance will be always transient because it cames from a legacy system and if it exists in my system I have to merge otherwise I have to insert it.

I solved this problem setting manual flush mode but it is too boring to work with. 

Other problem I have is undesirable commits after Ajax requests causing transient object exception. 

Anyone knows how to solve these questions in a better way ?


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

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

More information about the jboss-user mailing list