users@glassfish.java.net

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

From: Henning Verbeek <hankipanky_at_gmail.com>
Date: Thu, 6 Oct 2011 16:41:36 +0200

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?
Should I maybe not use JMS? Is RMI a better transport mechanism?

Thanks for your help!!

Cheers,
Hank

-- 
My other signature is a regular expression.
http://www.pray4snow.de