dev@glassfish.java.net

Re: which domain is running?

From: Scott Oaks <Scott.Oaks_at_Sun.COM>
Date: Fri, 21 Aug 2009 16:41:32 -0400

You could ask the domain to return its user.dir System.property and
figure out which directory that is. That's typically how I figure out
which domain I'm running (except I cheat and use an os-level command to
find the working directory, which probably you can't do on some platforms).

-Scott

On 08/21/09 15:54, 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.
>
> 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
>