You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jsvaughan <js...@gmail.com> on 2010/09/03 10:15:38 UTC

Want one broker, two turn up

Hi,

I have two web apps running in Tomcat and I would like both of them to make
use of a common activemq broker.  However I seem to have a problem where two
brokers are started instead.

In my tomcat context.xml I have a single connection factory and two queues
defined:

       <Resource name="jms/connectionFactory" auth="Container"
              type="org.apache.activemq.ActiveMQConnectionFactory"
description="JMS Connection Factory Home"
              factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="vm:localhost"
              brokerName="LocalActiveMQBrokerHome" />

       <Resource name="homequeue" auth="Container"
              type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
              physicalName="homequeue" />

       <Resource name="policyqueue" auth="Container"
              type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
              physicalName="policyqueue" />

In each of my applications I use spring, and have the following in each of
the app context files:

       <jee:jndi-lookup id="jmsConnectionFactory"
              jndi-name="java:comp/env/jms/connectionFactory"
resource-ref="true" />

       <bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
              <property name="maxConnections" value="8" />
              <property name="maximumActive" value="500" />
              <property name="connectionFactory" ref="jmsConnectionFactory"
/>
       </bean>

       <bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
              <property name="connectionFactory"
ref="pooledConnectionFactory" />
              <property name="transacted" value="false" />
              <property name="concurrentConsumers" value="10" />
       </bean>

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

As far as I understand it, the ActiveMQComponent bean binds me via the
connection factory to the broker, and whichever app starts up first will
cause the broker to instantiate.

However when I run the application, I see firstly a broker starting without
a problem (note that I am also binding to this broker with Camel):

17:29:56,413  INFO main org.apache.activemq.broker.BrokerService:744 -
ActiveMQ 5.4.0 JMS Message Broker (localhost) is starting
17:29:56,414  INFO main org.apache.activemq.broker.BrokerService:746 - For
help or more information please see: http://activemq.apache.org/
17:29:56,607  INFO main
org.apache.activemq.broker.scheduler.SchedulerBroker:60 - Scheduler using
directory: activemq-data\scheduler
17:29:56,792  INFO main org.apache.activemq.broker.BrokerService:519 -
ActiveMQ JMS Message Broker (localhost, ID:MV5-53743-1283444996462-0:0)
started
17:29:56,807  INFO main org.apache.activemq.broker.TransportConnector:252 -
Connector vm://localhost Started
17:29:56,916  INFO main org.apache.camel.impl.DefaultCamelContext:956 -
Route: route1 started and consuming from: Endpoint[direct://HOME]
17:29:56,916  INFO main org.apache.camel.impl.DefaultCamelContext:956 -
Route: route2 started and consuming from: Endpoint[direct://POLICY]
17:29:56,917  INFO main org.apache.camel.impl.DefaultCamelContext:956 -
Route: route3 started and consuming from: Endpoint[activemq://homequeue]

But then subsequently I see (I think I see) a second broker attempting to
start and failing.

17:30:08,964  WARN JMX connector
org.apache.activemq.broker.jmx.ManagementContext:110 - Failed to start jmx
connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]:
javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is
java.rmi.AlreadyBoundException: jmxrmi]
17:30:08,976 ERROR main org.apache.activemq.broker.BrokerService:523 -
Failed to start ActiveMQ JMS Message Broker. Reason:
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at
org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
       at
org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
       at
org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
       at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
       at
org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:123)
       at
org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:53)
       at
org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
       at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
       at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
       at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
       at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
       at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
       at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:137)
       at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:121)
       at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:92)
       at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
       at
org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:404)
       at
org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:372)
       at
org.springframework.jms.listener.DefaultMessageListenerContainer.establishSharedConnection(DefaultMessageListenerContainer.java:698)
       at
org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:279)
       at
org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:264)
       at
org.springframework.jms.listener.DefaultMessageListenerContainer.start(DefaultMessageListenerContainer.java:526)
       at
org.apache.camel.component.jms.JmsConsumer.startListenerContainer(JmsConsumer.java:80)
       at
org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java:122)
       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
       at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:53)
       at
org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1189)
       at
