Author: jeff.yuchang
Date: 2010-10-12 21:44:27 -0400 (Tue, 12 Oct 2010)
New Revision: 1037
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
Log:
* RIFTSAW-299, fix for this issue.
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-10-12
16:52:59 UTC (rev 1036)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-10-13
01:44:27 UTC (rev 1037)
@@ -189,11 +189,24 @@
}
else
{
- // one-way invocation
- ExecutorService executorService = executionEnvironment.getExecutorService();
+ // one-way invocation, also defer the invoke until the transaction commits.
+ Scheduler scheduler = executionEnvironment.getScheduler();
executionCallable = new OneWayCallable(mex.getMessageExchangeId());
- executorService.submit(executionCallable);
-
+
+ scheduler.registerSynchronizer(new Scheduler.Synchronizer() {
+
+ public void beforeCompletion() {
+
+ }
+
+ public void afterCompletion(boolean success) {
+ if (!success) return;
+
+ ExecutorService executorService = executionEnvironment.getExecutorService();
+ executorService.submit(executionCallable);
+ }
+ });
+
mex.replyOneWayOk();
}
}
@@ -303,7 +316,7 @@
private String mexId;
- public OneWayCallable(String mex) {
+ public OneWayCallable(String mexId) {
this.mexId = mexId;
}
Show replies by date