ajit bantia created AMQ-4203: -------------------------------- Summary: java.lang.IllegalStateException: setManagedConnection: illegal state exception. State = STATE_ACTIVE_FREE MCW = 2766a46b Key: AMQ-4203 URL: https://issues.apache.org/jira/browse/AMQ-4203 Project: ActiveMQ Issue Type: Bug Components: activemq-pool Affects Versions: 5.4.2 Environment: Production Reporter: ajit bantia We use IBM BPM V8 and ActiveMQ 5.4.2 adapter to connect to Active MQ. When the matchManagedConnections is called on ConnectionFactory, the resource adapter is returning null. Here is the traces from WebSphere Application Server (WAS) J2C: ... and CRI ActiveMQConnectionRequestInfo{ userName = 'defaultUser' , serverUrl = 'tcp://rni17lpd.nveasd.com:61616' , clientid = 'null' , userName = 'defaultUser' , useInboundSession = 'false' } [11/20/12 6:30:49:439 PST] 000004e2 PoolManager 3 Subject's hash code is 0 and the CRI's hash code is -484636893 [11/20/12 6:30:49:439 PST] 000004e2 PoolManager 3 computeHashCode, hashCode is 242318446 [11/20/12 6:30:49:439 PST] 000004e2 PoolManager < computeHashCode Exit [11/20/12 6:30:49:439 PST] 000004e2 FreePool > getFreeConnection Entry [11/20/12 6:30:49:439 PST] 000004e2 FreePool 3 datasource: J2C/J2C_ActiveMQAdapter_RNIActiveMQ_CF [11/20/12 6:30:49:439 PST] 000004e2 FreePool > getMCWrapperFromMatchMCWrapper id 94a7ff01 Managed connection org.apache.activemq.ra.ActiveMQManagedConnection@2c789a8c State:STATE_ACTIVE_FREE Entry [11/20/12 6:30:49:439 PST] 000004e2 FreePool < getMCWrapperFromMatchnull Exit -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira