Hi
I'm writing an application that processes a huge amount of data. I want to kick this off in the middle of the night with a timer service inside of the app server so that the slsb can chew on the problem set for a few hours and shove data into the database when needed.
Now, the issue is the transaction times out. It's a bad idea to extend the transaction timeout to hours, so I figured I would bracket the database work by opening and closing the transaction (since I know where the delimiters are).
Ok, so Seam isn't letting me do things like:
while(moreDataToProcess) { someProcessing(); entityManager.getTransaction().begin(); ... entityManager.persist(obj); entityManager.getTransaction().commit(); otherProcessing(); }
ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: java.lang.IllegalStateException: Illegal to call this method from injected, managed EntityManage
Is this (long running data collection routines) a unique problem?