EclipseLink Cache Coordination

369 views
Skip to first unread message

Vano Beridze

unread,
Oct 2, 2017, 5:46:40 AM10/2/17
to Payara Forum
Hello,

I have an application which primarily consists of RESTful web services that communicate with Stateless session beans that manipulate data using JPA.
I use EclipseLink as Persistence provider.
My task is to run the application in a clustered environment.
I followed the guide to create a simple cluster
http://blog.payara.fish/payara-server-basics-creating-a-simple-cluster
After enabling Hazlecast, I checked and everything except JMS availability was enabled. I enabled it too and Saved the configuration.
I have created JMS resources as indicated in
https://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
But when I deploy the application in the cluster I get the following error:

Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Deployment of PersistenceUnit [test_clustertest_war_1.0-SNAPSHOTPU] failed. Close all factories for this PersistenceUnit. Internal Exception: Exception [EclipseLink-22106] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.RemoteCommandManagerException Exception Description: Could not create external JMS connection with Topic jms/TestCCTopic and Topic Factory jms/TestCCTopicFactory. Also, check your context properties are set correctly. Internal Exception: Exception [EclipseLink-22103] (Eclipse Persistence Services - 2.6.4.qualifier): org.eclipse.persistence.exceptions.RemoteCommandManagerException Exception Description: Could not look up remote connection under name jms/TestCCTopicFactory with URL null Intern .... msg.seeServerLog

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
   
<persistence-unit name="test_clustertest_war_1.0-SNAPSHOTPU" transaction-type="JTA">
       
<jta-data-source>jdbc/test</jta-data-source>
       
<exclude-unlisted-classes>false</exclude-unlisted-classes>
       
<properties>
           
<property name="eclipselink.cache.coordination.protocol" value="jms" />
           
<property name="eclipselink.cache.coordination.naming-service" value="jndi"/>
           
<property name="eclipselink.cache.coordination.jms.topic" value="jms/TestCCTopic" />
           
<property name="eclipselink.cache.coordination.jms.factory" value="jms/TestCCTopicFactory" />
           
<property name="eclipselink.cache.coordination.jms.reuse-topic-publisher " value="true"/>
           
<property name="javax.persistence.schema-generation.database.action" value="create"/>
           
<property name="eclipselink.logging.level" value="FINE"/>
       
</properties>
   
</persistence-unit>
</persistence>

Could you please indicate why EclipseLink cannot lookup resources? What am I missing here?
When I use asadmin list-jms-resources for cluster members everything is listed.

Lenny Primak

unread,
Oct 11, 2017, 8:22:53 PM10/11/17
to Payara Forum
Can you look up the factory from any application?  Do you have resource linked with the factory connection pool?
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Vano Beridze

unread,
Oct 13, 2017, 6:33:20 AM10/13/17
to Payara Forum
I've created test application which creates the MDB bound to the same topic I indicated for Cache coordination.
There is a servlet which injects Stateless session bean which injects Factory and Topic I used for Cache coordination.
I've deployed this application and it works fine. I see in the log that message is received by MDB.

I'm attaching this test application project.

What do you mean by "Do you have resource linked with the factory connection pool?"

I'm also attaching screenshots of my configuration and server log excerpt.
I can provide any part of the config if needed.
screenshots-and-log.rar
jmstest.rar
Message has been deleted

Lenny Primak

unread,
Oct 14, 2017, 12:06:43 AM10/14/17
to Payara Forum
I would say domain.xml would be very helpful in this case,
as well as any libs in your <domain>/lib directory



On Monday, October 2, 2017 at 4:46:40 AM UTC-5, Vano Beridze wrote:

Vano Beridze

unread,
Oct 16, 2017, 11:23:19 AM10/16/17
to Payara Forum
 Attaching domain.xml
in domain1/lib I've got empty folders and PostgreSQL JDBC driver: postgresql-42.1.4.jar
domain.rar

Lenny Primak

unread,
Jun 13, 2018, 7:59:08 PM6/13/18
to Payara Forum
Sorry about the long delay. Payara will be publishing a blog about cache coordination shortly.
It should give you a direction on how to set this up

Lenny Primak

unread,
Jun 21, 2018, 12:49:31 PM6/21/18
to Payara Forum
Reply all
Reply to author
Forward
0 new messages