servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r734395 - in /servicemix/components/bindings/servicemix-jms/trunk/src: main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java test/java/org/apache/servicemix/jms/JmsProviderEndpointTest.java
Date Wed, 14 Jan 2009 13:47:56 GMT
Author: gnodet
Date: Wed Jan 14 05:47:39 2009
New Revision: 734395

URL: http://svn.apache.org/viewvc?rev=734395&view=rev
Log:
SM-1760, SM-1764: Fix jms provider endpoint

Modified:
    servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
    servicemix/components/bindings/servicemix-jms/trunk/src/test/java/org/apache/servicemix/jms/JmsProviderEndpointTest.java

Modified: servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java?rev=734395&r1=734394&r2=734395&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
(original)
+++ servicemix/components/bindings/servicemix-jms/trunk/src/main/java/org/apache/servicemix/jms/endpoints/JmsProviderEndpoint.java
Wed Jan 14 05:47:39 2009
@@ -16,38 +16,39 @@
  */
 package org.apache.servicemix.jms.endpoints;
 
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
 import javax.jbi.management.DeploymentException;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.NormalizedMessage;
 import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.Fault;
 import javax.jbi.messaging.InOnly;
-import javax.jbi.messaging.RobustInOnly;
 import javax.jbi.messaging.InOut;
-import javax.jbi.messaging.Fault;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.Session;
 import javax.jms.MessageListener;
 import javax.jms.ObjectMessage;
+import javax.jms.Session;
 
-import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.common.JbiConstants;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.jms.JmsEndpointType;
 import org.apache.servicemix.store.Store;
 import org.apache.servicemix.store.StoreFactory;
 import org.apache.servicemix.store.memory.MemoryStoreFactory;
+import org.springframework.jms.JmsException;
 import org.springframework.jms.UncategorizedJmsException;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.JmsTemplate102;
 import org.springframework.jms.core.MessageCreator;
 import org.springframework.jms.core.SessionCallback;
-import org.springframework.jms.listener.AbstractPollingMessageListenerContainer;
 import org.springframework.jms.listener.AbstractMessageListenerContainer;
-import org.springframework.jms.listener.DefaultMessageListenerContainer102;
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
+import org.springframework.jms.listener.DefaultMessageListenerContainer102;
 import org.springframework.jms.support.destination.DestinationResolver;
 import org.springframework.jms.support.destination.DynamicDestinationResolver;
 
