I'll open an enhancement request. I've
looked at the code and, you are correct, it doesn't look too difficult
(and I am adventurous) so I may give it a try, but I still think that JMS
is the simplest implementation and the most reliable.
One Sybase Drive
Dublin, CA 94568
James Sutherland <jamesssss@xxxxxxxxx> Sent by: eclipselink-users-bounces@xxxxxxxxxxx
06/30/2009 09:45 AM
Please respond to
EclipseLink User Discussions <eclipselink-users@xxxxxxxxxxx>
Re: [eclipselink-users] Cache Coordination
I'm no Glassfish expert, but I would assume there should be someway to
configure JMS to have it function as needed. At worst case you could
some third party JMS implementation, such as Oracle AQ or other such JMS
Another option is using RMI cache coordination in EclipseLink.
EclipseLink does not currently support JGroups cache coordination, although
we have done this work before in TopLink, so please log an enhancement
request for this. It should not be too much work to get working on
if you are adventurous.
> Our application is running within a GlassFish v2 cluster that utilizes
> REMOTE JMS Cluster. There are only 2 server instances within the cluster
> at this time. I've provided EclipseLink with an implementation of
> SessionCustomizer so I can utilize a JMS Topic to perform my Cache
> Coordination. This proved to be a challenge as GlassFish attempts
> the subscription to the topic when deployed in a cluster. Per one
> Sun engineers:
> The behavior is that we are "sharing" the consumer across
> This behavior is only turned on for a glassfish cluster.
> What does share mean ???
> For durables what it means is:
> if you create two durables with the same name and same clientID on
> different servers ... they will be considered a "single"
> You send 10 messages to topic foo [and create two subscribers with
> clientID of cid1 and a durable name of dname]
> [gf instance 1: cid1, dname on foo] gets 5 messages
> [gf instance 2: cid1, dname on foo] - gets 5 messages
> For non-durable subscribers:
> If you create two subscribers on the same topic with the same clientID,
> they will share messages (same as the above durables case)
> After reading through this I figured out that I don't want the
> subscription shared. I needed to turn off sharing to prevent the messages
> from being distributed over the 2 servers. This was a bit of a challenge
> but I managed to do this by creating a custom implementation of an
> InitialContextFactory, binding the Topic Factory into the Spring container
> and applying some advice to the connection factory to ensure that
> connection does not share subscriptions. This works well in my local
> GlassFish clustered environment. But when I gave it to the Infrastructure
> Group to deploy in their test environment their GlassFish instances
> to have issues. They contacted a Sun consultant that helped them configure
> the environment and he recommended that we not use JMS for EclipseLink
> Cache Coordination but rather JGroups. I read over their documentation
> this is a completely proprietary messaging implementation using IP
> Multicast. While this looks like a good library, this would be a custom
> implementation that would not interface well with EclipseLink and
> require me to do a considerable amount of work.
> Can anyone speak to this? Personally, I find that the JMS implementation
> of Cache Coordination seems very simple and easy to use. I don't see
> there would be any disadvantages to using it nor do I see any reason
> should utilize JGroups.
> Thanks for the help...
> Chris Mathrusse
> Sybase, Inc