Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Cache Coordination issue
Cache Coordination issue [message #659547] Mon, 14 March 2011 14:35 Go to next message
rudibravo is currently offline rudibravoFriend
Messages: 17
Registered: December 2010
Junior Member
Hey guys, I have a question about cache coordination with Glassfish 3.1

I setup a Cluster in GF3.1 and enabled CacheCoordination on it. To make sure things were really working I wrote some JMeter tests, and in a very controlled environment it is, but I keep getting these log on the Broker

[14/Mar/2011:15:12:44 CET] [B1065]: Accepting: guest@127.0.0.1:1038->jms:1030. Count: service=1 broker=1
[14/Mar/2011:15:12:53 CET] [B1065]: Accepting: guest@127.0.0.1:1045->jms:1030. Count: service=2 broker=2
[14/Mar/2011:15:12:53 CET] [B1065]: Accepting: guest@127.0.0.1:1047->jms:1030. Count: service=3 broker=3
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1841->jms:1030. Count: service=4 broker=4
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1847->jms:1030. Count: service=5 broker=5
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1852->jms:1030. Count: service=6 broker=6
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1859->jms:1030. Count: service=7 broker=7
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1861->jms:1030. Count: service=8 broker=8
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1863->jms:1030. Count: service=9 broker=9
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1865->jms:1030. Count: service=10 broker=10
[14/Mar/2011:15:17:11 CET] [B1065]: Accepting: guest@127.0.0.1:1867->jms:1030. Count: service=11 broker=11
[14/Mar/2011:15:17:44 CET] [B1066]: Closing: guest@127.0.0.1:1047->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=9
[14/Mar/2011:15:17:44 CET] [B1066]: Closing: guest@127.0.0.1:1045->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=9
[14/Mar/2011:15:22:44 CET] [B1066]: Closing: guest@127.0.0.1:1865->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=8
[14/Mar/2011:15:22:44 CET] [B1066]: Closing: guest@127.0.0.1:1863->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=7
[14/Mar/2011:15:22:44 CET] [B1066]: Closing: guest@127.0.0.1:1867->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=6
[14/Mar/2011:15:27:44 CET] [B1066]: Closing: guest@127.0.0.1:1847->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=5
[14/Mar/2011:15:27:44 CET] [B1066]: Closing: guest@127.0.0.1:1852->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=4
[14/Mar/2011:15:27:44 CET] [B1066]: Closing: guest@127.0.0.1:1859->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=3
[14/Mar/2011:15:27:44 CET] [B1066]: Closing: guest@127.0.0.1:1861->jms:1030 because "[B0059]: Client closed the connection". Count: service=0 broker=2

Maybe it's ok, or maybe I should be posting this question on OpenMQ forums, but if anyone that have experienced this before can give me a light I will be very pleased.
Re: Cache Coordination issue [message #659804 is a reply to message #659547] Tue, 15 March 2011 16:34 Go to previous messageGo to next message
rudibravo is currently offline rudibravoFriend
Messages: 17
Registered: December 2010
Junior Member
Following a friends tip I tried this property on my persistence.xml

<property name="eclipselink.cache.coordination.jms.reuse-topic-publisher " value="true"/>

The logs ceased, and I could finally see the cache coordination in action properly. I wonder what kind of problem I'll have using this settings on ecliseplink.

Cheers,
Rudi
Re: Cache Coordination issue [message #753533 is a reply to message #659804] Thu, 27 October 2011 15:21 Go to previous messageGo to next message
Henning Verbeek is currently offline Henning VerbeekFriend
Messages: 4
Registered: October 2011
Junior Member
I've been struggling for a long time trying to get Cache Coordination setup. Would you mind explaining how you did it? It'd be very much appreciated!

Thanks,
Henning

[Updated on: Thu, 27 October 2011 15:22]

Report message to a moderator

Re: Cache Coordination issue [message #753539 is a reply to message #753533] Thu, 27 October 2011 15:34 Go to previous messageGo to next message
rudibravo is currently offline rudibravoFriend
Messages: 17
Registered: December 2010
Junior Member
Hi Henning,
Do you have any ideia where are you struggling now?

I can show you the final configuration I ended up with, to make it work on Glassfish 3.1 / eclipselink 2.3

In my persistence.xml I added the following lines as described in http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.cache.coordination.protocol" value="jms" />
<property name="eclipselink.cache.coordination.jms.topic" value="CacheCoordinationTopic" />
<property name="eclipselink.cache.coordination.jms.factory" value="CacheCoordinationFactory" />

And with the following commands I created the jms Topic
asadmin create-jms-resource --restype javax.jms.Topic --target Cluster CacheCoordinationTopic
asadmin create-jms-resource --restype javax.jms.TopicConnectionFactory --target Cluster --property useSharedSubscriptionInClusteredContainer="false" CacheCoordinationFactory

Hope that helps.

Cheers,
Rudi
Re: Cache Coordination issue [message #753540 is a reply to message #753533] Thu, 27 October 2011 15:34 Go to previous messageGo to next message
rudibravo is currently offline rudibravoFriend
Messages: 17
Registered: December 2010
Junior Member
Hi Henning,
Do you have any ideia where are you struggling now?

I can show you the final configuration I ended up with, to make it work on Glassfish 3.1 / eclipselink 2.3

In my persistence.xml I added the following lines as described in http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.cache.coordination.protocol" value="jms" />
<property name="eclipselink.cache.coordination.jms.topic" value="CacheCoordinationTopic" />
<property name="eclipselink.cache.coordination.jms.factory" value="CacheCoordinationFactory" />

And with the following commands I created the jms Topic
asadmin create-jms-resource --restype javax.jms.Topic --target Cluster CacheCoordinationTopic
asadmin create-jms-resource --restype javax.jms.TopicConnectionFactory --target Cluster --property useSharedSubscriptionInClusteredContainer="false" CacheCoordinationFactory

Hope that helps.

Cheers,
Rudi
Re: Cache Coordination issue [message #753654 is a reply to message #753539] Fri, 28 October 2011 08:20 Go to previous messageGo to next message
Henning Verbeek is currently offline Henning VerbeekFriend
Messages: 4
Registered: October 2011
Junior Member
Hi Rudi,

many thanks for the quick response. My persistence.xml was similar; plus I had also created a physical destination.

Anyway, using your settings, I still get a JNDI lookup error upon deployment:

$ asadmin deploy --target matchpoint-test --name BonusAppServer ~hank/BonusAppServer-1.2-SNAPSHOT.war
Exception [EclipseLink-22106] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.RemoteCommandManagerException
Exception Description: Could not create external JMS connection with Topic CacheCoordinationTopic, Topic Factory CacheCoordinationFactory, and Context properties {dedicated.connection=true}
Internal Exception: Exception [EclipseLink-22103] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.RemoteCommandManagerException
Exception Description: Could not look up remote connection under name CacheCoordinationFactory with URL null
Internal Exception: javax.naming.NamingException: Lookup failed for 'CacheCoordinationFactory' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming, dedicated.connection=true} [Root exception is javax.naming.NameNotFoundException: CacheCoordinationFactory not found]
Command deploy completed with warnings.


I can see Topic and ConnectionFactory under 'asadmin list-jms-resources', but not under 'asadmin list-jndi-resources' (not sure if that's an issue).

Thank you for your help!

Cheers,
Henning
Re: Cache Coordination issue [message #753656 is a reply to message #753539] Fri, 28 October 2011 08:20 Go to previous message
Henning Verbeek is currently offline Henning VerbeekFriend
Messages: 4
Registered: October 2011
Junior Member
sorry - previous message got posted twice after manual page reload...

[Updated on: Fri, 28 October 2011 08:41]

Report message to a moderator

Previous Topic:Problems Executing Stored Procedure in DB2 with EclipseLink v1.2
Next Topic:persisting a hashmap
Goto Forum:
  


Current Time: Thu Dec 18 15:39:00 GMT 2014

Powered by FUDForum. Page generated in 0.03375 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software