camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Mueller <christian.muel...@gmail.com>
Subject Camel-jms and ConsumerTemplate cause: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#3) disposed
Date Mon, 13 Sep 2010 18:00:48 GMT

Hello Guys,

not sure if this is a Spring, ActiveMq or Camel issue. I use Camel
2.2.0-fuse-02-00 and wrote a test like the following one. The issue is
reproduceable with this test. It occurs, if the connection factory is
defines in another spring application context file then the Active MQ.
component (We do this in this way, because in our test we define the
connection factory as in this configuration file but in production (using
FUSE ESB) is is looked up in the OSGI registry).

CamelSpringTestSupport .java:
public class IntegrationTest extends CamelSpringTestSupport {

    protected ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext(new String[]
{"/IntegrationTest-connectionFactory.xml", "/IntegrationTest.xml"});
    }
    
    @Test
    public void testCustomJMSReplyToInOut() throws Exception {
        template.sendBody("direct:start", "hello");

        String result = consumer.receiveBodyNoWait("activemq:queue:result",
String.class);
        assertEquals("hello", result);
    }
}


IntegrationTest-connectionFactory.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">

  <bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL"
value="vm://localhost?broker.persistent=false&amp;broker.useJmx=false" />
  </bean>
</beans>


IntegrationTest.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">

  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <route>
      <from uri="direct:start" />
      <to uri="direct:sub" />
    </route>

    <route>
      <from uri="direct:sub" />
      <to uri="activemq:queue:result" />
    </route>
  </camelContext>

  <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="connectionFactory" ref="connectionFactory" />
  </bean>
</beans>


