I'm having a bad time with it. I'm developing a webapp in which I have conversations (and plan to use jBPM) and some custom servlet for handling images.
The problem is that, sometime, my image servlet throws an exception by which I'm told that a UserTransaction is already active. The image servlet has to access the db (by its own means: no seam or whatever), so it obtains a UserTransaction, and EntityManager and begins a transaction. Using SeamPhaseListener everything was fine, but with SeamExtendedManagedPersistencePhaseListener it seems that transactions are now not committed/rolled-back once opened when a conversation is started. Now, I know that a transaction as well as an EntityManager or Hibernate Session object is something tied to a thread, so I suppose that when my image servlet fails it is because the thread it is running into is the very same hosting a previous seam request. Well, I'm not really shure this is the right seam behaviour, anyway: UserTransaction, EntityManager and Session instances should be closed or (somehow) detached from the thread at the end of a request, isn't it? Did I find something wrong in seam, or it's (again) just me? How I'm supposed to mitigate the two needs (transactions with seam conversations and servlet decoupling)? Regards. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3938954#3938954 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3938954 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user