We may need to take a look at your route. From the exception I can tell is throw from JmsConsumer, I don't think it is related to the Recipient List.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, December 19, 2012 at 7:44 PM, danielaR wrote: > Hello, > I am using Dynamic Recipient List to send a message to a list of recipients, > but I need to send it to all or none ( if I cannot send to one of the > recipients because of an error, then the message should not reach any of > them). > In a previous solution (not using Camel, but EJBs), the sending was done in > a transaction, so I tried to apply the same solution and add transactions to > the jms component. However, I am getting this warning / error message: > > MQJMSRA_DS4001: commit():Illegal for a non-transacted > Session:sessionId=20894783696602880 > > INFO: WARN 806499 [Camel (camelContext) thread #4 - > JmsConsumer[jms/testQueue]] > apache.camel.component.jms.DefaultJmsMessageListenerContainer - Setup of > JMS message listener invoker failed for destination 'jms/testQueue' - trying > to recover. Cause: Could not commit JMS transaction; nested exception is > javax.jms.IllegalStateException: MQJMSRA_DS4001: commit():Illegal for a > non-transacted Session:sessionId=20894783696602880 > > This is my configuration (I have camel in a web application which I need to > deploy in glassfish). > > <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> > <property name="configuration" ref="jmsConfig"/> > </bean> > <bean id="jmsConfig" > class="org.apache.camel.component.jms.JmsConfiguration"> > <property name="connectionFactory" ref="myCamelConnectionFactory"/> > <property name="transactionManager" ref="jmsTransactionManager"/> > <property name="transacted" value="true"/> > <property name="destinationResolver"> > <bean > class="org.springframework.jms.support.destination.JndiDestinationResolver"/> > </property> > </bean> > > <bean id="jmsTransactionManager" > class="org.springframework.jms.connection.JmsTransactionManager"> > <property name="connectionFactory" ref="myCamelConnectionFactory"/> > </bean> > <jee:jndi-lookup id="myCamelConnectionFactory" > jndi-name="jms/CamelConnectionFactory"/> > > What am I missing? > And Is this the correct solution for my problem - send to all or none in > recipientList -? > > Thanks for your help. > Daniela Rotar > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/recipient-list-send-to-all-or-none-transactions-tp5724360.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
