activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AFinnell <>
Subject Establishing connection takes a long time / fails to connect when used within OSGi
Date Thu, 19 Feb 2009 15:31:56 GMT

ActiveMQ version: 5.2, 5.1, 4.1.1
Eclipse Equinox OSGi Version: 3.4
JVM: 1.6.0_11

When attempting to connect to an ActiveMQ server while running within a
simple Equinox OSGi (Eclipse) plugin the connection fails half the time with
a timeout, while the other half it takes over 30 seconds to establish a
valid connection. I have tried the connection when not running within
Equinox and it is virtually instantaneous. 

It is very easy to duplicate. Create a new OSGi plugin and insert the
following into the start() method.

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

TopicConnection connection = 
           (TopicConnection) connectionFactory.createTopicConnection();

System.out.println ("Starting connection");
System.out.println("Connection established");

* You will also need to add the required ActiveMQ libraries to the plugin. 

Run the plugin with only the org.eclipse.osgi.service plugin. You should
experience the same problem as I have. All the machines in our office have
the same problem so I have ruled out any issues with my OS or configuration.
Something with the org.eclipse.osgi.service and ActiveMQ must be conflicting
but I haven't been able to figure out what.

Any help would be appreciated.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message