Author: dkulp
Date: Tue Jan 4 19:45:04 2011
New Revision: 1055166
URL: http://svn.apache.org/viewvc?rev=1055166&view=rev
Log:
Merged revisions 1055156 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1055156 | dkulp | 2011-01-04 14:33:59 -0500 (Tue, 04 Jan 2011) | 2 lines
For a one-way, do a temporary yield after sticking it on the workqueue
to try and allow the messages to stay in order.
........
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java?rev=1055166&r1=1055165&r2=1055166&view=diff
==============================================================================
---
cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
(original)
+++
cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
Tue Jan 4 19:45:04 2011
@@ -99,15 +99,26 @@ public class OneWayProcessorInterceptor
if (Boolean.FALSE.equals(o)) {
chain.pause();
try {
-
message.getExchange().get(Bus.class).getExtension(WorkQueueManager.class)
- .getAutomaticWorkQueue().execute(new Runnable() {
- public void run() {
- chain.resume();
- }
- });
+ synchronized (chain) {
+
message.getExchange().get(Bus.class).getExtension(WorkQueueManager.class)
+ .getAutomaticWorkQueue().execute(new Runnable() {
+ public void run() {
+ synchronized (chain) {
+ chain.notifyAll();
+ }
+ chain.resume();
+ }
+ });
+ //wait a few milliseconds for the background thread to
start processing
+ //Mostly just to make an attempt at keeping the
ordering of the
+ //messages coming in from a client. Not guaranteed
though.
+ chain.wait(20);
+ }
} catch (RejectedExecutionException e) {
//the executor queue is full, so run the task in the
caller thread
chain.resume();
+ } catch (InterruptedException e) {
+ //ignore - likely a busy work queue so we'll just let the
one-way go
}
}
}