activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purpureleaf <purpurel...@gmail.com>
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();
System.out.println("begin");
jmsConnection.start();
System.out.println("end");
}
}

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/127.0.0.1:61616 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: http://www.nabble.com/Can%27t-connect-to-ActiveMQ4.0-RC2-t1523969.html#a4138677
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message