Defines a load balancer configuration, which can be referenced by a physical load-balancer.
Some topics in the documentation pertain to features that are available only in domains that are configured to support clusters. Examples of domains that support clusters are domains that are created with the cluster profile or the enterprise profile. For information about profiles, see Usage Profiles in Sun GlassFish Enterprise Server 2.1 Administration Guide.
The following table describes subelements for the lb-config element.
Table 1–101 lb-config Subelements
Element |
Required |
Description |
---|---|---|
zero or more; zero if a server-ref is defined |
References a cluster. This element contains some attributes related to load balancing. |
|
zero or more; zero if a cluster-ref is defined |
References a server instance that does not belong to a cluster. The referenced server element contains some attributes related to load balancing. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the lb-config element.
Table 1–102 lb-config Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the name of the load balancer configuration. |
|
60 |
(optional) Specifies the time within which a server must return a response or it is considered unhealthy. |
|
false |
(optional) If true, HTTPS requests to the load balancer result in HTTPS requests to the server. If false, HTTPS requests to the load balancer result in HTTP requests to the server. |
|
60 |
(optional) Specifies the interval between checks for changes to the load balancer configuration file (loadbalancer.xml). When changes are detected, the file is reloaded. A value of zero disables reloading. |
|
false |
(optional) If true, enables monitoring of load balancing. |
Contains load balancer configurations.
The following table describes subelements for the lb-configs element.
Table 1–103 lb-configs Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Defines a load balancer configuration. |
Specifies a deployed lifecycle module. For more information about lifecycle modules, see the Sun GlassFish Enterprise Server 2.1 Developer’s Guide.
The following table describes subelements for the lifecycle-module element.
Table 1–104 lifecycle-module Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the lifecycle-module element.
Table 1–105 lifecycle-module Attributes
Attribute |
Default |
Description |
---|---|---|
none |
The name of the lifecycle module. |
|
none |
The fully qualified name of the lifecycle module’s class file, which must implement the com.sun.appserv.server.LifecycleListener interface. |
|
value of application-root attribute of domain element |
(optional) The classpath for the lifecycle module. Specifies where the module is located. |
|
none |
(optional) Determines the order in which lifecycle modules are loaded at startup. Modules with smaller integer values are loaded sooner. Values can range from 101 to the operating system’s MAXINT. Values from 1 to 100 are reserved. |
|
false |
(optional) Determines whether the server is shut down if the lifecycle module fails. |
|
user |
(optional) Defines the type of the resource. Allowed values are:
|
|
enabled |
true |
(optional) Determines whether the lifecycle module is enabled. |
Configures the listener class that listens for alerts from notification emitters. For example:
<listener-config listener-class-name="com.sun.enterprise.admin.notification.MailAlert" subcribe-listener-with="LogMBean,ServerStatusMonitor" > <property name="recipients" value="Huey@sun.com,Dewey@sun.com" /> <property name="fromAddress" value="Louie@sun.com" /> <property name="subject" value="Help!" /> <property name="includeDiagnostics" value="false" /> <property name="mailSMTPHost" value="ducks.sun.com" /> </listener-config>
The following table describes subelements for the listener-config element.
Table 1–106 listener-config Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the listener-config element.
Table 1–107 listener-config Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the class name of the listener. The com.sun.appserv.admin.notification.MailAlert class is provided with the Enterprise Server, but a custom listener can be used. |
|
none |
Specifies a comma-separated list of notification emitters to which the listener listens. The LogMBean and ServerStatusMonitor notification emitters are provided with the Enterprise Server, but custom emitters can be used. |
Defines and configures a load balancer. For more information about load balancing in the Enterprise Server, see the Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide.
Some topics in the documentation pertain to features that are available only in domains that are configured to support clusters. Examples of domains that support clusters are domains that are created with the cluster profile or the enterprise profile. For information about profiles, see Usage Profiles in Sun GlassFish Enterprise Server 2.1 Administration Guide.
The following table describes subelements for the load-balancer element.
Table 1–108 load-balancer Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the load-balancer element.
Table 1–109 load-balancer Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the name of the load balancer. |
|
none |
Specifies the name of the lb-config used by the load balancer. |
|
false |
(optional) If true, changes to the specified lb-config are automatically applied to the load balancer. |
The following table describes properties for the load-balancer element.
Table 1–110 load-balancer Properties
Property |
Default |
Description |
---|---|---|
none |
Specifies the host name or IP address for the load balancer. |
|
none |
Specifies the load balancer's administration port number. |
|
none |
Specifies the load balancer's proxy host used for outbound HTTP. |
|
none |
Specifies the load balancer's proxy port used for outbound HTTP. |
Contains load balancers.
The following table describes subelements for the load-balancers element.
Table 1–111 load-balancers Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Defines a load balancer. |
Configures the server log file, which stores messages from the default virtual server. Messages from other configured virtual servers also go here, unless the log-file attribute is explicitly specified in the virtual-server element. The default name is server.log.
Other log files are configured by other elements:
A virtual server log file stores messages from a virtual-server element that has an explicitly specified log-file attribute. See virtual-server.
The access log file stores HTTP access messages from the default virtual server. The default name is access.log. See access-log and http-access-log.
The transaction log files store transaction messages from the default virtual server. The default name of the directory for these files is tx. See transaction-service.
The following table describes subelements for the log-service element.
Table 1–112 log-service Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies log levels. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the log-service element.
Table 1–113 log-service Attributes
Attribute |
Default |
Description |
---|---|---|
server.log in the directory specified by the log-root attribute of the domain element |
(optional) Overrides the name or location of the server log. The file and directory in which the server log is kept must be writable by the user account under which the server runs. An absolute path overrides the log-root attribute of the domain element. A relative path is relative to the log-root attribute of the domain element. If no log-root value is specified, it is relative to domain-dir/config . |
|
false |
(optional) If true, uses the UNIX syslog service to produce and manage logs. |
|
none |
(optional) Specifies a custom log handler to be added to end of the chain of system handlers to log to a different destination. |
|
none |
(optional) Specifies a log filter to do custom filtering of log records. |
|
false |
(optional) Deprecated and ignored. |
|
2000000 |
(optional) Log files are rotated when the file size reaches the specified limit. |
|
0 |
(optional) Enables time-based log rotation. The valid range is 60 minutes (1 hour) to 14400 minutes (10*24*60 minutes or 10 days). If the value is zero, the files are rotated based on the size specified in log-rotation-limit-in-bytes. If the value is greater than zero, log-rotation-timelimit-in-minutes takes precedence over log-rotation-limit-in-bytes . |
|
5 |
(optional) Specifies the number of most recent hours for which error statistics are retained in memory. The default and minimum value is 5 hours. The maximum value allowed is 500 hours. Larger values incur additional memory overhead. |