Asynchronous processing from active business context causes StackOverflowError
------------------------------------------------------------------------------
Key: JBSEAM-4227
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4227
Project: Seam
Issue Type: Bug
Components: Async, BPM
Affects Versions: 2.1.2.CR2
Environment: Tomcat 6.0.18 Seam 2.1.2.CR2 download, quartz (also thread local
dispatcher doesn't work), JBPM 3.3.x
Reporter: Gena Batalski
I want to send an asynchronous event from an JBPM handler. The event is scheduled and the
taskId and processId are present. Then, when the business context should be restored
during the asynchronous event processing (ContextualAsynchronousRequest.setup), Seam tries
to resume the task (BusinessProcess.instance().resumeTask(taskId);) and it ends with
StackOverflowError.
I investigated the problem and found, that in my case the entity manager can not be
instantiated.
This is the call stack which causes troubles:
ContextualAsynchronousRequest.setup()
BusinessProcess Line 58 BusinessProcess.instance().resumeTask(taskId);
BusinessProcess.resumeTask()
BusinessProcess Line 252 TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance();
TaskInstance.getTaskInstance()
TaskInstance Line 39 return new Work<org.jbpm.taskmgmt.exe.TaskInstance>()
Work.workInTransaction()
Work Line 44 userTransaction.begin()
EntityTransaction.begin()
EntityTransaction Line 79 initEntityManager()
EntityTransaction Line 67 entityManager.getValue()
Contexts.lookupInStatefulContexts("entityManager")
Contexts Line 209 getBusinessProcessContext()
BusinessProcessContext.get("entityManager")
BusinessProcessContext Line 65 getTaskInstance()
BusinessProcessContext Line 241 TaskInstance.instance()
TaskInstance.instance()
TaskInstance Line 64 Component.getInstance(TaskInstance.class, ScopeType.STATELESS)
--> going to unwrap TaskInstance.getTaskInstance()
--> endless loop
Please assist
Gena
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira