cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r906075 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Date Wed, 03 Feb 2010 14:53:32 GMT
Author: dkulp
Date: Wed Feb  3 14:53:32 2010
New Revision: 906075

URL: http://svn.apache.org/viewvc?rev=906075&view=rev
Log:
Merged revisions 906074 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r906074 | dkulp | 2010-02-03 09:47:49 -0500 (Wed, 03 Feb 2010) | 1 line
  
  Remove direct dependency on jca classes from JMSDestination
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb  3 14:53:32 2010
@@ -1 +1 @@
-/cxf/trunk:905712,905745
+/cxf/trunk:905712,905745,906074

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java?rev=906075&r1=906074&r2=906075&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
Wed Feb  3 14:53:32 2010
@@ -20,6 +20,8 @@
 package org.apache.cxf.transport.jms;
 
 import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
@@ -34,7 +36,7 @@
 import org.springframework.jms.support.JmsUtils;
 
 public class JCATransactionalMessageListenerContainer extends DefaultMessageListenerContainer
{
-    static final ThreadLocal<MessageEndpoint> ENDPOINT_LOCAL = new ThreadLocal<MessageEndpoint>();
+    static final ThreadLocal<Map<Class<?>, ?>> ENDPOINT_LOCAL = new ThreadLocal<Map<Class<?>,
?>>();
     static final String MESSAGE_ENDPOINT_FACTORY = "MessageEndpointFactory";
     static final String MDB_TRANSACTED_METHOD = "MDBTransactedMethod";
     private MessageEndpointFactory factory;
@@ -61,7 +63,11 @@
             s = xa.getSession();
             mc = s.createConsumer(getDestination());            
             ep = factory.createEndpoint(xar);
-            ENDPOINT_LOCAL.set(ep);
+            
+            Map<Class<?>, Object> mp = new HashMap<Class<?>, Object>();
+            mp.put(MessageEndpoint.class, ep);
+            
+            ENDPOINT_LOCAL.set(mp);
             ep.beforeDelivery(method);                
             messageReceived = doReceiveAndExecute(invoker, s, mc, null);
             ep.afterDelivery();

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=906075&r1=906074&r2=906075&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Wed Feb  3 14:53:32 2010
@@ -41,7 +41,6 @@
 import javax.jms.MessageListener;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.resource.spi.endpoint.MessageEndpoint;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -206,9 +205,12 @@
             
             BusFactory.setThreadDefaultBus(bus);
 
-            MessageEndpoint ep = JCATransactionalMessageListenerContainer.ENDPOINT_LOCAL.get();
-            if (ep != null) {
-                inMessage.setContent(MessageEndpoint.class, ep);
+            
+            Map<Class<?>, ?> mp = JCATransactionalMessageListenerContainer.ENDPOINT_LOCAL.get();
+            if (mp != null) {
+                for (Map.Entry<Class<?>, ?> ent : mp.entrySet()) {
+                    inMessage.setContent(ent.getKey(), ent.getValue());
+                }
                 JCATransactionalMessageListenerContainer.ENDPOINT_LOCAL.remove();
             }
 



Mime
View raw message