[seam-commits] Seam SVN: r14057 - in branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam: bpm and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Feb 25 03:08:25 EST 2011
Author: manaRH
Date: 2011-02-25 03:08:24 -0500 (Fri, 25 Feb 2011)
New Revision: 14057
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java
Log:
JBPAPP-5410
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java 2011-02-22 16:13:01 UTC (rev 14056)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/async/Asynchronous.java 2011-02-25 08:08:24 UTC (rev 14057)
@@ -8,6 +8,7 @@
import org.jboss.seam.core.Init;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
+import org.jboss.seam.util.Work;
/**
* Something that happens asynchronously, and with a full
@@ -57,10 +58,17 @@
{
try
{
- BusinessProcess.instance().resumeTask(taskId);
+ new Work<Object>()
+ {
+ @Override
+ protected Object work() throws Exception
+ {
+ BusinessProcess.instance().resumeTask(taskId);
+ return null;
+ }
+ }.workInTransaction();
}
catch (Exception e) {
- log.error("Exception was thrown in BusinessProcess.resumeTask", e);
throw new RuntimeException(e);
}
}
@@ -84,8 +92,20 @@
setup();
try
{
- process();
+ new Work<Object>()
+ {
+ @Override
+ protected Object work()
+ {
+ process();
+ return null;
+ }
+ }.workInTransaction();
}
+ catch (Exception e)
+ {
+ log.error("Exception was thrown in asynchronous processing", e);
+ }
finally
{
cleanup();
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java 2011-02-22 16:13:01 UTC (rev 14056)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java 2011-02-25 08:08:24 UTC (rev 14057)
@@ -285,7 +285,17 @@
}
else
{
- setProcessId( task.getTaskMgmtInstance().getProcessInstance().getId() );
+ try
+ {
+ setProcessId( task.getTaskMgmtInstance().getProcessInstance().getId() );
+ }
+ catch (Exception e)
+ {
+ //log.error("Exception while transition is in process!");
+ this.processId = null;
+ this.taskId = null;
+ throw new RuntimeException(e);
+ }
Events.instance().raiseEvent("org.jboss.seam.initTask." + task.getTask().getName());
return true;
}
More information about the seam-commits
mailing list