I'm trying out some simple examples with Synapse and JMS. I'm using Active MQ and have just uncommented the example JMS connection configuration in axis2.xml to set this up:
I've got a simple synapse configuration working to pick up from JMS and send to a file as shown: <definitions xmlns="http://ws.apache.org/ns/synapse"> <proxy name="TestProxy" transports="jms"> <target> <inSequence> <property action="set" name="OUT_ONLY" value="true"/> </inSequence> <endpoint> <address uri="vfs:file:///D:\integrationtest\synapseoutput"/> </endpoint> <outSequence> <send/> </outSequence> </target> </proxy> </definitions> This creates a queue called TestProxy in JMS. Im trying to get this to use a different (existing) queue, but when I add the line <parameter name="transport.jms.Destination" locked="true" value="myTestQueue"/> to the proxy element synapse fails to start up and I get the stack trace below: 2008-10-01 15:10:51,099 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSConnectionFactory Connection factory : default initialized... 2008-10-01 15:10:51,099 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSConnectionFactory Connected to the JMS connection factory : TopicConnectionFactory 2008-10-01 15:10:51,115 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSConnectionFactory Connection factory : myTopicConnectionFactory initialized... 2008-10-01 15:10:51,115 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSConnectionFactory Connected to the JMS connection factory : QueueConnectionFactory 2008-10-01 15:10:51,130 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSConnectionFactory Connection factory : myQueueConnectionFactory initialized... 2008-10-01 15:10:51,130 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSListener JMS Listener started 2008-10-01 15:10:51,130 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] INFO JMSListener Starting to listen on destination : of type queue for service TestProxy 2008-10-01 15:10:51,130 [172.25.1.248-bfs-product-1] [WrapperSimpleAppMain] FATAL ServerManager Synaps startup failed... java.lang.ClassCastException: org.apache.activemq.jndi.ReadOnlyContext cannot be cast to javax.jms.Destination at org.apache.synapse.transport.jms.JMSConnectionFactory.getPhysicalDestination(JMSConnectionFactory.java:415) at org.apache.synapse.transport.jms.JMSConnectionFactory.getPhysicalDestinationName(JMSConnectionFactory.java:388) at org.apache.synapse.transport.jms.JMSConnectionFactory.addDestination(JMSConnectionFactory.java:135) at org.apache.synapse.transport.jms.JMSListener.startListeningForService(JMSListener.java:177) at org.apache.synapse.transport.base.AbstractTransportListener.internalStartListeningForService(AbstractTransportListener.java:180) at org.apache.synapse.transport.base.AbstractTransportListener.start(AbstractTransportListener.java:155) at org.apache.synapse.transport.jms.JMSListener.start(JMSListener.java:112) at org.apache.axis2.engine.ListenerManager.addListener(ListenerManager.java:206) at org.apache.synapse.ServerManager.start(ServerManager.java:129) at org.wso2.esb.ServiceBusManager.start(ServiceBusManager.java:195) at org.wso2.esb.transport.tomcat.StartUpServlet.init(StartUpServlet.java:73) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.startup.Embedded.start(Embedded.java:821) at org.wso2.esb.TomcatServer.start(TomcatServer.java:107) at org.wso2.esb.ServiceBus.main(ServiceBus.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) at java.lang.Thread.run(Unknown Source) Am I doing something fundamentally wrong here or is this a bug? (Also when I add the line <parameter name="transport.jms.ConnectionFactory" locked="true" value="myQueueConnectionFactory"/> It gives me a warning that the connection factory is invalid - synapse starts, but my service is disabled) Thanks for any help Dave Geary ________________________________ The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. The views and opinions expressed in this email may not reflect the views and opinions of any member of Lagan Technologies Limited, or any of its subsidiaries. Lagan Technologies Limited is a company registered in Northern Ireland with registration number NI 28773. The registered office of Lagan Technologies Limited is 209 Airport Road West, Belfast, Co. Antrim, BT3 9EZ.
