users@glassfish.java.net

Re: EclipseLink CacheCoordination via JMS on GF3.1.1: "Client ID is already in use"

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Mon, 10 Oct 2011 20:09:32 +0100

Henning Verbeek wrote, on 06/10/2011 15:41:
> Hi there,
>
> I'm trying to get EclipseLink cache coordination working on a two-instance GF 3.1.1 cluster. Cache coordination shall
> be via JMS.
> I created the environment like this:
> asadmin create-jmsdest --desttype topic --target matchpoint-test bonusApp.cache
> asadmin create-jms-resource --restype javax.jms.ConnectionFactory --target matchpoint-test --property
> ClientId=\${AJP_INSTANCE_NAME} jms/bonusApp/CacheCoordinationFactory
> asadmin create-jms-resource --restype javax.jms.Topic --target matchpoint-test --property Name=bonusApp.cache
> jms/bonusApp/CacheCoordinationTopic
>
> Note: ${AJP_INSTANCE_NAME} is different for each cluster instance (it's basically set to their instance names).
>
> relevant part of persistence.xml:
> <shared-cache-mode>DISABLE_SELECTIVE</shared-cache-mode>
> <properties>
> <property name="eclipselink.logging.exceptions" value="false"/>
> <property name="eclipselink.cache.coordination.protocol" value="jms"/>
> <property name="eclipselink.cache.coordination.jms.topic" value="jms/bonusApp/CacheCoordinationTopic"/>
> <property name="eclipselink.cache.coordination.jms.factory" value="jms/bonusApp/CacheCoordinationFactory"/>
> </properties>
>
> When I access managed entities, I see the following errors in the server logs of the two instances (karlsruhe-inst1,
> peine-inst1):
>
> [#|2011-10-06T14:16:08.925+0000|WARNING|glassfish3.1.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=29;_ThreadName=Thread-2;|RAR5117
> : Failed to obtain/create connection from connection pool [ jms/bonusApp/CacheCoordinationFactory ]. Reason :
> com.sun.appserv.connectors.internal.api.PoolingException: MQRA:MC:InvalidClientIDException-[C4052]: Client ID is
> already in use - karlsruhe-inst1 user=guest, broker=localhost:27676(52058)|#]
>
> [#|2011-10-06T14:16:08.926+0000|WARNING|glassfish3.1.1|org.eclipse.persistence.session.file:/opt/glassfish3/glassfish/nodes/karlsruhe/karlsruhe-inst1/applications/BonusAppServer/WEB-INF/classes/_bonusAppServerPU|_ThreadID=29;_ThreadName=Thread-2;|Warning:
> Dropping remote command connection to Service[EclipseLinkCommandChannel, 4fd7f7db-a231-4e40-bb73-9fa0750590ae, null]
> on error com.sun.messaging.jms.JMSException: MQRA:CFA:allocation failure:createTopicConnection:Error in allocating a
> connection. Cause: MQRA:MC:InvalidClientIDException-[C4052]: Client ID is already in use - karlsruhe-inst1 user=guest,
> broker=localhost:27676(52058)|#]
>
> (similar for the other instance)
>
> Can you help me find out what's wrong?

I suspect you've run into this issue:
http://java.net/jira/browse/GLASSFISH-6580

I don't think you actually need clientID to be set. Leave it unset, but set the property
useSharedSubscriptionInClusteredContainer to false on the connection factory.

Nigel