activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Santillan <donzym...@gmail.com>
Subject InstanceAlreadyExistsException
Date Fri, 24 Sep 2010 07:51:30 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message