activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purpureleaf <>
Subject Can't connect to ActiveMQ4.0 RC2
Date Fri, 28 Apr 2006 11:39:00 GMT

Hi, I was using ActiveMQ 3.2. 
But after I migrate to ActiveMQ 4.0 RC2. My code won't work anymore.
I write a simple test class it still won't work
my test looks like this:

import javax.jms.Connection;
import org.apache.activemq.ActiveMQConnectionFactory;
public class TestA {
public static void main(String[] args) throws Exception {

ActiveMQConnectionFactory connectionFactory = 
new ActiveMQConnectionFactory("tcp://localhost:61616");
Connection jmsConnection;

jmsConnection = connectionFactory.createConnection();

but "end" will nerver print on the console, and no exception or error
message is given. If I don't close it, TestA will run forever.
It looks like some kind of deadlock.
If I close the ActiveMQ server(while TestA is still running), the class will
finally end with a JMSException: The transport
tcp://localhost/ of type:
org.apache.activemq.transport.tcp.TcpTransport is not running.

I am sure I have activemq-4.0-RC2.jar on my classpath.
Please Help

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message