> > > > Are you totally positive you are using exactly the same transaction > manager and JMS connection factory in both cases?
Yes, 101%. This is my applicationContext.xml I run it as it is right now, and it fails. Messages are back in ems when I shutdown jboss. I then uncomment the empty camelcontext and DefaultMessageListenerContainer, comment out the camelcontext with the route and JmsComponent, clean build and redeploy, start jboss, consume a few messages, shutdown, no messages are now in ems. I can do this over and over again, the only change is in this file, and the behaviour is the same all the time. This is 1.2.0, same thing happens with 1.3-SNAPSHOT. I have eclipse setup with sourcecode, so it's easy for me to debug. And tip on where I should look? <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx=" http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util" xmlns:jee=" http://www.springframework.org/schema/jee" xmlns:context="http://www.springframework.org/schema/context" xmlns:camel="http://activemq.apache.org/camel/schema/spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring-1.2.0.xsd " default-autowire="no"> <context:component-scan base-package="se.lantmateriet.origo" /> <tx:annotation-driven /> <tx:jta-transaction-manager /> <jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:jms/jmsConnectionFactory" /> <!-- <camel:camelContext /> <bean id="updateServiceListenerContainer" class=" org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="concurrentConsumers" value="1" /> <property name="connectionFactory" ref="jmsConnectionFactory" /> <property name="transactionManager" ref="transactionManager" /> <property name="sessionTransacted" value="true" /> <property name="destinationName" value="foobar" /> <property name="messageListener"> <bean class=" org.springframework.jms.listener.adapter.MessageListenerAdapter"> <constructor-arg ref="updateService" /> </bean> </property> </bean> --> <camel:camelContext> <camel:route> <camel:from uri="jms:queue:foobar" /> <camel:to uri="bean:updateService" /> </camel:route> </camel:camelContext> <bean class="org.apache.camel.component.jms.JmsComponent"> <property name="concurrentConsumers" value="1" /> <property name="connectionFactory" ref="jmsConnectionFactory" /> <property name="transactionManager" ref="transactionManager" /> <property name="transacted" value="true" /> </bean> <bean id="scheduledTask" class=" org.springframework.scheduling.timer.ScheduledTimerTask"> <!-- wait 5 seconds before starting repeated execution --> <property name="delay" value="5000" /> <!-- run every 5 seconds --> <property name="period" value="5000" /> <property name="timerTask"> <bean id="doIt" class=" org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean"> <property name="targetObject" ref="updateService" /> <property name="targetMethod" value="send" /> </bean> </property> </bean> <bean id="timerFactory" class=" org.springframework.scheduling.timer.TimerFactoryBean"> <property name="scheduledTimerTasks"> <list> <!-- see the example above --> <ref bean="scheduledTask" /> </list> </property> </bean> </beans> -- /Magnus Heino
