activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mathias <math...@afjochnick.net>
Subject Duplicate brokers created in Tomcat
Date Wed, 20 Oct 2010 09:11:59 GMT

Hello, 

would very much appreciate help with my config issue with ActiveMQ5.4.1 on
Tomcat.


I have a broker and a queue set up in my global context, which i then expose
to my webapp with resource-ref tags. However, the first time i try and
create a connection, there are TWO brokers created and two broker data
directories created:

Oct 20, 2010 11:00:33 AM org.apache.activemq.broker.BrokerService getBroker
INFO: ActiveMQ 5.4.1 JMS Message Broker (nubaBroker) is starting
Oct 20, 2010 11:00:33 AM org.apache.activemq.broker.BrokerService getBroker
INFO: For help or more information please see: http://activemq.apache.org/
Oct 20, 2010 11:00:33 AM org.apache.activemq.broker.TransportConnector start
INFO: Connector vm Started
Oct 20, 2010 11:00:33 AM org.apache.activemq.broker.BrokerService start
INFO: ActiveMQ JMS Message Broker (nubaBroker,
ID:Neo.local-56289-1287565233551-0:0) started

As you can see, two brokers are created with different Id's from what i can
see.

my config for the broker and connectionfactory:
<Resource auth="Container" description="JMS Connection Factory"
name="jms/ConnectionFactory"
brokerURL="vm://nubaBroker?brokerConfig=xbean:file:/karpet/conf/activemq.xml"
brokerName="nubaBroker"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
type="org.apache.activemq.ActiveMQConnectionFactory"
useEmbeddedBroker="true"/>
	<Resource auth="Container" description="JMS Queue" name="jms/messaging/in"
type="org.apache.activemq.command.ActiveMQQueue" physicalName="messaging.in"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"/>
	<Resource auth="Container" description="JMS Queue" name="jms/messaging/out"
type="org.apache.activemq.command.ActiveMQQueue"
physicalName="messaging.out"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"/>

As you can see i am pointing the broker url to a config file. And one of the
brokers picks it up since i get activemq-data directory created in the
directory as specified. But the "other" broker creates data directory
directly under /tomcat-home/bin, i.e. the directory where i'm starting
tomcat...


At first i thought it was a glitch with the SchedulerBroker that was created
automatically, since i saw:
org.apache.activemq.broker.scheduler.SchedulerBroker <init>

So i read up and put in "schedulerSupport="false" in the activemq.xml broker
config. That resulted in that the data directory under /bin went away, but
the broker seems still to be created according to the logfile!


Can anybody enlighten me as to why there are two brokers created?? I
attached the activemq.xml for reference.

thanks in advance.
http://activemq.2283324.n4.nabble.com/file/n3003512/activemq.xml
activemq.xml 
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Duplicate-brokers-created-in-Tomcat-tp3003512p3003512.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message