org.apache.camel.impl.DefaultCamelContext.doStartRoutes(DefaultCamelContext.java:1357)
       at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1261)
       at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:952)
       at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
       at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
       at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
       at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
       at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:301)
       at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
       at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:426)
       at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
       at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
       at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
       at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
       at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
       at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
       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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
17:30:08,979  INFO main org.apache.activemq.broker.BrokerService:555 -
ActiveMQ Message Broker (localhost, null) is shutting down
17:30:08,998  INFO main org.apache.activemq.broker.BrokerService:623 -
ActiveMQ JMS Message Broker (localhost, null) stopped

So have I misunderstood how ActiveMQ can be used with JNDI?  I have just
spotted that I have both the activemq-all jar in my tomcat common dir AND
via maven are putting activemq jars on the classpath as camel dependencies -
might that be the problem?  Any other thoughts?

Any help whatsover very gladly received

Thanks

Jon

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Want-one-broker-two-turn-up-tp2525279p2525279.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Want one broker, two turn up

Posted by Gary Tully <ga...@gmail.com>.
thanks for posting back and closing the loop!

On 3 September 2010 10:59, jsvaughan <js...@gmail.com> wrote:
>
> I think that may be it.
>
> I changed the camel import to exclude activemq:
>
> <dependency>
>        <groupId>org.apache.activemq</groupId>
>        <artifactId>activemq-camel</artifactId>
>        <version>5.4.0</version>
>        <exclusions>
>                <exclusion>
>                        <groupId>org.apache.activemq</groupId>
>                        <artifactId>activemq-core</artifactId>
>                </exclusion>
>                <exclusion>
>                        <groupId>org.apache.activemq</groupId>
>                        <artifactId>activemq-pool</artifactId>
>                </exclusion>
>        </exclusions>
> </dependency>
>
> Then found that I needed activemq-pool in my tomcat common lib dir (so it
> must have been using one internal to the web app)
>
> Incidentally I also came across:
> "Cannot convert value of type"
> org.apache.activemq.pool.PooledConnectionFactory to required type
> javax.jms.ConnectionFactory
>
> Which was because I had the geronimo jms specs in my classloader
>
> With that excluded too:
>
> <dependency>
>        <groupId>org.apache.camel</groupId>
>        <artifactId>camel-jms</artifactId>
>        <version>2.4.0</version>
>        <exclusions>
>                <!-- some other exclusions in here too... -->
>                <exclusion>
>                    <!--  To be provided by the container -->
>                   <groupId>org.apache.geronimo.specs</groupId>
>                   <artifactId>geronimo-jms_1.1_spec</artifactId>
>                </exclusion>
>        </exclusions>
> </dependency>
>
> Then the appserver starts up without an exception and I see this only once:
>
> INFO: ActiveMQ JMS Message Broker (localhost,
> ID:MV5-56410-1283507517122-0:0) started
> 03-Sep-2010 10:51:57 org.apache.activemq.broker.TransportConnector start
> INFO: Connector vm://localhost Started
>
> Thank you very much for replying!  Hugely appreciated, feel that I am
> sweating my way through this.  Hopefully someone else will find this useful.
>
> Jon
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Want-one-broker-two-turn-up-tp2525279p2525411.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: Want one broker, two turn up

Posted by jsvaughan <js...@gmail.com>.
I think that may be it.

I changed the camel import to exclude activemq:

<dependency>
	<groupId>org.apache.activemq</groupId>
	<artifactId>activemq-camel</artifactId>
	<version>5.4.0</version>
	<exclusions>
		<exclusion>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-core</artifactId>
		</exclusion>
		<exclusion>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-pool</artifactId>
		</exclusion>
	</exclusions>
</dependency>

Then found that I needed activemq-pool in my tomcat common lib dir (so it
must have been using one internal to the web app)

Incidentally I also came across:
"Cannot convert value of type"
org.apache.activemq.pool.PooledConnectionFactory to required type
javax.jms.ConnectionFactory

Which was because I had the geronimo jms specs in my classloader

With that excluded too:

<dependency>
	<groupId>org.apache.camel</groupId>
	<artifactId>camel-jms</artifactId>
	<version>2.4.0</version>
	<exclusions> 
                <!-- some other exclusions in here too... -->
		<exclusion>
		    <!--  To be provided by the container -->
	    	   <groupId>org.apache.geronimo.specs</groupId>
		   <artifactId>geronimo-jms_1.1_spec</artifactId>
		</exclusion>
	</exclusions>
</dependency>

Then the appserver starts up without an exception and I see this only once:

INFO: ActiveMQ JMS Message Broker (localhost,
ID:MV5-56410-1283507517122-0:0) started
03-Sep-2010 10:51:57 org.apache.activemq.broker.TransportConnector start
INFO: Connector vm://localhost Started

Thank you very much for replying!  Hugely appreciated, feel that I am
sweating my way through this.  Hopefully someone else will find this useful.

Jon




-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Want-one-broker-two-turn-up-tp2525279p2525411.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Want one broker, two turn up

Posted by Gary Tully <ga...@gmail.com>.
ah ok, my mistake. Wonder if it is a classloading issue then, both of
the webapps having their own activemq jars and seeing their own broker
registry so both creating a broker. You may want to push the activemq
jars into the tomcat lib directory so they are shared.

On 3 September 2010 09:48, jsvaughan <js...@gmail.com> wrote:
>
> Would that result in both my applications waiting for the broker to start
> though (and just postpone the problem)?  I only have vm:localhost defined
> once, in the brokerurl of the connectionfactory found by jndi.
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Want-one-broker-two-turn-up-tp2525279p2525323.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: Want one broker, two turn up

Posted by jsvaughan <js...@gmail.com>.
Would that result in both my applications waiting for the broker to start
though (and just postpone the problem)?  I only have vm:localhost defined
once, in the brokerurl of the connectionfactory found by jndi.


-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Want-one-broker-two-turn-up-tp2525279p2525323.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Want one broker, two turn up

Posted by Gary Tully <ga...@gmail.com>.
see the waitForStart attribute on the vm transport, this can help with
ordering issues as the vm: transport will auto created an embedded
broker by default.

http://activemq.apache.org/the-vm-transport-starts-a-broker-before-my-configured-broker-starts.html