Log:
2010-09-13 19:49:17,874 [main           ] INFO 
ClassPathXmlApplicationContext - Refreshing
org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887];
startup date [Mon Sep 13 19:49:17 CEST 2010]; root of context hierarchy
2010-09-13 19:49:17,937 [main           ] INFO  XmlBeanDefinitionReader       
- Loading XML bean definitions from class path resource
[IntegrationTest-connectionFactory.xml]
2010-09-13 19:49:18,078 [main           ] INFO  XmlBeanDefinitionReader       
- Loading XML bean definitions from class path resource
[IntegrationTest.xml]
2010-09-13 19:49:18,171 [main           ] INFO  CamelNamespaceHandler         
- camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
2010-09-13 19:49:18,171 [main           ] DEBUG CamelNamespaceHandler         
- Using org.apache.camel.spring.CamelContextFactoryBean as
CamelContextBeanDefinitionParser
2010-09-13 19:49:18,734 [main           ] DEBUG CamelNamespaceHandler         
- Registered default:
org.apache.camel.spring.CamelProducerTemplateFactoryBean with id: template
on camel context: camel
2010-09-13 19:49:18,750 [main           ] DEBUG CamelNamespaceHandler         
- Registered default:
org.apache.camel.spring.CamelConsumerTemplateFactoryBean with id:
consumerTemplate on camel context: camel
2010-09-13 19:49:18,750 [main           ] INFO 
ClassPathXmlApplicationContext - Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@195dd5b
2010-09-13 19:49:18,843 [main           ] DEBUG SpringCamelContext            
- Set the application context classloader to:
sun.misc.Launcher$AppClassLoader@11b86e7
2010-09-13 19:49:18,859 [main           ] DEBUG CamelContextFactoryBean       
- Found JAXB created routes: [Route[[From[direct:start]] ->
[To[direct:sub]]], Route[[From[direct:sub]] -> [To[activemq:queue:result]]]]
2010-09-13 19:49:18,859 [main           ] INFO  DefaultListableBeanFactory    
- Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@195dd5b:
defining beans
[connectionFactory,template,consumerTemplate,camel:beanPostProcessor,camel,activemq];
root of factory hierarchy
2010-09-13 19:49:18,937 [main           ] DEBUG SpringCamelContext            
- onApplicationEvent:
org.springframework.context.event.ContextRefreshedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887];
startup date [Mon Sep 13 19:49:17 CEST 2010]; root of context hierarchy]
2010-09-13 19:49:18,937 [main           ] INFO  DefaultCamelContext           
- Apache Camel 2.2.0-fuse-02-00 (CamelContext:camel) is starting
2010-09-13 19:49:18,937 [main           ] DEBUG SharedProducerServicePool     
- Starting service pool:
org.apache.camel.impl.SharedProducerServicePool@45c97b
2010-09-13 19:49:18,937 [main           ] INFO  DefaultCamelContext           
- JMX enabled. Using DefaultManagedLifecycleStrategy.
2010-09-13 19:49:19,031 [main           ] DEBUG DefaultManagementAgent        
- Starting JMX agent on server:
com.sun.jmx.mbeanserver.JmxMBeanServer@2d7440
2010-09-13 19:49:19,078 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=context,name="camel"
2010-09-13 19:49:19,109 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=services,name=DefaultTypeConverter(0x1198ff2)
2010-09-13 19:49:19,109 [main           ] DEBUG DefaultTypeConverter          
- Loading type converters ...
2010-09-13 19:49:19,125 [main           ] DEBUG
efaultPackageScanClassResolver - Searching for annotations of
org.apache.camel.Converter in packages: [org.apache.camel.component.file,
org.apache.camel.component.bean, org.apache.camel.converter,
org.apache.activemq.camel.converter,
org.apache.camel.component.cxf.converter]
2010-09-13 19:49:19,422 [main           ] DEBUG
efaultPackageScanClassResolver - Found: [class
org.apache.camel.component.file.GenericFileConverter, class
org.apache.camel.component.bean.BeanConverter, class
org.apache.camel.converter.AsyncProcessorConverter, class
org.apache.camel.converter.CamelConverter, class
org.apache.camel.converter.CollectionConverter, class
org.apache.camel.converter.IOConverter, class
org.apache.camel.converter.NIOConverter, class
org.apache.camel.converter.ObjectConverter, class
org.apache.camel.converter.jaxp.DomConverter, class
org.apache.camel.converter.jaxp.StaxConverter, class
org.apache.camel.converter.jaxp.StreamSourceConverter, class
org.apache.camel.converter.jaxp.XmlConverter, class
org.apache.camel.converter.stream.StreamCacheConverter, class
org.apache.activemq.camel.converter.ActiveMQConverter, class
org.apache.activemq.camel.converter.ActiveMQMessageConverter, class
org.apache.camel.component.cxf.converter.CxfConverter]
2010-09-13 19:49:19,422 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.component.file.GenericFileConverter
2010-09-13 19:49:19,422 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.component.bean.BeanConverter
2010-09-13 19:49:19,422 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.AsyncProcessorConverter
2010-09-13 19:49:19,422 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.CamelConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.CollectionConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.IOConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.NIOConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.ObjectConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.jaxp.DomConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.jaxp.StaxConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.jaxp.StreamSourceConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.jaxp.XmlConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.converter.stream.StreamCacheConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.activemq.camel.converter.ActiveMQConverter
2010-09-13 19:49:19,437 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.activemq.camel.converter.ActiveMQMessageConverter
2010-09-13 19:49:19,453 [main           ] DEBUG
AnnotationTypeConverterLoader  - Loading converter class:
org.apache.camel.component.cxf.converter.CxfConverter
2010-09-13 19:49:19,468 [main           ] DEBUG DefaultTypeConverter          
- Loading type converters done
2010-09-13 19:49:19,468 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=services,name=DefaultInflightRepository(0x775121)
2010-09-13 19:49:19,484 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=services,name=DefaultShutdownStrategy(0x16f70a4)
2010-09-13 19:49:19,484 [main           ] DEBUG DefaultComponentResolver      
- Found component: direct via type:
org.apache.camel.component.direct.DirectComponent via:
META-INF/services/org/apache/camel/component/direct
2010-09-13 19:49:19,484 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=components,name="direct"
2010-09-13 19:49:19,484 [main           ] DEBUG DefaultComponent              
- Creating endpoint uri=[direct://start], path=[start], parameters=[{}]
2010-09-13 19:49:19,500 [main           ] DEBUG DefaultCamelContext           
- direct://start converted to endpoint: Endpoint[direct://start] by
component: org.apache.camel.component.direct.DirectComponent@7a36a2
2010-09-13 19:49:19,500 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="direct://start"
2010-09-13 19:49:19,500 [main           ] DEBUG DefaultComponent              
- Creating endpoint uri=[direct://sub], path=[sub], parameters=[{}]
2010-09-13 19:49:19,500 [main           ] DEBUG DefaultCamelContext           
- direct://sub converted to endpoint: Endpoint[direct://sub] by component:
org.apache.camel.component.direct.DirectComponent@7a36a2
2010-09-13 19:49:19,500 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="direct://sub"
2010-09-13 19:49:19,578 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=tracer,name=Tracer(0xabe654)
2010-09-13 19:49:19,609 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=errorhandlers,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)"
2010-09-13 19:49:19,609 [main           ] DEBUG DefaultComponentResolver      
- Found component: activemq in registry:
org.apache.activemq.camel.component.ActiveMQComponent@d0d12e
2010-09-13 19:49:19,609 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=components,name="activemq"
2010-09-13 19:49:19,609 [main           ] DEBUG DefaultComponent              
- Creating endpoint uri=[activemq://queue:result], path=[queue:result],
parameters=[{}]
2010-09-13 19:49:19,625 [main           ] DEBUG DefaultCamelContext           
- activemq://queue:result converted to endpoint:
Endpoint[activemq://queue:result] by component:
org.apache.activemq.camel.component.ActiveMQComponent@d0d12e
2010-09-13 19:49:19,672 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="activemq://queue:result"
2010-09-13 19:49:19,672 [main           ] DEBUG DefaultComponent              
- Creating endpoint uri=[spring-event://default], path=[default],
parameters=[{}]
2010-09-13 19:49:19,672 [main           ] DEBUG DefaultCamelContext           
- spring-event://default converted to endpoint:
Endpoint[spring-event://default] by component:
org.apache.camel.component.event.EventComponent@ad6513
2010-09-13 19:49:19,672 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="spring-event://default"
2010-09-13 19:49:19,672 [main           ] DEBUG DefaultCamelContext           
- Starting routes...
2010-09-13 19:49:19,687 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=routes,name="route1"
2010-09-13 19:49:19,719 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=processors,name=SendProcessor(0x19646fd)
2010-09-13 19:49:19,719 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=routes,name="route2"
2010-09-13 19:49:19,734 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=processors,name=SendProcessor(0x1e16483)
2010-09-13 19:49:19,734 [main           ] DEBUG DefaultCamelContext           
- Starting consumer (order: 1000) on route: route1
2010-09-13 19:49:19,734 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=consumers,name=DirectConsumer(0x14b9a74)
2010-09-13 19:49:19,734 [main           ] DEBUG DirectConsumer                
- Starting consumer: Consumer[direct://start]
2010-09-13 19:49:19,734 [main           ] DEBUG DefaultCamelContext           
- Starting consumer (order: 1001) on route: route2
2010-09-13 19:49:19,750 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=consumers,name=DirectConsumer(0x14b081b)
2010-09-13 19:49:19,750 [main           ] DEBUG DirectConsumer                
- Starting consumer: Consumer[direct://sub]
2010-09-13 19:49:19,750 [main           ] DEBUG DefaultCamelContext           
- Route 0: EventDrivenConsumerRoute[Endpoint[direct://start] ->
Instrumentation:route[UnitOfWork(Channel[sendTo(Endpoint[direct://sub])])]]
2010-09-13 19:49:19,750 [main           ] DEBUG DefaultCamelContext           
- Route 1: EventDrivenConsumerRoute[Endpoint[direct://sub] ->
Instrumentation:route[UnitOfWork(Channel[sendTo(Endpoint[activemq://queue:result])])]]
2010-09-13 19:49:19,750 [main           ] DEBUG DefaultCamelContext           
- ... Routes started
2010-09-13 19:49:19,750 [main           ] INFO  DefaultCamelContext           
- Started 2 routes
2010-09-13 19:49:19,750 [main           ] INFO  DefaultCamelContext           
- Apache Camel 2.2.0-fuse-02-00 (CamelContext:camel) started
2010-09-13 19:49:19,750 [main           ] DEBUG DefaultCamelContext           
- Adding routes from builder: Routes: []
2010-09-13 19:49:19,765 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=producers,name=DirectProducer(0x1f217ec)
2010-09-13 19:49:19,765 [main           ] DEBUG DirectProducer                
- Starting producer: Producer[direct://start]
2010-09-13 19:49:19,765 [main           ] DEBUG ProducerCache                 
- Adding to producer cache with key: Endpoint[direct://start] for producer:
Producer[direct://start]
2010-09-13 19:49:19,765 [main           ] DEBUG ProducerCache                 
- >>>> Endpoint[direct://start] Exchange[Message: hello]
2010-09-13 19:49:19,859 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=producers,name=DirectProducer(0x1d5b89c)
2010-09-13 19:49:19,859 [main           ] DEBUG DirectProducer                
- Starting producer: Producer[direct://sub]
2010-09-13 19:49:19,859 [main           ] DEBUG ProducerCache                 
- Adding to producer cache with key: Endpoint[direct://sub] for producer:
Producer[direct://sub]
2010-09-13 19:49:19,875 [main           ] DEBUG DefaultManagementAgent        
- Registered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=producers,name=JmsProducer(0xac06d4)
2010-09-13 19:49:19,875 [main           ] DEBUG JmsProducer                   
- Starting producer: Producer[activemq://queue:result]
2010-09-13 19:49:19,875 [main           ] DEBUG ProducerCache                 
- Adding to producer cache with key: Endpoint[activemq://queue:result] for
producer: Producer[activemq://queue:result]
2010-09-13 19:49:19,937 [main           ] INFO  BrokerService                 
- Using Persistence Adapter: MemoryPersistenceAdapter
2010-09-13 19:49:19,937 [main           ] INFO  BrokerService                 
- ActiveMQ 5.3.1-fuse-02-00 JMS Message Broker (localhost) is starting
2010-09-13 19:49:19,937 [main           ] INFO  BrokerService                 
- For help or more information please see: http://activemq.apache.org/
2010-09-13 19:49:20,094 [main           ] INFO  BrokerService                 
- ActiveMQ JMS Message Broker (localhost,
ID:defm-ar063470-1372-1284400159969-0:0) started
2010-09-13 19:49:20,094 [main           ] DEBUG VMTransportFactory            
- binding to broker: localhost
2010-09-13 19:49:20,109 [main           ] INFO  TransportConnector            
- Connector vm://localhost Started
2010-09-13 19:49:20,125 [VMTransport    ] DEBUG TransportConnection           
- Setting up new connection id: ID:defm-ar063470-1372-1284400159969-2:0,
address: vm://localhost#0
2010-09-13 19:49:20,140 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: topic://ActiveMQ.Advisory.Connection
2010-09-13 19:49:20,156 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding consumer: ID:defm-ar063470-1372-1284400159969-2:0:-1:1
for destination:
topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
2010-09-13 19:49:20,187 [main           ] DEBUG
Configuration$CamelJmsTemplate - Executing callback on JMS Session:
ActiveMQSession {id=ID:defm-ar063470-1372-1284400159969-2:0:1,started=false}
2010-09-13 19:49:20,203 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: queue://result
2010-09-13 19:49:20,203 [main           ] DEBUG
Configuration$CamelJmsTemplate - Sending JMS message to: queue://result with
message: ActiveMQTextMessage {commandId = 0, responseRequired = false,
messageId = null, originalDestination = null, originalTransactionId = null,
producerId = null, destination = null, transactionId = null, expiration = 0,
timestamp = 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0,
correlationId = null, replyTo = null, persistent = false, type = null,
priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null,
compressed = false, userID = null, content = null, marshalledProperties =
null, dataStructure = null, redeliveryCounter = 0, size = 0, properties =
null, readOnlyProperties = false, readOnlyBody = false, droppable = false,
text = hello}
2010-09-13 19:49:20,219 [VMTransport    ] DEBUG Queue                         
- result toPageIn: 0, Inflight: 0, pagedInMessages.size 0, enqueueSize: 0
2010-09-13 19:49:20,219 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: topic://ActiveMQ.Advisory.Queue
2010-09-13 19:49:20,219 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination:
topic://ActiveMQ.Advisory.Producer.Queue.result
2010-09-13 19:49:20,219 [BrokerService  ] DEBUG Queue                         
- result toPageIn: 1, Inflight: 0, pagedInMessages.size 0, enqueueSize: 1
2010-09-13 19:49:20,234 [VMTransport    ] DEBUG AbstractRegion                
- localhost removing consumer: ID:defm-ar063470-1372-1284400159969-2:0:-1:1
for destination:
topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
2010-09-13 19:49:20,234 [VMTransport    ] DEBUG TransportConnection           
- remove connection id: ID:defm-ar063470-1372-1284400159969-2:0
2010-09-13 19:49:20,234 [main           ] DEBUG VMTransportFactory            
- Shutting down VM connectors for broker: localhost
2010-09-13 19:49:20,234 [ActiveMQ Task  ] DEBUG TransportConnection           
- Stopping connection: vm://localhost#0
2010-09-13 19:49:20,234 [main           ] INFO  TransportConnector            
- Connector vm://localhost Stopped
2010-09-13 19:49:20,234 [ActiveMQ Task  ] DEBUG TransportConnection           
- Stopped transport: vm://localhost#0
2010-09-13 19:49:20,234 [ActiveMQ Task  ] DEBUG TransportConnection           
- Connection Stopped: vm://localhost#0
2010-09-13 19:49:20,234 [main           ] INFO  BrokerService                 
- ActiveMQ Message Broker (localhost,
ID:defm-ar063470-1372-1284400159969-0:0) is shutting down
2010-09-13 19:49:20,234 [ol Timeout Task] DEBUG Queue                         
- Producer Flow Control Timeout Task is stopping
2010-09-13 19:49:20,250 [main           ] INFO  BrokerService                 
- ActiveMQ JMS Message Broker (localhost,
ID:defm-ar063470-1372-1284400159969-0:0) stopped
2010-09-13 19:49:20,250 [main           ] DEBUG ConsumerCache                 
- <<<< Endpoint[activemq://queue:result]
2010-09-13 19:49:20,250 [main           ] DEBUG ConsumerCache                 
- Adding to consumer cache with key: Endpoint[activemq://queue:result] for
consumer: PollingConsumer on Endpoint[activemq://queue:result]
2010-09-13 19:49:20,250 [main           ] INFO  BrokerService                 
- Using Persistence Adapter: MemoryPersistenceAdapter
2010-09-13 19:49:20,250 [main           ] INFO  BrokerService                 
- ActiveMQ 5.3.1-fuse-02-00 JMS Message Broker (localhost) is starting
2010-09-13 19:49:20,250 [main           ] INFO  BrokerService                 
- For help or more information please see: http://activemq.apache.org/
2010-09-13 19:49:20,250 [main           ] INFO  BrokerService                 
- ActiveMQ JMS Message Broker (localhost,
ID:defm-ar063470-1372-1284400159969-0:1) started
2010-09-13 19:49:20,250 [main           ] DEBUG VMTransportFactory            
- binding to broker: localhost
2010-09-13 19:49:20,250 [main           ] INFO  TransportConnector            
- Connector vm://localhost Started
2010-09-13 19:49:20,250 [VMTransport    ] DEBUG TransportConnection           
- Setting up new connection id: ID:defm-ar063470-1372-1284400159969-2:1,
address: vm://localhost#2
2010-09-13 19:49:20,250 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: topic://ActiveMQ.Advisory.Connection
2010-09-13 19:49:20,250 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding consumer: ID:defm-ar063470-1372-1284400159969-2:1:-1:1
for destination:
topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
2010-09-13 19:49:20,250 [main           ] DEBUG
Configuration$CamelJmsTemplate - Executing callback on JMS Session:
ActiveMQSession {id=ID:defm-ar063470-1372-1284400159969-2:1:1,started=true}
2010-09-13 19:49:20,265 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding consumer: ID:defm-ar063470-1372-1284400159969-2:1:1:1 for
destination: queue://result
2010-09-13 19:49:20,265 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: queue://result
2010-09-13 19:49:20,265 [VMTransport    ] DEBUG Queue                         
- result toPageIn: 0, Inflight: 0, pagedInMessages.size 0, enqueueSize: 0
2010-09-13 19:49:20,265 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: topic://ActiveMQ.Advisory.Queue
2010-09-13 19:49:20,265 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination: queue://result
2010-09-13 19:49:20,265 [VMTransport    ] DEBUG AbstractRegion                
- localhost adding destination:
topic://ActiveMQ.Advisory.Consumer.Queue.result
2010-09-13 19:49:20,281 [main           ] INFO  ActiveMQMessageConsumer       
- remove: ID:defm-ar063470-1372-1284400159969-2:1:1:1,
lasteDeliveredSequenceId:0
2010-09-13 19:49:20,281 [VMTransport    ] DEBUG AbstractRegion                
- localhost removing consumer: ID:defm-ar063470-1372-1284400159969-2:1:1:1
for destination: queue://result
2010-09-13 19:49:20,281 [VMTransport    ] DEBUG Queue                         
- remove sub: QueueSubscription:
consumer=ID:defm-ar063470-1372-1284400159969-2:1:1:1, destinations=1,
dispatched=0, delivered=0, pending=0, lastDeliveredSeqId: 0, dequeues: 0,
dispatched: 0, inflight: 0
2010-09-13 19:49:20,281 [VMTransport    ] DEBUG AbstractRegion                
- localhost removing consumer: ID:defm-ar063470-1372-1284400159969-2:1:-1:1
for destination:
topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
2010-09-13 19:49:20,281 [VMTransport    ] DEBUG TransportConnection           
- remove connection id: ID:defm-ar063470-1372-1284400159969-2:1
2010-09-13 19:49:20,281 [main           ] DEBUG Transport                     
- Transport failed:
org.apache.activemq.transport.TransportDisposedIOException: Peer
(vm://localhost#3) disposed.
org.apache.activemq.transport.TransportDisposedIOException: Peer
(vm://localhost#3) disposed.
	at org.apache.activemq.transport.vm.VMTransport.stop(VMTransport.java:160)
	at
org.apache.activemq.transport.vm.VMTransportServer$1.stop(VMTransportServer.java:81)
	at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:64)
	at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:64)
	at
org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)
	at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
	at
org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:642)
	at
org.springframework.jms.connection.ConnectionFactoryUtils.releaseConnection(ConnectionFactoryUtils.java:81)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:478)
	at
org.springframework.jms.core.JmsTemplate.receiveSelected(JmsTemplate.java:708)
	at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:686)
	at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:677)
	at
org.apache.camel.component.jms.JmsPollingConsumer.receive(JmsPollingConsumer.java:71)
	at
org.apache.camel.component.jms.JmsPollingConsumer.receiveNoWait(JmsPollingConsumer.java:53)
	at
org.apache.camel.impl.ConsumerCache.receiveNoWait(ConsumerCache.java:103)
	at
org.apache.camel.impl.DefaultConsumerTemplate.receiveNoWait(DefaultConsumerTemplate.java:72)
	at
org.apache.camel.impl.DefaultConsumerTemplate.receiveBodyNoWait(DefaultConsumerTemplate.java:98)
	at
org.apache.camel.impl.DefaultConsumerTemplate.receiveBodyNoWait(DefaultConsumerTemplate.java:125)
	at IntegrationTest.testCustomJMSReplyToInOut(IntegrationTest.java:18)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
	at
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
	at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
	at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
	at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
	at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
	at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
	at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
2010-09-13 19:49:20,281 [main           ] DEBUG VMTransportFactory            
- Shutting down VM connectors for broker: localhost
2010-09-13 19:49:20,281 [ActiveMQ Task  ] DEBUG TransportConnection           
- Stopping connection: vm://localhost#2
2010-09-13 19:49:20,281 [ActiveMQ Task  ] DEBUG TransportConnection           
- Stopped transport: vm://localhost#2
2010-09-13 19:49:20,281 [ActiveMQ Task  ] DEBUG TransportConnection           
- Connection Stopped: vm://localhost#2
2010-09-13 19:49:20,281 [main           ] INFO  TransportConnector            
- Connector vm://localhost Stopped
2010-09-13 19:49:20,281 [main           ] INFO  BrokerService                 
- ActiveMQ Message Broker (localhost,
ID:defm-ar063470-1372-1284400159969-0:1) is shutting down
2010-09-13 19:49:20,281 [ol Timeout Task] DEBUG Queue                         
- Producer Flow Control Timeout Task is stopping
2010-09-13 19:49:20,281 [main           ] INFO  BrokerService                 
- ActiveMQ JMS Message Broker (localhost,
ID:defm-ar063470-1372-1284400159969-0:1) stopped
2010-09-13 19:49:20,281 [main           ] INFO  DefaultCamelContext           
- Apache Camel 2.2.0-fuse-02-00 (CamelContext:camel) is stopping
2010-09-13 19:49:20,281 [main           ] INFO  DefaultShutdownStrategy       
- Starting to graceful shutdown routes (timeout 10 seconds)
2010-09-13 19:49:20,297 [0: ShutdownTask] DEBUG DefaultShutdownStrategy       
- There are 2 routes to shutdown
2010-09-13 19:49:20,297 [0: ShutdownTask] DEBUG DirectConsumer                
- Stopping consumer: Consumer[direct://start]
2010-09-13 19:49:20,297 [0: ShutdownTask] DEBUG DefaultShutdownStrategy       
- Shutdown complete for: Consumer[direct://start]
2010-09-13 19:49:20,297 [0: ShutdownTask] INFO  DefaultShutdownStrategy       
- Route: route1 shutdown complete.
2010-09-13 19:49:20,297 [0: ShutdownTask] DEBUG DirectConsumer                
- Stopping consumer: Consumer[direct://sub]
2010-09-13 19:49:20,297 [0: ShutdownTask] DEBUG DefaultShutdownStrategy       
- Shutdown complete for: Consumer[direct://sub]
2010-09-13 19:49:20,297 [0: ShutdownTask] INFO  DefaultShutdownStrategy       
- Route: route2 shutdown complete.
2010-09-13 19:49:20,297 [main           ] INFO  DefaultShutdownStrategy       
- Graceful shutdown of routes completed in 0 seconds
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=consumers,name=DirectConsumer(0x14b081b)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=processors,name=SendProcessor(0x1e16483)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=consumers,name=DirectConsumer(0x14b9a74)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=processors,name=SendProcessor(0x19646fd)
2010-09-13 19:49:20,297 [main           ] DEBUG JmsProducer                   
- Stopping producer: Producer[activemq://queue:result]
2010-09-13 19:49:20,297 [main           ] DEBUG DirectProducer                
- Stopping producer: Producer[direct://sub]
2010-09-13 19:49:20,297 [main           ] DEBUG DirectProducer                
- Stopping producer: Producer[direct://start]
2010-09-13 19:49:20,297 [main           ] INFO  DefaultInflightRepository     
- Shutting down with no inflight exchanges.
2010-09-13 19:49:20,297 [main           ] DEBUG SharedProducerServicePool     
- Stopping service pool:
org.apache.camel.impl.SharedProducerServicePool@45c97b
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=routes,name="route2"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=services,name=DefaultTypeConverter(0x1198ff2)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=context,name="camel"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="activemq://queue:result"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=producers,name=DirectProducer(0x1d5b89c)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=components,name="direct"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="spring-event://default"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="direct://sub"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=errorhandlers,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=endpoints,name="direct://start"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=producers,name=JmsProducer(0xac06d4)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=producers,name=DirectProducer(0x1f217ec)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=components,name="activemq"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=services,name=DefaultShutdownStrategy(0x16f70a4)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=services,name=DefaultInflightRepository(0x775121)
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=routes,name="route1"
2010-09-13 19:49:20,297 [main           ] DEBUG DefaultManagementAgent        
- Unregistered MBean with objectname:
org.apache.camel:context=defm-ar063470/camel,type=tracer,name=Tracer(0xabe654)
2010-09-13 19:49:20,297 [main           ] INFO  DefaultCamelContext           
- Apache Camel 2.2.0-fuse-02-00 (CamelContext:camel) stopped
2010-09-13 19:49:20,297 [main           ] INFO 
ClassPathXmlApplicationContext - Closing
org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887];
startup date [Mon Sep 13 19:49:17 CEST 2010]; root of context hierarchy
2010-09-13 19:49:20,297 [main           ] DEBUG SpringCamelContext            
- onApplicationEvent:
org.springframework.context.event.ContextClosedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@1a1c887];
startup date [Mon Sep 13 19:49:17 CEST 2010]; root of context hierarchy]
2010-09-13 19:49:20,297 [main           ] INFO  DefaultListableBeanFactory    
- Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@195dd5b:
defining beans
[connectionFactory,template,consumerTemplate,camel:beanPostProcessor,camel,activemq];
root of factory hierarchy

If this is a camel issue, I would open a JIRA for it. If not, please give me
a hint who I should raise the issue (ActiveMQ, Spring, ...).

Thanks in advance,
Christian
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-jms-and-ConsumerTemplate-cause-org-apache-activemq-transport-TransportDisposedIOException-Peerd-tp2838098p2838098.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message