activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Day" <craig_...@jdv.com>
Subject Client: XXX already connected bug
Date Fri, 28 Apr 2006 04:53:44 GMT
While using the new Spring-2.0 DefaultMessageListenerContainer I can
reliably reproduce the following exception on the broker side which
usually results in a hang on the client side:
 
The broker logs the following exception:
 
INFO  Service                        - Sync error occurred:
javax.jms.InvalidClientIDException: Broker: localhost - Client:
ID:inspiron-1410-114619274
7453-2:1 already connected
javax.jms.InvalidClientIDException: Broker: localhost - Client:
ID:inspiron-1410-1146192747453-2:1 already connected
        at
org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroke
r.java:154)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:
65)
        at
org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker
.java:69)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:
65)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrok
erFilter.java:77)
        at
org.apache.activemq.broker.AbstractConnection.processAddConnection(Abstr
actConnection.java:500)
        at
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConn
ection(ManagedTransportConnection.java:82)
        at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:106
)
        at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection
.java:196)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConn
ection.java:62)
        at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorre
lator.java:93)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.
java:70)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatN
egotiator.java:114)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMoni
tor.java:122)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSuppor
t.java:87)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:139
)
        at java.lang.Thread.run(Thread.java:595)
 
I have extrapolated the sequence of calls that
DefaultMessageListenerContainer is making and managed to produce a
simple test case that reproduces the problem:
 
import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
 
import javax.jms.*;
 
public class TestActiveMQ extends TestCase {
 
    public void testConnectionFactory() throws Exception {
        final ActiveMQConnectionFactory cf = new
ActiveMQConnectionFactory("tcp://localhost:61616");
        final ActiveMQQueue queue = new ActiveMQQueue("testqueue");
        final Connection conn = cf.createConnection();
 
        Runnable r = new Runnable() {
            public void run() {
                try {
                    Session session = conn.createSession(false, 1);
                    MessageConsumer consumer =
session.createConsumer(queue, null);
                    Message msg = consumer.receive(1000);
                } catch (JMSException e) {
                    e.printStackTrace();
                }
            }
        };
        new Thread(r).start();
        conn.start();
 
        try {
            synchronized (this) {
                wait(3000);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
 
Let us know if you need anymore information. Dont want to scrub ActiveMQ
from my list of candidates If I can help it.
 
cheers
craig
 


------------------------------------------------------------------------------------------------------------------------------
This e-mail and any files transmitted with it are confidential and are only for the use of
the person to whom they are addressed. If you are not the intended recipient, you are hereby
notified that any use, dissemination, forwarding, printing, copying or dealing in any way
whatsoever with this e-mail is strictly prohibited. If you have received this e-mail in error,
please reply to us immediately and delete the document.
It is the recipient's duty to virus-scan and otherwise test the enclosed information before
using the information or loading attached files onto any computer system. JDV Limited does
not warrant that the information contained in this e-mail is free from viruses, defects, errors,
interception or interference.
JDV Limited, and each of its related companies each reserve the right to monitor all e-mail
communications through its networks. 
Any views expressed in this message are those of the individual sender, except where that
sender specifically states them to be the views of JDV Limited.
Your private information is only used and disclosed for the intention which you have provided
it for. This information is not disclosed or used unless your consent has been provided or
in the case that JDV Limited is permitted to do so under the Privacy Act of 1988.
-----------------------------------------------------------------------------------------------------------------------------

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