activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan_ <stefan.gmei...@pup.ch>
Subject Re: Will pay $ to fix problem with connections failing. Simple example included.
Date Mon, 23 Feb 2009 15:26:21 GMT

We also encountered this if the start method was called directly in the
activator. It seems that the connection/session thread of ActiveMQ conflicts
with the OSGi classloader (we saw some hint in the error log). We know call
start() in a Job (org.eclipse.core.runtime.jobs.Job) which is executed
asynchronous. I don't know if this is the right solution but it works for
us.


AFinnell wrote:
> 
> ActiveMQ version: 5.2, 5.1, 4.1.1 
> Eclipse Equinox OSGi Version: 3.4 
> JVM: 1.6.0_11 
> 
> I have a very simple example to illustrate the problem I am experiencing.
> Connect to an ActiveMQ broker within a simple OSGi Equinox container. The
> connection either fails or takes over 15 seconds to establish the
> connection. Something is interferring with the ActiveMQ connection and I
> can't figure out what. This doesn't happen outside of the OSGi framework.
> 
> Put the following code in the start() method of a plugin and run the
> plugin by itself. 
> 
> ActiveMQConnectionFactory connectionFactory = 
>       new ActiveMQConnectionFactory("tcp://localhost:61616"); 
> 
> TopicConnection connection = 
>            (TopicConnection) connectionFactory.createTopicConnection(); 
> 
> System.out.println ("Starting connection"); 
> connection.start(); // <-- this takes over 15 seconds.
> System.out.println("Connection established"); 
> 
> 

-- 
View this message in context: http://www.nabble.com/Will-pay-%24-to-fix-problem-with-connections-failing.-Simple-example-included.-tp22163371p22163615.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message