@@ -60,7 +61,7 @@
  */
 public class JmsProviderEndpoint extends ProviderEndpoint implements JmsEndpointType {
 
-    private static final String MSG_SELECTOR_START = "JMSCorrelationID='";    
+    private static final String MSG_SELECTOR_START = "JMSCorrelationID='";
     private static final String MSG_SELECTOR_END = "'";
 
     private JmsProviderMarshaler marshaler = new DefaultProviderMarshaler();
@@ -115,8 +116,8 @@
     }
 
     /**
-    * Specifies a string identifying the JMS destination used to send 
-     * messages. The destination is resolved using the 
+    * Specifies a string identifying the JMS destination used to send
+     * messages. The destination is resolved using the
      * <code>DesitinationResolver</code>.
      *
      * @param destinationName the destination name
@@ -135,9 +136,9 @@
     }
 
     /**
-    * Specifies if the provider uses JMS 1.0.2 compliant APIs. Defaults to 
+    * Specifies if the provider uses JMS 1.0.2 compliant APIs. Defaults to
     * <code>false</code>.
-    * 
+    *
      * @param jms102 provider is JMS 1.0.2 compliant?
      */
     public void setJms102(boolean jms102) {
@@ -168,7 +169,7 @@
     }
 
     /**
-    * Specifies the JMS delivery mode used for the reply. Defaults to 
+    * Specifies the JMS delivery mode used for the reply. Defaults to
     * (2)(<code>PERSISTENT</code>).
     *
      * @param deliveryMode the JMS delivery mode
@@ -185,7 +186,7 @@
     }
 
     /**
-    * Specifies a class implementing logic for choosing the destination used 
+    * Specifies a class implementing logic for choosing the destination used
     * to send messages.
     *
      * @param destinationChooser the destination chooser for sending messages
@@ -205,7 +206,7 @@
     }
 
     /**
-    * Specifies a class implementing logic for choosing the destination used 
+    * Specifies a class implementing logic for choosing the destination used
     * to recieve replies.
     *
      * @param replyDestinationChooser the destination chooser used for the reply destination
@@ -221,7 +222,7 @@
     }
 
     /**
-    * Specifies the class implementing logic for converting strings into 
+    * Specifies the class implementing logic for converting strings into
     * destinations. The default is <code>DynamicDestinationResolver</code>.
     *
      * @param destinationResolver the destination resolver implementation
@@ -238,7 +239,7 @@
     }
 
     /**
-    * Specifies if the QoS values specified for the endpoint are explicitly 
+    * Specifies if the QoS values specified for the endpoint are explicitly
     * used when a messages is sent. The default is <code>false</code>.
     *
      * @param explicitQosEnabled should the QoS values be sent?
@@ -255,8 +256,8 @@
     }
 
     /**
-    * Specifies the class implementing the message marshaler. The message 
-    * marshaller is responsible for marshalling and unmarshalling JMS messages. 
+    * Specifies the class implementing the message marshaler. The message
+    * marshaller is responsible for marshalling and unmarshalling JMS messages.
     * The default is <code>DefaultProviderMarshaler</code>.
     *
      * @param marshaler the marshaler implementation
@@ -276,14 +277,14 @@
     }
 
     /**
-    * Specifies if your endpoint requires JMS message IDs. Setting the 
-    * <code>messageIdEnabled</code> property to <code>false</code>
causes the 
-    * endpoint to call its message producer's 
-    * <code>setDisableMessageID() </code> with a value of <code>true</code>.

-    * The JMS broker is then given a hint that it does not need to generate 
-    * message IDs or add them to the messages from the endpoint. The JMS 
+    * Specifies if your endpoint requires JMS message IDs. Setting the
+    * <code>messageIdEnabled</code> property to <code>false</code>
causes the
+    * endpoint to call its message producer's
+    * <code>setDisableMessageID() </code> with a value of <code>true</code>.
+    * The JMS broker is then given a hint that it does not need to generate
+    * message IDs or add them to the messages from the endpoint. The JMS
     * broker can choose to accept the hint or ignore it.
-    * 
+    *
      * @param messageIdEnabled the endpoint requires message IDs?
      */
     public void setMessageIdEnabled(boolean messageIdEnabled) {
@@ -298,14 +299,14 @@
     }
 
     /**
-    * Specifies if your endpoints requires time stamps on its messages. 
-    * Setting the <code>messageTimeStampEnabled</code> property to 
-    * <code>false</code> causes the endpoint to call its message producer's 
-    * <code>setDisableMessageTimestamp() </code> method with a value of 
-    * <code>true</code>. The JMS broker is then given a hint that it does not

-    * need to generate message IDs or add them to the messages from the 
+    * Specifies if your endpoints requires time stamps on its messages.
+    * Setting the <code>messageTimeStampEnabled</code> property to
+    * <code>false</code> causes the endpoint to call its message producer's
+    * <code>setDisableMessageTimestamp() </code> method with a value of
+    * <code>true</code>. The JMS broker is then given a hint that it does not
+    * need to generate message IDs or add them to the messages from the
     * endpoint. The JMS broker can choose to accept the hint or ignore it.
-    * 
+    *
      * @param messageTimestampEnabled the endpoint requires time stamps?
      */
     public void setMessageTimestampEnabled(boolean messageTimestampEnabled) {
@@ -336,8 +337,8 @@
     }
 
     /**
-    * Specifies if the destination is a topic. <code>true</code> means the 
-    * destination is a topic. <code>false</code> means the destination is a 
+    * Specifies if the destination is a topic. <code>true</code> means the
+    * destination is a topic. <code>false</code> means the destination is a
     * queue.
     *
      * @param pubSubDomain the destination is a topic?
@@ -354,7 +355,7 @@
     }
 
     /**
-    * Specifies if messages published by the listener's <code>Connection</code>

+    * Specifies if messages published by the listener's <code>Connection</code>
     * are suppressed. The default is <code>false</code>.
     *
      * @param pubSubNoLocal messages are surpressed?
@@ -472,22 +473,23 @@
                 return;
             // Exchange is active
             } else {
-                NormalizedMessage in;
                 // Fault message
                 if (exchange.getFault() != null) {
                     done(exchange);
                 // In message
-                } else if ((in = exchange.getMessage("in")) != null) {
-                    if (exchange instanceof InOnly) {
-                        processInOnly(exchange, in);
-                        done(exchange);
-                    }
-                    else {
-                        processInOut(exchange, in);
-                    }
-                // This is not compliant with the default MEPs
                 } else {
-                    throw new IllegalStateException("Provider exchange is ACTIVE, but no
in or fault is provided");
+                    NormalizedMessage in = exchange.getMessage("in");
+                    if (in != null) {
+                        if (exchange instanceof InOnly) {
+                            processInOnly(exchange, in);
+                            done(exchange);
+                        } else {
+                            processInOut(exchange, in);
+                        }
+                    // This is not compliant with the default MEPs
+                    } else {
+                        throw new IllegalStateException("Provider exchange is ACTIVE, but
no in or fault is provided");
+                    }
                 }
             }
         // Unsupported role: this should never happen has we never create exchanges
@@ -509,18 +511,18 @@
     protected void processInOnly(final MessageExchange exchange,
                                  final NormalizedMessage in) throws Exception {
         SessionCallback callback = new SessionCallback() {
-          public Object doInJms(Session session) throws JMSException {
-              try {
-                  processInOnlyInSession(exchange, in, session);
-                  return null;
-              } catch (JMSException e) {
-                  throw e;
-              } catch (RuntimeException e) {
-                  throw e;
-              } catch (Exception e) {
-                  throw new UncategorizedJmsException(e);
-              }
-          }
+            public Object doInJms(Session session) throws JMSException {
+                try {
+                    processInOnlyInSession(exchange, in, session);
+                    return null;
+                } catch (JMSException e) {
+                    throw e;
+                } catch (RuntimeException e) {
+                    throw e;
+                } catch (Exception e) {
+                    throw new UncategorizedJmsException(e);
+                }
+            }
         };
         template.execute(callback, true);
     }
@@ -561,19 +563,6 @@
      */
     protected void processInOut(final MessageExchange exchange,
                                 final NormalizedMessage in) throws Exception {
-    	if (listenerContainer == null) {
-    		// Obtain the default reply destination
-    		if (replyDestination == null && replyDestinationName != null) {
-    			replyDestination = (Destination) template.execute(new SessionCallback() {
-    				public Object doInJms(Session session) throws JMSException {
-    					return destinationResolver.resolveDestinationName(session, replyDestinationName,
isPubSubDomain());
-    				}
-    			});
-    		}
-    		//create the listener container
-    		listenerContainer = createListenerContainer();
-    		listenerContainer.start();
-    	}
         SessionCallback callback = new SessionCallback() {
             public Object doInJms(Session session) throws JMSException {
                 try {
@@ -590,7 +579,7 @@
         };
         template.execute(callback, true);
     }
-    
+
     /**
      * Process an InOnly or RobustInOnly exchange inside a JMS session.
      * This method delegates the JMS message creation to the marshaler and uses
@@ -607,29 +596,47 @@
     protected void processInOutInSession(final MessageExchange exchange,
                                          final NormalizedMessage in,
                                          final Session session) throws Exception {
+        // TODO: the following code may not work in pub/sub domain with temporary topics.
+        // The reason is that the the consumer is created after the request is sent.
+        // This mean that the response may be sent before the consumer is created, which
would
+        // mean the consumer will not receive the response as it does not use durable subscriptions.
+
         // Create destinations
-        final Destination dest = getDestination(exchange, in, session);
-        final Destination replyDest = getReplyDestination(exchange, in, session);
+        Destination dest = getDestination(exchange, in, session);
+        // Find reply destination
+        // If we use the replyDestination / replyDestinationName, set the async flag to true
+        // to indicate we will use the listener container
+        boolean asynchronous = false;
+        boolean useSelector = true;
+        Destination replyDest = chooseDestination(exchange, in, session, replyDestinationChooser,
null);
+        if (replyDest == null) {
+            useSelector = false;
+            replyDest = chooseDestination(exchange, in, session, null,
+                                          replyDestination != null ? replyDestination : replyDestinationName);
+            if (replyDest != null) {
+                asynchronous = true;
+            } else {
+                if (isPubSubDomain()) {
+                    replyDest = session.createTemporaryTopic();
+                } else {
+                    replyDest = session.createTemporaryQueue();
+                }
+            }
+        }
         // Create message and send it
         final Message sendJmsMsg = marshaler.createMessage(exchange, in, session);
         sendJmsMsg.setJMSReplyTo(replyDest);
         // handle correlation ID
-        String correlationId = sendJmsMsg.getJMSMessageID() != null ? sendJmsMsg.getJMSMessageID()
: exchange.getExchangeId(); 
+        String correlationId = sendJmsMsg.getJMSMessageID() != null ? sendJmsMsg.getJMSMessageID()
: exchange.getExchangeId();
         sendJmsMsg.setJMSCorrelationID(correlationId);
 
-        boolean asynchronous = replyDest.equals(replyDestination);
-
         if (asynchronous) {
+            createAndStartListener();
             store.store(correlationId, exchange);
         }
 
         try {
-            template.send(dest, new MessageCreator() {
-                public Message createMessage(Session session)
-                    throws JMSException {
-                    return sendJmsMsg;
-                }
-            });
+            send(session, dest, sendJmsMsg);
         } catch (Exception e) {
             if (asynchronous) {
                 store.load(exchange.getExchangeId());
@@ -639,10 +646,9 @@
 
         if (!asynchronous) {
             // Create selector
-            String jmsId = sendJmsMsg.getJMSMessageID();
-            String selector = MSG_SELECTOR_START + jmsId + MSG_SELECTOR_END;
+            String selector = useSelector ? (MSG_SELECTOR_START + sendJmsMsg.getJMSCorrelationID()
+ MSG_SELECTOR_END) : null;
             // Receiving JMS Message, Creating and Returning NormalizedMessage out
-            Message receiveJmsMsg = template.receiveSelected(replyDest, selector);
+            Message receiveJmsMsg = receiveSelected(session, replyDest, selector);
             if (receiveJmsMsg == null) {
                 throw new IllegalStateException("Unable to receive response");
             }
@@ -678,11 +684,53 @@
         }
     }
 
+    private void send(final Session session, final Destination dest, final Message message)
throws JmsException {
+        // Do not call directly the template to avoid the cost of creating a new connection
/ session
+//        template.send(dest, new MessageCreator() {
+//            public Message createMessage(Session session) throws JMSException {
+//                return message;
+//            }
+//        });
+        try {
+            Method method = JmsTemplate.class.getDeclaredMethod("doSend", Session.class,
Destination.class, MessageCreator.class);
+            method.setAccessible(true);
+            method.invoke(template, session, dest, new MessageCreator() {
+                public Message createMessage(Session session) throws JMSException {
+                    return message;
+                }
+            });
+        } catch (NoSuchMethodException e) {
+            throw new RuntimeException(e);
+        } catch (IllegalAccessException e) {
+            throw new RuntimeException(e);
+        } catch (InvocationTargetException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private Message receiveSelected(final Session session,
+                                    final Destination dest,
+                                    final String messageSelector) throws JMSException {
+        // Do not call directly the template to avoid the cost of creating a new connection
/ session
+//        return template.doReceive(session, dest, messageSelector);
+        try {
+            Method method = JmsTemplate.class.getDeclaredMethod("doReceive", Session.class,
Destination.class, String.class);
+            method.setAccessible(true);
+            return (Message) method.invoke(template, session, dest, messageSelector);
+        } catch (NoSuchMethodException e) {
+            throw new RuntimeException(e);
+        } catch (IllegalAccessException e) {
+            throw new RuntimeException(e);
+        } catch (InvocationTargetException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
     /**
      * Process a JMS response message.
      * This method delegates to the marshaler for the JBI out message creation
      * and sends it in to the NMR.
-     * 
+     *
      * @param message
      */
     protected void onMessage(Message message) {
@@ -747,20 +795,12 @@
      * @throws JMSException
      */
     protected Destination getDestination(MessageExchange exchange, Object message, Session
session) throws JMSException {
-        return chooseDestination(exchange, message, session, destinationChooser, destination);
-    }
-
-    /**
-     * Choose the JMS destination for the reply message
-     *
-     * @param exchange
-     * @param message
-     * @param session
-     * @return
-     * @throws JMSException
-     */
-    protected Destination getReplyDestination(MessageExchange exchange, Object message, Session
session) throws JMSException {
-        return chooseDestination(exchange, message, session, replyDestinationChooser, replyDestination);
+        Destination dest = chooseDestination(exchange, message, session, destinationChooser,
+                                             destination != null ? destination : destinationName);
+        if (dest == null) {
+            throw new IllegalStateException("Unable to choose a destination for exchange
" + exchange);
+        }
+        return dest;
     }
 
     /**
@@ -777,7 +817,7 @@
                                             Object message,
                                             Session session,
                                             DestinationChooser chooser,
-                                            Destination defaultDestination) throws JMSException
{
+                                            Object defaultDestination) throws JMSException
{
         Object dest = null;
         // Let the replyDestinationChooser a chance to choose the destination
         if (chooser != null) {
@@ -791,11 +831,11 @@
         if (dest instanceof Destination) {
             return (Destination) dest;
         } else if (dest instanceof String) {
-            return destinationResolver.resolveDestinationName(session, 
-                                                              (String) dest, 
+            return destinationResolver.resolveDestinationName(session,
+                                                              (String) dest,
                                                               isPubSubDomain());
         }
-        throw new IllegalStateException("Unable to choose a destination for exchange " +
exchange);
+        return null;
     }
 
     /**
@@ -812,26 +852,26 @@
             store = storeFactory.open(getService().toString() + getEndpoint());
         }
         template = createTemplate();
-        // Obtain the default destination
-        if (destination == null && destinationName != null) {
-            destination = (Destination) template.execute(new SessionCallback() {
-                public Object doInJms(Session session) throws JMSException {
-                    return destinationResolver.resolveDestinationName(session, destinationName,
isPubSubDomain());
-                }
-            });
+    }
+
+    protected synchronized void createAndStartListener() throws Exception {
+        if (listenerContainer == null) {
+            // create the listener container
+            listenerContainer = createListenerContainer();
+            listenerContainer.start();
         }
-        
     }
 
     /**
      * Stops this endpoint.
-     * 
+     *
      * @throws Exception
      */
     public synchronized void deactivate() throws Exception {
         if (listenerContainer != null) {
             listenerContainer.stop();
             listenerContainer.shutdown();
+            listenerContainer = null;
         }
         if (store != null) {
             if (storeFactory != null) {
@@ -844,7 +884,7 @@
 
     /**
      * Validate this endpoint.
-     * 
+     *
      * @throws DeploymentException
      */
     public void validate() throws DeploymentException {
@@ -896,7 +936,7 @@
 
     /**
      * Create the message listener container to receive response messages.
-     * 
+     *
      * @return
      */
     protected AbstractMessageListenerContainer createListenerContainer() {
@@ -907,12 +947,12 @@
             cont = new DefaultMessageListenerContainer();
         }
         cont.setConnectionFactory(getConnectionFactory());
-        Destination replyDest = getReplyDestination();
-        if (replyDest == null) {
-        	replyDest = resolveOrCreateDestination(template, replyDestinationName, isPubSubDomain());
-        	setReplyDestination(replyDest);
+        if (replyDestination != null) {
+            cont.setDestination(replyDestination);
+        }
+        if (replyDestinationName != null) {
+            cont.setDestinationName(replyDestinationName);
         }
-        cont.setDestination(replyDest);
         cont.setPubSubDomain(isPubSubDomain());
         cont.setPubSubNoLocal(isPubSubNoLocal());
         cont.setMessageListener(new MessageListener() {
@@ -924,32 +964,5 @@
         cont.afterPropertiesSet();
         return cont;
     }
-    
-    /**
-     * If the destinationName given is null then a temporary destination is created else
the destination name
-     * is resolved using the resolver from the jmsConfig
-     *
-     * @param jmsTemplate template to use for session and resolver
-     * @param replyToDestinationName null for temporary destination or a destination name
-     * @param pubSubDomain true=pubSub, false=Queues
-     * @return resolved destination
-     */
-    private Destination resolveOrCreateDestination(final JmsTemplate jmsTemplate,
-                                                          final String replyToDestinationName,
-                                                          final boolean pubSubDomain) {
-        return (Destination)jmsTemplate.execute(new SessionCallback() {
-            public Object doInJms(Session session) throws JMSException {
-                if (replyToDestinationName == null) {
-                        if (destination instanceof Queue) {
-                        return session.createTemporaryQueue();
-                    } else {
-                        return session.createTemporaryTopic();
-                    }
-                }
-                DestinationResolver resolv = jmsTemplate.getDestinationResolver();
-                return resolv.resolveDestinationName(session, replyToDestinationName, pubSubDomain);
-            }
-        });
-    }
 
 }

Modified: servicemix/components/bindings/servicemix-jms/trunk/src/test/java/org/apache/servicemix/jms/JmsProviderEndpointTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-jms/trunk/src/test/java/org/apache/servicemix/jms/JmsProviderEndpointTest.java?rev=734395&r1=734394&r2=734395&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-jms/trunk/src/test/java/org/apache/servicemix/jms/JmsProviderEndpointTest.java
(original)
+++ servicemix/components/bindings/servicemix-jms/trunk/src/test/java/org/apache/servicemix/jms/JmsProviderEndpointTest.java
Wed Jan 14 05:47:39 2009
@@ -31,7 +31,6 @@
 import javax.jms.TextMessage;
 import javax.xml.namespace.QName;
 
-import org.apache.activemq.pool.PooledConnectionFactory;
 import org.apache.servicemix.common.JbiConstants;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
@@ -128,7 +127,7 @@
         endpoint.setService(new QName("uri:HelloWorld", "HelloService"));
         endpoint.setEndpoint("HelloPort");
         endpoint.setDestinationName("destination");
-        endpoint.setConnectionFactory(new PooledConnectionFactory(connectionFactory));
+        endpoint.setConnectionFactory(connectionFactory);
         component.setEndpoints(new JmsProviderEndpoint[] {endpoint});
         container.activateComponent(component, "servicemix-jms");
 
@@ -246,7 +245,7 @@
         JmsSoapProviderEndpoint endpoint = new JmsSoapProviderEndpoint();
         endpoint.setService(new QName("uri:HelloWorld", "HelloService"));
         endpoint.setEndpoint("HelloPort");
-        endpoint.setConnectionFactory(new PooledConnectionFactory(connectionFactory));
+        endpoint.setConnectionFactory(connectionFactory);
         endpoint.setDestinationName("destination");
         endpoint.setWsdl(new ClassPathResource("org/apache/servicemix/jms/HelloWorld-RPC.wsdl"));
         component.setEndpoints(new JmsProviderEndpoint[] {endpoint});



Mime
View raw message