[ https://issues.apache.org/activemq/browse/CAMEL-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52455#action_52455 ]
david durham edited comment on CAMEL-1751 at 6/24/09 4:00 PM: -------------------------------------------------------------- A coworker reported that the following JNDI configuration results in a client that does not hang Tomcat: <Resource name="jms/xx/ConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="tcp://xxcom:61616?daemon=true" brokerName="ActiveMQBroker"/> was (Author: david.durham...@gmail.com): A coworker reported that the following JNDI configuration results in a client that does not hang Tomcat: <Resource name="jms/PPM4/ConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="tcp://queue.coredemo.inwk.com:61616?daemon=true" brokerName="ActiveMQBroker"/> > Camel causes Tomcat shutdown to hang > ------------------------------------ > > Key: CAMEL-1751 > URL: https://issues.apache.org/activemq/browse/CAMEL-1751 > Project: Apache Camel > Issue Type: Bug > Affects Versions: 2.0-M1 > Environment: reproduceable on windows and linux > Reporter: david durham > Assignee: Hadrian Zbarcea > Fix For: 2.0.0 > > > issue is that if I execute DefaultCamelContext().start(), > the tomcat shutdown process will hang. > Here's my spring config. I have the following for 'inbound' return queues. > <bean id="returnQueues" class="com.ReturnedQueueRouteBuilder" > lazy-init="false" init-method="init" destroy-method="stop"> > <property name="routes"> > <map> > <entry key="${a.returnQueue.name}"> > <bean class="com.ReturnedAProcessor"> > <property name="x" ref="y" /> > </bean> > </entry> > <entry key="${b.returnQueue.name}"> > <bean class="com.ReturnedBProcessor"> > <property name="x" ref="y /> > </bean> > </entry> > </map> > </property> > <property name="camelContext" ref="camelContext" /> > <property name="activeMQName" value="${queue.activeMQInstance}" /> > <property name="remoteAddress" value="${queue.remoteAddress}" /> > </bean> > <bean id="camelContext" class="org.apache.camel.impl.DefaultCamelContext" /> > ReturnQueueRouteBuilder looks like: > public class ReturnedQueueRouteBuilder extends RouteBuilder { > ... > public void init() { > camelContext.addComponent(activeMQName.trim(), > ActiveMQComponent.activeMQComponent(remoteAddress.trim())); > try { > camelContext.addRoutes(this); > camelContext.start(); > } catch (Exception e) { > log.error(e); > } > } > public void stop() { > try { > camelContext.stop(); > } catch (Exception e) { > log.error(e); > } > } > @Override > public void configure() throws Exception { > for (Map.Entry<String, Processor> route : routes.entrySet()) { > from(route.getKey()).process(route.getValue()); > } > } > I also see the following stack trace on tomcat shutdown, but I do not think > this is directly the cause. > Exception in thread "InactivityMonitor WriteCheck" > java.lang.NoClassDefFoundError: > org/apache/activemq/transport/InactivityMonitor$3 > at > org.apache.activemq.transport.InactivityMonitor.writeCheck(InactivityMonitor.java:128) > at > org.apache.activemq.transport.InactivityMonitor$2.run(InactivityMonitor.java:103) > at > org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33) > at java.util.TimerThread.mainLoop(Timer.java:512) > at java.util.TimerThread.run(Timer.java:462) > Caused by: java.lang.ClassNotFoundException: > org.apache.activemq.transport.InactivityMonitor$3 > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > ... 5 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.