activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: InstanceAlreadyExistsException when creating Connections without start them
Date Thu, 06 Apr 2006 06:17:38 GMT
Which version of ActiveMQ are you using BTW? We did have some
JMX-related bugs a while back that have been fixed.  We now use
different MBean names for each transport connection so you shouldn't
receive this exception on 4.0-RC2 (I use JMX all the time with
multiple transports on the broker and haven't seen this in a long

Incidentally if ever you're having trouble with JMX its very easy to
disable with the useJmx="false" property on BrokerService or <broker>


On 4/6/06, Li, Fan <> wrote:
> Hi:
> I am doing a test where I am creating a number of TopicConnections on different TCP port
on my machine, in particular I am using the TransportConnector URIs: "tcp://localhost:61616",
"tcp://localhost:61626", "tcp://localhost:61636" and "tcp://localhost:61646". I have started
a BrokerService with these four TransportConnectors and I have created four TCP TopicConnections
without starting any of them, as a result I am getting InstanceAlreadyExistsException from
the registerMBean() method of ManagedTransportConnection class, with the stack trace similar
> 2006-04-05 18:35:53,474 [] WARN  ActiveMQConnection             - Async
exception with no exception listener: Connection reset
> Connection reset
>         at
>         at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(
>         at
>         at
>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(
>         at
>         at
> 2006-04-05 18:35:53,477 [] ERROR TransportConnector             - Could
not accept connection: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1
> org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1
>         at org.apache.activemq.util.IOExceptionSupport.create(
>         at
>         at
>         at<init>(
>         at
>         at$1.onAccept(
>         at
>         at
> Caused by: org.apache.activemq:BrokerName=localhost,Type=Connection,Connection=1
>         at com.sun.jmx.mbeanserver.RepositorySupport.addMBean(
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(
>         at
>         ... 6 more
> Is it required in ActiveMQ to start a Connection right after its creation? It seems all
instances of ManagedTransportConnector for a particular BrokerService share the same MBeanServer.
When I run debugger on the registerMBean() method that throws the exception, the objects it
tries to register with the MBeanServer appears to be different, but the name it tries to register
them under seems to be the same "org.apache.activemq:BrokerName=localhost,Connection=1,Type=Connection".
Do anyone know what might be the cause of this?
> Thanks
> Fan



View raw message