users@shoal.java.net

RE: Group Leader PB on Glassfish

From: Olivier LAGACHE <olivier.lagache_at_ipfrance.fr>
Date: Tue, 29 Apr 2008 16:30:23 +0200

Hi Shreedhar,


It seems that you have found the solution... But I still have some
questions in order to make it work (https://shoal.dev.java.net/servlets/ReadMsg?list=users&msgNo=165
).

Our Web application is deployed on Glassfish and we started our own
instance of Shoal.
Maybe it's a good solution with Tomcat server or others but not with
Glassfih which already uses Shoal.
The question is how we can get a Shoal instance from our web
application once deployed in Glassfish Cluster ?

One of your solution is :
> If your use case is to pick one member of the cluster (and not
including DAS), then this approach will not work. What you could do is
to call GroupHandle.getCurrentCoreMembers(). This returns the cluster
members
> who join the group as core members (as opposed to DAS which is a
Spectator member). You can then choose the first or a specific member
to be the one you are looking for, to perform the one time task.

Do you mean that GroupHandle.getCurrentCoreMembers() return an ordered
list and if I choose the first, it will be the first on all instances
of our application ?

Thanks in anticipation,

Best regards

        << Olivier >>