dev@glassfish.java.net

Re: which domain is running?

From: Ludovic Champenois <Ludovic.Champenois_at_Sun.COM>
Date: Fri, 21 Aug 2009 13:31:49 -0700

On 8/21/09 12:54 PM, Bill Shannon wrote:
> I've been thinking about this list-domains bug:
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=7581
>
> If I have two domains, both using the same admin port, how do I
> tell which of the domains is running? I need some way to tell whether
> the server I'm talking to corresponds to the domain directory I'm
> looking at.
>
We have the same issue with NetBeans or Eclipse integration where you
can register many different domains...(multiple v1,v2,v2.1,v3p,v3 nightlies)
The extra info we have there is that the IDEs know the installed
location of these local servers, so the trick is to ask the running
server its installation directory and then we know which one is running
or not with domain location comparison

http://localhost:4848/__asadmin/__locations
or
asadmin __location

will give you the install and domain locations IIRC.
Hope this helps.

Ludo

> Ah ha, I thought, I'll use the local password! Each domain has
> a unique local password and only that domain will accept its
> local password. Except... If the domain is set up for anonymous
> login, it doesn't look at the password at all. :-(
>
> I've thought of two ways around this problem:
>
> 1. Define a new user name (e.g., "--LOCAL--") for which the local
> password is *always* verified. Use this user name when list-domains
> contacts the server.
>
> 2. Create a new "verify-local-password" command that takes the local
> password as an operand and does the verification.
>
> Anyone have any advice on which approach to use, or want to suggest
> another approach to solving the original problem?
>
> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>