Let me preface this with I'm not sure if I should post this here or in in the 
Seam forums.

I have a Seam application that uses an embedded EJB3 container as it is meant 
to be deployed outside of JBoss AS (on Tomcat, specifically).  However, there 
are also some background tasks that are meant to run via Quartz schedule jobs 
and update the database through the entity beans.  Because these tasks are 
completely outside of Seam I'm getting the EntityManagerFactory through a JNDI 
lookup, however I get the following exception when I try to commit the entity 
beans

java.lang.IllegalStateException: JTA EntityManager cannot access a transactions

I've tried starting, and joining the entity manager to, through by using the 
begin() method on the following transactions and then doing an 
EntityManager.joinTransaction().  I tried looking up the TransactionManager and 
then I tried looking up the UserTransaction and using it.  In both cases I was 
able to retrieve the object from the JNDI tree, but got the above error.  As a 
last resort I also tried using EntityManager.getTransaction() which of course 
returned nothing because the manager was not currently joined to a transaction.

I'm sure I'm just missing something simple here but so far I haven't been able 
to figure it out.  Any help would be really appreciated.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997011
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to