You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Don Santillan <do...@gmail.com> on 2010/09/24 09:51:30 UTC
InstanceAlreadyExistsException
Hello,
I am consistently getting this error when I do a redeploy of my
application. It seems like my broker is not getting closed/stopped upon
redeploy. Note that I am creating my broker through xbean:
String brokerURI = "vm://localbroker?brokerConfig=xbean:activemq.xml"
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(brokerURI);
connection = connectionFactory.createConnection();
connection.start();
I already have a call to stop and close the connection upon redeploy.
Is there a way to kill a broker programmatically?
Here's a truncated error trace:
javax.jms.JMSException: Could not create Transport. Reason:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined
in class path resource [activemq.xml]: Invocation of init method failed;
nested exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localbroker,Type=Broker
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:245)
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)
Thanks!
-don