Hi Daryoush, DId you manage to get this working? It looks like the Spring or CXF code is creating a temporary destination with one session and then using it with another, which unfortunately wont work due to the clients use of exclusive auto-delete queues under the covers.
If you set a named replyDestination that should help get it going, and if you use the Address syntax covered at http://qpid.apache.org/books/0.12/Programming-In-Apache-Qpid/html/ch02s04.html you should still be able to set it to delete when the consumer is closed if required. Robbie On 14 November 2011 21:03, Daryoush Mehrtash <[email protected]> wrote: > I am trying to replace ActiveMQ messaging with Qpdi in the Apache CXF's > SOAP over JMS demo application without much success. When I try to run > the client, i get: "Cannot consume from a temporary destination created > on another session" > > My starting point is the Spring based, CXF demo that uses configuration > based on: http://cxf.apache.org/docs/using-the-jmsconfigfeature.html > > I have changed that connection factory and jmsConfig beans to qpid > classes. as below: > > > >> <bean id="jmsConnectionFactory" >> class="org.apache.qpid.client.AMQConnectionFactory"> >> <constructor-arg index="0" >> value = "amqp://guest:guest@clientid >> /test?brokerlist='tcp://localhost:5672'" >> /> >> </bean> >> >> <bean id="jmsConfig" >> class="org.apache.cxf.transport.jms.JMSConfiguration" >> p:connectionFactory-ref="jmsConnectionFactory" >> p:targetDestination="XXX"/> > > >> <jaxws:client id="customerService" >> address="jms://" >> serviceClass="com.example.customerservice.CustomerService"> >> <jaxws:features> >> <bean class="org.apache.cxf.feature.LoggingFeature" /> >> <bean class="org.apache.cxf.transport.jms.JMSConfigFeature" >> p:jmsConfig-ref="jmsConfig" /> >> </jaxws:features> >> </jaxws:client> > > > The same configuration is used on client and server. > > When I run the server it all comes up ok. The client appears to send > the message to the server, the server sends its response back, but the > client fails to read the response. Complaining that " Cannot consume from > a temporary destination created on another session" > > > > Any ideas? > > > This is the client exception that I get: > > > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occured during JMS processing; nested exception is javax.jms.JMSException: > Cannot consume from a temporary destination created on another session > at > org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316) > at > org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168) > at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469) > at > org.springframework.jms.core.JmsTemplate.receiveSelected(JmsTemplate.java:695) > at org.apache.cxf.transport.jms.JMSConduit.sendExchange(JMSConduit.java:229) > at > org.apache.cxf.transport.jms.JMSOutputStream.doClose(JMSOutputStream.java:56) > at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:192) > at > org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47) > at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:195) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:535) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:465) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:368) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:321) > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88) > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) > at $Proxy47.getCustomersByName(Unknown Source) > at > com.example.customerservice.client.CustomerServiceTester.testCustomerService(CustomerServiceTester.java:49) > at > com.example.customerservice.client.CustomerServiceSpringClient.main(CustomerServiceSpringClient.java:36) > Caused by: javax.jms.JMSException: Cannot consume from a temporary > destination created on another session > at > org.apache.qpid.client.AMQSession.checkTemporaryDestination(AMQSession.java:2392) > at > org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:1978) > at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:987) > at > org.springframework.jms.core.JmsTemplate.createConsumer(JmsTemplate.java:993) > at org.springframework.jms.core.JmsTemplate.doReceive(JmsTemplate.java:722) > at org.springframework.jms.core.JmsTemplate$9.doInJms(JmsTemplate.java:697) > at org.springframework.jms.core.JmsTemplate$9.doInJms(JmsTemplate.java:1) > at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466) > > > > Thanks, > > Daryoush > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
