Folks,
I have a SLSB that launches tasks in a threadpool. The task threads need to access entities and persist them.
I am accessing this SLSB by injecting it into another SLSB (which is also a seam component).
My problems are :
1. The moment my threads try to persist anything using the injected EntityManager (org.jboss.ejb3.entity.TransactionScopedEntityManager), it throws an exception saying that a transaction needs to be started
2. If I try to fix the above problem by
em.getTransaction().begin(), I get an IllegalStateException saying I cannot do that in a managed and injected entity manager.