Oracle GlassFish Server 3.1 Section 1: asadmin Utility Subcommands
create-connector-connection-pool(1)
create-connector-security-map(1)
create-connector-work-security-map(1)
create-jdbc-connection-pool(1)
create-message-security-provider(1)
create-resource-adapter-config(1)
delete-connector-connection-pool(1)
delete-connector-security-map(1)
delete-connector-work-security-map(1)
delete-jdbc-connection-pool(1)
delete-message-security-provider(1)
delete-resource-adapter-config(1)
disable-http-lb-application(1)
disable-secure-admin-internal-user(1)
disable-secure-admin-principal(1)
enable-secure-admin-internal-user(1)
enable-secure-admin-principal(1)
list-connector-connection-pools(1)
list-connector-security-maps(1)
list-connector-work-security-maps(1)
list-message-security-providers(1)
list-resource-adapter-configs(1)
list-secure-admin-internal-users(1)
list-secure-admin-principals(1)
list-supported-cipher-suites(1)
unfreeze-transaction-service(1)
update-admin-server-coordinates(1)
update-admin-server-local-coordinates(1)
update-connector-security-map(1)
update-connector-work-security-map(1)
Oracle GlassFish Server 3.1 Section 1M: Utility Commands
Oracle GlassFish Server 3.1 Section 5ASC: GlassFish Server Concepts
- adds an existing cluster or server instance to an existing load balancer configuration or load balancer
create-http-lb-ref [--help] --config config_name | --lbname load_balancer_name [--lbpolicy round-robin] [--lbpolicymodule lb_policy_module] [--healthcheckerurl url] [--healthcheckerinterval 10] [--healthcheckertimeout 10] [--lbenableallinstances=true] [--lbenableallapplications=true] [--lbweight instance=weight[:instance=weight]*] target
Use the create-http-lb-ref subcommand to:
Add an existing cluster or server instance to an existing load balancer configuration or load balancer. The load balancer forwards the requests to the clustered and standalone instances it references.
Set the load balancing policy to round-robin, weighted round-robin, or to a user-defined policy.
Configure a health checker for the load balancer. Any health checker settings defined here apply only to the target. If you do not create a health checker with this subcommand, use create-http-health-checker.
Enable all instances in the target cluster for load balancing, or use enable-http-lb-server to enable them individually.
Enable all applications deployed to the target for load balancing, or use enable-http-lb-application to enable them individually.
Note - This subcommand is only applicable to Oracle GlassFish Server. This subcommand is not applicable to GlassFish Server Open Source Edition.
Displays the help text for the subcommand.
Specifies which load balancer configuration to which to add clusters and server instances. Specify either a load balancer configuration or a load balancer. Specifying both results in an error.
Specifies the load balancer to which to add clusters and server instances. Specify either a load balancer configuration or a load balancer. Specifying both results in an error.
The policy the load balancer follows. Valid values are round-robin, weighted-round-robin, and user-defined. If you choose user-defined, specify a load balancer policy module with the lbpolicymodule option. If you choose weighted-round-robin assign weights to the server instances using the configure-lb-weight subcommand. The default is round-robin.
If your load balancer policy is user-defined, use this option to specify the full path and name of the shared library of your load balancing policy module. The shared library needs to be in a location accessible by the web server.
The URL to ping to determine whether the instance is healthy.
The interval in seconds the health checker waits between checks of an unhealthy instance to see whether it has become healthy. The default value is 30 seconds. A value of 0 disables the health checker.
The interval in seconds the health checker waits to receive a response from an instance. If the health checker has not received a response in this interval, the instance is considered unhealthy. The default is 10.
Enables all instances in the target cluster for load balancing. If the target is a server instance, enables that instance for load balancing. The default value is true.
Enables all applications deployed to the target cluster or instance for load balancing. The default value is true.
The name of the instance and the weight you are assigning it. The weight must be an integer. The pairs of instances and weights are separated by colons. For example instance1=1:instance2=4 means that for every five requests, one goes to instance1 and four go to instance2. A weight of 1 is the default.
Specifies which cluster or instance to add to the load balancer. Valid values are:
cluster_name- Specifies that requests for this cluster will be handled by the load balancer.
stand-alone_instance_name- Specifies that requests for this standalone instance will be handled by the load balancer.
Example 1 Adding a Cluster Reference to a Load Balancer Configuration
This example adds a reference to a cluster named cluster2 to a load balancer configuration named mylbconfig.
asadmin> create-http-lb-ref --config mylbconfig cluster2 Command create-http-lb-ref executed successfully.
Example 2 Adding a Cluster Reference to a Load Balancer
This example adds a reference to a cluster named cluster2 to a load balancer named mylb.
asadmin> create-http-lb-ref --lbname mylb cluster2 Command create-http-lb-ref executed successfully.
Example 3 Configuring a Health Checker and Load Balancer Policy
This example configures a health checker and load balancing policy, and enables the load balancer for instances and applications.
asadmin> create-http-lb-ref --config mylbconfig --lbpolicy weighted-round-robin --healthcheckerinterval 40 --healthcheckertimeout 20 --lbenableallinstances=true --lbenableallapplications=true cluster2 Command create-http-lb-ref executed successfully.
Example 4 Setting a User-Defined Load Balancing Policy
This example sets a user-defined load balancing policy.
asadmin> create-http-lb-ref --lbpolicy user-defined --lbpolicymodule /user/modules/module.so --config mylbconfig cluster2 Command create-http-lb-ref executed successfully.
subcommand executed successfully
error in executing the subcommand
delete-http-lb-ref(1), create-http-health-checker(1), enable-http-lb-server(1), enable-http-lb-application(1), list-http-lb-configs(1), list-http-lbs(1) configure-lb-weight(1)