[ https://issues.apache.org/jira/browse/AMQ-6156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish closed AMQ-6156. ----------------------------- Resolution: Not A Problem Thanks for closing the loop, will close this for now then and you can reopen if there is any further issue in this area. > 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)