You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Anders Hanson (JIRA)" <ji...@apache.org> on 2017/05/03 18:39:04 UTC

[jira] [Commented] (AMQ-6068) RAR - cannot reset clientId on pooled managed connection

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

Anders Hanson commented on AMQ-6068:
------------------------------------

The fix for this bug introduces an unwanted behaviour in our activemq cluster.
We are running JBoss 6.4 with a Java EE application that processes around 25000 msg per minute throught couple of JMS queues.
The application consumes one message, does some logic and then post a message on another queue. 
The applucation is running with XA-transaction enabled.

We recently upgraded from activemq-rar.rar version 5.13.5 to 5.14.5 and noticed that the A-MQ cluster started to behave strange,
one issue was that the nodes in the cluster (network of brokers) ran out of native memory. 

We have now come to the conclusion that the fix for this issue forces the activemq client to send a new ConnectionInfo message
to the broker for every message it processes. This get passed around in the cluster via Advisory messages and both memory consumtion
and CPU load went up on all brokers. The information sent in the connectionInfo is in our case always the same thing, i.e. we don't set any clientId etc.

There is almost no use having a JCA connection pool for activemq resource adapter when it cant avoid sending ConnectionInfo messages.

We have reverted back to 5.13.5 for now.  

> RAR - cannot reset clientId on pooled managed connection
> --------------------------------------------------------
>
>                 Key: AMQ-6068
>                 URL: https://issues.apache.org/jira/browse/AMQ-6068
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: RAR
>    Affects Versions: 5.12.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.14.0
>
>
> A managed connection returned to the pool has cleanup called, but cleanup is not releasing the underlying activemq connection  info and clientid. On the second attempt to reuse the connection, setting the id fails due to the pre existing state in error.
> {code}[Server:eai01] 17:04:58,073 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (jmsListener-734) IJ000613: Throwable while trying to match managed connection, destroying connection: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@3e11f08f[state=NORMAL managed connection=[org.apache.activemq.ra.ActiveMQManagedConnection@34bc339a,ActiveMQConnection {id=ID:macbookpro-2.local-54186-1448868251571-1463:1,clientId=xxx,started=false}] connection handles=0 lastUse=1448874205871 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@2f2f39fd pool internal context=SemaphoreArrayListManagedConnectionPool@51eff7c[pool=ActiveMQConnectionFactory] xaResource=XAResourceWrapperImpl@623206[xaResource=[org.apache.activemq.ra.ActiveMQManagedConnection$1@64df868a,TransactionContext{transactionId=null,connection=ActiveMQConnection {id=ID:macbookpro-2.local-54186-1448868251571-1463:1,clientId=xxx,started=false}}] pad=false overrideRmValue=null productName=ActiveMQ productVersion=5.12.1 jndiName=java:/ra/activeMQ/ActiveMQConnectionFactory] txSync=null]: javax.resource.ResourceException: javax.jms.IllegalStateException: Setting clientID on a used Connection is not allowed
> [Server:eai01] 	at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.matchManagedConnections(ActiveMQManagedConnectionFactory.java:217) [activemq-ra-5.12.1.jar:5.12.1]
> [Server:eai01] 	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:314)
> [Server:eai01] 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:453)
> [Server:eai01] 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:425)
> [Server:eai01] 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:354)
> [Server:eai01] 	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
> [Server:eai01] 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:510)
> [Server:eai01] 	at org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:94) [activemq-ra-5.12.1.jar:5.12.1]
> [Server:eai01] 	at org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:78) [activemq-ra-5.12.1.jar:5.12.1]{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)