[ 
https://issues.apache.org/jira/browse/AMQ-6156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15137179#comment-15137179
 ] 

Ger Lawlor commented on AMQ-6156:
---------------------------------

Hi Timothy,

The issue turned out to be a mixed activemq-all.jar file in my deployment 
environment. The jar is needed in multiple locations, so I'd not updated 
correctly and this left me with a mixed environment of 1.7.0_60 and 1.7.0_80 
versioned jar files. I updated to the 1.7.0_80 version JAR files from the 
latest ActiveMQ and all works fine now. 

I have to place my implementation in a load environment to create the scenario 
where the threads get parked as shown above and I'm hoping new implementation 
details such as the parameters we talked about and a TransportListener 
implementation will improve the behavior of the client.

Thanks,
Ger.

> ActiveMQConnection threads in parked state during startup
> ---------------------------------------------------------
>
>                 Key: AMQ-6156
>                 URL: https://issues.apache.org/jira/browse/AMQ-6156
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.11.1
>         Environment: Linux
>            Reporter: Ger Lawlor
>
> I've implemented a JMS producer using 
> org.apache.activemq.ActiveMQConnectionFactory API. In the deployment they are 
> 10 threads launched and each thread invokes the following sequence of methods 
> which wrap around the ActiveMQConnection API.
> connector = new ActiveMQConnect();
> connector.setEndPointURL(primaryURL, secondaryURL, connectorQueryString);
> connector.setCredentials(userName, password);
> connector.initializeConnection();
> connector.setDestinationQueue(queueName);
> connector.addMessageToQueue(message);
> connector.sendMessageToQueue();
> The call to initializeConnection in turn invokes the following code which 
> returns the connection 
> 1) ActiveMQConnectionFactory connectionFactory = new 
> ActiveMQConnectionFactory(m_userName, m_password, m_endPointUrl);
> 2) m_queueConnection = connectionFactory.createConnection();
> 3) m_queueConnection.start();
> However, (and potentially under load), a large % of the threads enter the 
> parked state and stay there. The stack trace for these threads is as follows:
> java.lang.Thread.State: WAITING 
>         at sun.misc.Unsafe.park(Native Method) 
>         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118) 
>         at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1841)
>  
>         at 
> java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341) 
>         at 
> org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
>  
>         at 
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
>  
>         at 
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1195)
>  
>         at 
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1289)
>  
>         at 
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:456) 
>         at ActiveMQConnect.initializeConnection(ActiveMQConnect.java:63) 
> The JMS producer connects using failover transport to an active/passive or 
> primary/failover configuration.
> Is the problem being caused by the failover URL? The documentation seemed to 
> indicate that the failover URL can be sent with format:
> failover:(tcp://amq01:61616,tcp://amq02:61616)?queryString....
> Would appreciate any advice so I can resolve this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to