servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r414689 - /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
Date Thu, 15 Jun 2006 21:37:40 GMT
Author: gnodet
Date: Thu Jun 15 14:37:40 2006
New Revision: 414689

URL: http://svn.apache.org/viewvc?rev=414689&view=rev
Log:
MessageExchangeListener should be given exchanges with their own classloader set on the thread

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java?rev=414689&r1=414688&r2=414689&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
Thu Jun 15 14:37:40 2006
@@ -616,7 +616,13 @@
             // This is important for transaction boundaries
             me.setPushDeliver(true);
             // Deliver the exchange
-            listener.onMessageExchange(me);
+            ClassLoader old = Thread.currentThread().getContextClassLoader();
+            try {
+                Thread.currentThread().setContextClassLoader(component.getComponent().getClass().getClassLoader());
+                listener.onMessageExchange(me);
+            } finally {
+                Thread.currentThread().setContextClassLoader(old);
+            }
             // TODO: handle delayed exchange notifications 
             return;
         }



Mime
View raw message