On 3 September 2010 09:15, jsvaughan <js...@gmail.com> wrote:
>
> Hi,
>
> I have two web apps running in Tomcat and I would like both of them to make
> use of a common activemq broker.  However I seem to have a problem where two
> brokers are started instead.
>
> In my tomcat context.xml I have a single connection factory and two queues
> defined:
>
>       <Resource name="jms/connectionFactory" auth="Container"
>              type="org.apache.activemq.ActiveMQConnectionFactory"
> description="JMS Connection Factory Home"
>              factory="org.apache.activemq.jndi.JNDIReferenceFactory"
> brokerURL="vm:localhost"
>              brokerName="LocalActiveMQBrokerHome" />
>
>       <Resource name="homequeue" auth="Container"
>              type="org.apache.activemq.command.ActiveMQQueue"
> factory="org.apache.activemq.jndi.JNDIReferenceFactory"
>              physicalName="homequeue" />
>
>       <Resource name="policyqueue" auth="Container"
>              type="org.apache.activemq.command.ActiveMQQueue"
> factory="org.apache.activemq.jndi.JNDIReferenceFactory"
>              physicalName="policyqueue" />
>
> In each of my applications I use spring, and have the following in each of
> the app context files:
>
>       <jee:jndi-lookup id="jmsConnectionFactory"
>              jndi-name="java:comp/env/jms/connectionFactory"
> resource-ref="true" />
>
>       <bean id="pooledConnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>              <property name="maxConnections" value="8" />
>              <property name="maximumActive" value="500" />
>              <property name="connectionFactory" ref="jmsConnectionFactory"
> />
>       </bean>
>
>       <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>              <property name="connectionFactory"
> ref="pooledConnectionFactory" />
>              <property name="transacted" value="false" />
>              <property name="concurrentConsumers" value="10" />
>       </bean>
>
>       <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>              <property name="configuration" ref="jmsConfig" />
>       </bean>
>
> As far as I understand it, the ActiveMQComponent bean binds me via the
> connection factory to the broker, and whichever app starts up first will
> cause the broker to instantiate.
>
> However when I run the application, I see firstly a broker starting without
> a problem (note that I am also binding to this broker with Camel):
>
> 17:29:56,413  INFO main org.apache.activemq.broker.BrokerService:744 -
> ActiveMQ 5.4.0 JMS Message Broker (localhost) is starting
> 17:29:56,414  INFO main org.apache.activemq.broker.BrokerService:746 - For
> help or more information please see: http://activemq.apache.org/
> 17:29:56,607  INFO main
> org.apache.activemq.broker.scheduler.SchedulerBroker:60 - Scheduler using
> directory: activemq-data\scheduler
> 17:29:56,792  INFO main org.apache.activemq.broker.BrokerService:519 -
> ActiveMQ JMS Message Broker (localhost, ID:MV5-53743-1283444996462-0:0)
> started
> 17:29:56,807  INFO main org.apache.activemq.broker.TransportConnector:252 -
> Connector vm://localhost Started
> 17:29:56,916  INFO main org.apache.camel.impl.DefaultCamelContext:956 -
> Route: route1 started and consuming from: Endpoint[direct://HOME]
> 17:29:56,916  INFO main org.apache.camel.impl.DefaultCamelContext:956 -
> Route: route2 started and consuming from: Endpoint[direct://POLICY]
> 17:29:56,917  INFO main org.apache.camel.impl.DefaultCamelContext:956 -
> Route: route3 started and consuming from: Endpoint[activemq://homequeue]
>
> But then subsequently I see (I think I see) a second broker attempting to
> start and failing.
>
> 17:30:08,964  WARN JMX connector
> org.apache.activemq.broker.jmx.ManagementContext:110 - Failed to start jmx
> connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]:
> javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is
> java.rmi.AlreadyBoundException: jmxrmi]
> 17:30:08,976 ERROR main org.apache.activemq.broker.BrokerService:523 -
> Failed to start ActiveMQ JMS Message Broker. Reason:
> javax.management.InstanceAlreadyExistsException:
> org.apache.activemq:BrokerName=localhost,Type=Broker
> javax.management.InstanceAlreadyExistsException:
> org.apache.activemq:BrokerName=localhost,Type=Broker
>       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
>       at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
>       at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
>       at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
>       at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
>       at
> com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
>       at
> org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
>       at
> org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
>       at
> org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
>       at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
>       at
> org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:123)
>       at
> org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:53)
>       at
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
>       at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
>       at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
>       at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
>       at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
>       at
> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
>       at
> org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:137)
>       at
> org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:121)
>       at
> org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:92)
>       at
> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
>       at
> org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:404)
>       at
> org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:372)
>       at
> org.springframework.jms.listener.DefaultMessageListenerContainer.establishSharedConnection(DefaultMessageListenerContainer.java:698)
>       at
> org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:279)
>       at
> org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:264)
>       at
> org.springframework.jms.listener.DefaultMessageListenerContainer.start(DefaultMessageListenerContainer.java:526)
>       at
> org.apache.camel.component.jms.JmsConsumer.startListenerContainer(JmsConsumer.java:80)
>       at
> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java:122)
>       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
>       at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:53)
>       at
> org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1189)
>       at
> org.apache.camel.impl.DefaultCamelContext.doStartRoutes(DefaultCamelContext.java:1357)
>       at
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1261)
>       at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:952)
>       at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
>       at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
>       at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
>       at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
>       at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:301)
>       at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
>       at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:426)
>       at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>       at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>       at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>       at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
>       at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
>       at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>       at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>       at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>       at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>       at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
>       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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 17:30:08,979  INFO main org.apache.activemq.broker.BrokerService:555 -
> ActiveMQ Message Broker (localhost, null) is shutting down
> 17:30:08,998  INFO main org.apache.activemq.broker.BrokerService:623 -
> ActiveMQ JMS Message Broker (localhost, null) stopped
>
> So have I misunderstood how ActiveMQ can be used with JNDI?  I have just
> spotted that I have both the activemq-all jar in my tomcat common dir AND
> via maven are putting activemq jars on the classpath as camel dependencies -
> might that be the problem?  Any other thoughts?
>
> Any help whatsover very gladly received
>
> Thanks
>
> Jon
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Want-one-broker-two-turn-up-tp2525279p2525279.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com