[
https://jira.jboss.org/jira/browse/JBSEAM-4512?page=com.atlassian.jira.pl...
]
Jason E commented on JBSEAM-4512:
---------------------------------
I am adding a stack trace below. This is the portion of the strack trace immediately
after my db transaction rolls back (i.e. one that rolls back ORDERS table changes).
Notice that a new db transaction starts then Seam's ManagedJbpmContext flushes the
jBPM changes (i.e. ends my task).
2009-12-11 15:55:54,359 WARN [org.jboss.seam.web.ExceptionFilter] running exception
handlers^M
2009-12-11 15:55:54,359 DEBUG [org.jboss.seam.contexts.Lifecycle] After request,
destroying contexts^M
2009-12-11 15:55:54,359 DEBUG [org.jboss.seam.util.Work] beginning transaction^M
2009-12-11 15:55:54,359 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA
transaction^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered
Synchronization^M
2009-12-11 15:55:54,359 DEBUG [org.jboss.seam.util.Work] committing transaction^M
2009-12-11 15:55:54,359 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA
transaction^M
2009-12-11 15:55:54,359 DEBUG [org.jboss.seam.bpm.ManagedJbpmContext] flushing seam
managed jBPM context^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
processing flush-time cascades^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
dirty checking collections^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.engine.Collections] Collection found:
[org.jbpm.taskmgmt.exe.TaskInstance.v
ariableInstances#1], was: [org.jbpm.taskmgmt.exe.TaskInstance.variableInstances#1]
(initialized)^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.engine.Collections] Collection found:
[org.jbpm.taskmgmt.exe.TaskInstance.p
ooledActors#1], was: [org.jbpm.taskmgmt.exe.TaskInstance.pooledActors#1]
(uninitialized)^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.engine.Collections] Collection found:
[org.jbpm.taskmgmt.exe.TaskInstance.c
omments#1], was: [org.jbpm.taskmgmt.exe.TaskInstance.comments#1] (uninitialized)^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.engine.Collections] Collection found:
[org.jbpm.taskmgmt.exe.TaskMgmtInstan
ce.swimlaneInstances#1], was: [org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstances#1]
(uninitialized)^M
2009-12-11 15:55:54,359 DEBUG [org.hibernate.engine.Collections] Collection found:
[org.jbpm.taskmgmt.exe.TaskMgmtInstan
ce.taskInstances#1], was: [org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#1]
(initialized)^M
BPM task does not rollback
--------------------------
Key: JBSEAM-4512
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4512
Project: Seam
Issue Type: Bug
Components: BPM
Affects Versions: 2.2.0.GA
Environment: Testing this on Windows XP. Deploying to JBoss AS 4.2.2
Reporter: Jason E
I have made a simple change to the ShipAction.java class in the dvdstore example that
ships with Seam. Here is the change
//@EndTask
public String ship() {
order.ship(track);
TaskInstance ti =
ManagedJbpmContext.instance().getTaskInstance(taskInstance.getId());
taskInstance.end();
if(true) throw new RuntimeException("TESTING");
return "admin";
}
I commented out the end task annotation and I am ending the task via the TaskInstance
API. When I throw the Runtime exception the changes to the ORDERS entity bean (i.e.
updating the tracking number) rolls back. The problem is that the task instance change
(i.e. ending the task) does not rollback. It appears that jBPM is flushing its changes in
another db transaction. This seems like a bug since I would expect the ending of my task
to also rollback. This seems like the desired behavior.
This was the only change I made to the dvdstore example that ships with Seam 2.2.0.GA so
it should be easy to reproduce.
Thanks!
Jason
--
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