dev@glassfish.java.net

Re: Identifying stand alone instance

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Fri, 09 Jul 2010 18:35:09 +0530

On Fri, 2010-07-09 at 10:14 +0530, Yamini K B wrote:
> > Depends on what you have. If you have a Server object you can call
> > getCluster() on it. Or if you have a Domain you can call
> > domain.getClusterForInstance()
> I have the Server object as well as Domain. Is it ok to conclude that,
> if server does not belong to a cluster it has to be standalone?
You can do :
server.getCluster() == null && server.isInstance()

to check whether an instance is standalone (neither DAS, nor part of
Cluster).


>
> v2's isServerStandAlone() does a more thorough verification like
> configuration is standalone meaning it is referenced by this server only
> and that no other clusters or servers refer to its configuration.
>
> Thanks,
> -Yamini
> >
> > isInstance() won't work -- it returns true for both clustered and
> > stand-alone instances
> >
> >
> > On 7/8/2010 11:19 AM, Mitesh Meswani wrote:
> >> ServerEnvironment#isInstance()
> >>
> >> On 7/8/2010 11:09 AM, Yamini K B wrote:
> >>> Hi,
> >>>
> >>> Whats the equivalent of v2's ServerHelper.isServerStandAlone() in v3.1
> >>>
> >>> -Yamini
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> >>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> >> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>