dev@glassfish.java.net

Re: asadmin get command for lb host and http port

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Mon, 18 Jul 2011 08:49:10 -0500

On 7/17/2011 7:31 PM, vince kraemer wrote:
> Hi all,
>
> I know how to 'get' the hostname and port for the instances that make
> up a cluster... but I assume that at some point an admin will hide all
> these details behind a load balancer.
>
> Once that happens, it doesn't make sense to have something like an IDE
> dig out the name/port combinations. The IDE should run traffic that
> it generates through the load balancer... so the app/config gets
> tested end-to-end.
>
> What combination of get commands would I need to execute to determine:
>
> 1. that an LB is configured to 'handle' a particular cluster and/or
> stand-alone instance?
An lb-config element has a cluster-ref-or-server-ref list. So look in:

lb-configs.lb-config.<lbcname>.cluster-ref-or-server-ref-list

for the name of the cluster or standalone instance. Then use that
<lbcname> to find a load-balancer that references it:

load-balancers.load-balancer.<lbname>.lb-config-name=<lbcname>

Then use the <lbname> to look up the host/port:

load-balancers.load-balancer.<lbname>.device-host
load-balancers.load-balancer.<lbname>.device-port

Kshitiz can confirm of this is correct.

Tom



>
> 2. the hostname and port (and any other necessary info) so the IDE can
> open the browser correctly when a user selects the Run item on a
> project that is deployed onto a GF 3.1 cluster and/or instance?
>
> Thanks,
> vbk
>