Exit Print View

Sun GlassFish Enterprise Server v3 Domain File Format Reference

  This Document Entire Library
Print View

Document Information

Preface

1.  The domain.xml File

About the domain.xml File

Verification

Extensibility

Backup

Default Values

Variables

Element Referencing

Element Hierarchy

Alphabetical List of Elements

A

access-log

Superelements

Subelements

Attributes

admin-object-resource

Superelements

Subelements

Attributes

Properties

admin-service

Superelements

Subelements

Attributes

appclient-module

Superelements

Subelements

Attributes

application

Superelements

Subelements

Attributes

Properties

application-ref

Superelements

Subelements

Attributes

applications

Superelements

Subelements

audit-module

Superelements

Subelements

Attributes

Properties

auth-realm

Superelements

Subelements

Attributes

Properties

B

backend-principal

Superelements

Subelements

Attributes

C

config

Superelements

Subelements

Attributes

configs

Superelements

Subelements

connection-pool

Superelements

Subelements

Attributes

connector-connection-pool

Superelements

Subelements

Attributes

Properties

connector-module

Superelements

Subelements

Attributes

connector-resource

Superelements

Subelements

Attributes

connector-service

Superelements

Subelements

Attributes

context-param

Superelements

Subelements

Attributes

custom-resource

Superelements

Subelements

Attributes

D

das-config

Superelements

Subelements

Attributes

description

Superelements

Subelements

domain

Superelements

Subelements

Attributes

E

ejb-container

Superelements

Subelements

Attributes

ejb-module

Superelements

Subelements

Attributes

ejb-timer-service

Superelements

Subelements

Attributes

engine

Superelements

Subelements

Attributes

env-entry

Superelements

Subelements

Attributes

env-entry-name

Superelements

Subelements

env-entry-type

Superelements

Subelements

env-entry-value

Superelements

Subelements

extension-module

Superelements

Subelements

Attributes

external-jndi-resource

Superelements

Subelements

Attributes

F

file-cache

Superelements

Subelements

Attributes

G

group-map

Superelements

Subelements

Attributes

H

http

Superelements

Subelements

Attributes

http-access-log

Superelements

Subelements

Attributes

http-file-cache

Superelements

Subelements

Attributes

http-listener

Superelements

Subelements

Attributes

Properties

http-protocol

Superelements

Subelements

Attributes

http-service

Superelements

Subelements

Attributes

Properties

I

iiop-listener

Superelements

Subelements

Attributes

iiop-service

Superelements

Subelements

Attributes

J

j2ee-application

Superelements

Subelements

Attributes

jacc-provider

Superelements

Subelements

Attributes

Properties

java-config

Superelements

Subelements

Attributes

jdbc-connection-pool

Superelements

Subelements

Attributes

Properties

jdbc-resource

Superelements

Subelements

Attributes

jms-host

Superelements

Subelements

Attributes

jms-service

Superelements

Subelements

Attributes

Properties

jmx-connector

Superelements

Subelements

Attributes

jruby-container

Superelements

Subelements

Attributes

jruby-runtime-pool

Superelements

Subelements

Attributes

jvm-options

Superelements

Subelements

K

keep-alive

Superelements

Subelements

Attributes

L

lifecycle-module

Superelements

Subelements

Attributes

log-service

Superelements

Subelements

Attributes

Properties

M

mail-resource

Superelements

Subelements

Attributes

Properties

manager-properties

Superelements

Subelements

Attributes

mdb-container

Superelements

Subelements

Attributes

Properties

message-security-config

Superelements

Subelements

Attributes

module

Superelements

Subelements

Attributes

module-log-levels

Superelements

Subelements

Attributes

module-monitoring-levels

Superelements

Subelements

Attributes

monitoring-service

Superelements

Subelements

N

network-config

Superelements

Subelements

network-listener

Superelements

Subelements

Attributes

network-listeners

Superelements

Subelements

O

orb

Superelements

Subelements

Attributes

P

param-name

Superelements

Subelements

param-value

Superelements

Subelements

port-unification

Superelements

Subelements

Attributes

principal

Superelements

Subelements

principal-map

Superelements

Subelements

Attributes

profiler

Superelements

Subelements

Attributes

property

Superelements

Subelements

Attributes

protocol

Superelements

Subelements

Attributes

protocol-chain

Superelements

Subelements

Attributes

protocol-chain-instance-handler

Superelements

Subelements

Attributes

protocol-filter

Superelements

Subelements

Attributes

protocol-finder

Superelements

Subelements

Attributes

protocols

Superelements

Subelements

provider-config

Superelements

Subelements

Attributes

Properties

R

registry-location

Superelements

Subelements

Attributes

request-policy

Superelements

Subelements

Attributes

request-processing

Superelements

Subelements

Attributes

resource-adapter-config

Superelements

Subelements

Attributes

Properties

resource-ref

Superelements

Subelements

Attributes

resources

Superelements

Subelements

response-policy

Superelements

Subelements

Attributes

S

security-map

Superelements

Subelements

Attributes

security-service

Superelements

Subelements

Attributes

selection-key-handler

Superelements

Subelements

Attributes

server

Superelements

Subelements

Attributes

servers

Superelements

Subelements

session-config

Superelements

Subelements

session-manager

Superelements

Subelements

session-properties

Superelements

Subelements

Attributes

Properties

ssl

Superelements

Subelements

Attributes

ssl-client-config

Superelements

Subelements

store-properties

Superelements

Subelements

Attributes

system-applications

Superelements

Subelements

system-property

Superelements

Subelements

Attributes

Properties

T

thread-pool

Superelements

Subelements

Attributes

thread-pools

Superelements

Subelements

transaction-service

Superelements

Subelements

Attributes

Properties

transformation-rule

Superelements

Subelements

Attributes

transport

Superelements

Subelements

Attributes

transports

Superelements

Subelements

U

user-group

Superelements

Subelements

V

virtual-server

Superelements

Subelements

Attributes

Properties

W

web-container

Superelements

Subelements

Properties

web-module

Superelements

Subelements

Attributes

web-module-config

Superelements

Subelements

web-service-endpoint

Superelements

Subelements

Attributes

work-security-map

Superelements

Subelements

Attributes

Index

V

virtual-server

Defines a virtual server. A virtual server, also called a virtual host, is a virtual web server that serves content targeted for a specific URL. Multiple virtual servers can serve content using the same or different host names, port numbers, or IP addresses. The HTTP service can direct incoming web requests to different virtual servers based on the URL.

When the Enterprise Server is first installed, a default virtual server is created. (You can also assign a default virtual server to each new http-listener you create.)


Note - Virtual servers are not the same thing as server instances. Each server instance is a completely separate server that contains one or more virtual servers.


Before the Enterprise Server can process a request, it must accept the request via a listener, then direct the request to the correct virtual server. The virtual server is determined as follows:

If a virtual server is configured to an SSL listener, its hosts attribute is checked against the subject pattern of the certificate at server startup, and a warning is generated and written to the server log if they don’t match.

Superelements

http-service

Subelements

The following table describes subelements for the virtual-server element.

virtual-server Subelements
Element
Required
Description
zero or one
Defines an access log file.
zero or more
Specifies a property or a variable.
Attributes

The following table describes attributes for the virtual-server element.

virtual-server Attributes
Attribute
Default
Description
id
none
Virtual server ID. This is a unique ID that allows lookup of a specific virtual server. A virtual server ID cannot begin with a number.
http-listeners
none
(optional) Remapped to the network-listeners attribute of this element.
network-listeners
none
(optional) In a comma-separated list, references id attributes of network-listener elements that specify the connection(s) the virtual server uses. Required only for a virtual-server that is not referenced by the default-virtual-server attribute of an http element.
default-web-module
none
(optional) References the name attribute of the default web application for this virtual server, which responds to requests that cannot be resolved to other web modules deployed to this virtual server (see the application-ref element).
hosts
${com.sun.aas.hostName}
A comma-separated list of values, each of which selects the current virtual server when included in the Host request header. Two or more virtual-server elements that reference or are referenced by the same http-listener cannot have any hosts values in common.
state
on
(optional) Determines whether a virtual-server is active (on) or inactive (off, disabled). The default is on (active). When inactive, a virtual-server does not service requests. If a virtual-server is disabled, only the global server administrator can turn it on.
docroot
domain-dir/docroot
(optional) Specifies the document root for this virtual server.
access-log
domain-dir/logs/access
(optional) Specifies the access log location. The file and directory in which the access log is kept must be writable by the user account under which the server runs. See the log-service description for details about logs.
log-file
server.log in the directory specified by the log-root attribute of the domain element
(optional) Writes this virtual server’s log messages to a log file separate from the server log. The file and directory in which the virtual server log is kept must be writable by the user account under which the server runs. See the log-service description for details about logs.
access-logging-enabled
inherit
If true, enables access logging for this virtual server. If false, disables access logging for this virtual server.

A true or false setting overrides the access-logging-enabled attribute setting of the http-service element. An inherit setting uses the access-logging-enabled attribute setting of the http-service element.

sso-enabled
inherit
If true, single sign-on is enabled for web applications on this virtual server that are configured for the same realm. If false, single sign-on is disabled for this virtual server, and users must authenticate separately to every application on the virtual server.

A true or false setting overrides the sso-enabled attribute setting of the http-service element. An inherit setting uses the sso-enabled attribute setting of the http-service element.

sso-cookie-secure
dynamic
Sets the Secure attribute of any JSESSIONIDSSO cookies associated with the web applications deployed to this virtual server. Applicable only if the sso-enabled attribute is set to true. Allowed values are as follows:
  • true — Sets Secure to true.

  • false — Sets Secure to false.

  • dynamic — The JSESSIONIDSSO cookie inherits the Secure setting of the first session participating in SSO.

To set the Secure attribute of a JSESSIONID cookie, use the cookieSecure cookie-properties property in the sun-web.xml file. For details, see cookie-properties in Sun GlassFish Enterprise Server v3 Application Deployment Guide.

Properties

The following table describes properties for the virtual-server element.

virtual-server Properties
Property
Default
Description
sso-enabled
false
Deprecated. Use the sso-enabled attribute instead.
sso-max-inactive-seconds
300
Specifies the time after which a user’s single sign-on record becomes eligible for purging if no client activity is received. Since single sign-on applies across several applications on the same virtual server, access to any of the applications keeps the single sign-on record active. Higher values provide longer single sign-on persistence for the users at the expense of more memory use on the server.
sso-reap-interval-seconds
60
Specifies the interval between purges of expired single sign-on records.
ssoCookieSecure
dynamic
Deprecated. Use the sso-cookie-secure attribute instead.
setCacheControl
none
Specifies a comma-separated list of Cache-Control response directives. For a list of valid directives, see section 14.9 of the document at http://www.ietf.org/rfc/rfc2616.txt.
accessLoggingEnabled
false
Deprecated. Use the access-logging-enabled attribute instead.
accessLogBufferSize
32768
Specifies the size, in bytes, of the buffer where access log calls are stored. If the value is less than 5120, a warning message is issued, and the value is set to 5120.
accessLogWriteInterval
300
Specifies the number of seconds before the log is written to the disk. The access log is written when the buffer is full or when the interval expires. If the value is 0, the buffer is always written even if it is not full. This means that each time the server is accessed, the log message is stored directly to the file.
allowRemoteAddress
none
Specifies a comma-separated list of regular expression patterns that the remote client's IP address is compared to. If this property is specified, the remote address must match for this request to be accepted. If this property is not specified, all requests are accepted unless the remote address matches a denyRemoteAddress pattern.
denyRemoteAddress
none
Specifies a comma-separated list of regular expression patterns that the remote client's IP address is compared to. If this property is specified, the remote address must not match for this request to be accepted. If this property is not specified, request acceptance is governed solely by the allowRemoteAddress property.
allowRemoteHost
none
Specifies a comma-separated list of regular expression patterns that the remote client's hostname (as returned by [java.net.]Socket.getInetAddress().getHostName()) is compared to. If this property is specified, the remote hostname must match for this request to be accepted. If this property is not specified, all requests are accepted unless the remote hostname matches a denyRemoteHost pattern.
denyRemoteHost
none
Specifies a comma-separated list of regular expression patterns that the remote client's hostname (as returned by [java.net.]Socket.getInetAddress().getHostName()) is compared to. If this property is specified, the remote hostname must not match for this request to be accepted. If this property is not specified, request acceptance is governed solely by the allowRemoteHost property.

Setting this property has no effect if jk-enabled is set to true for a network-listener.

authRealm
none
Specifies the name attribute of an auth-realm element, which overrides the server instance's default realm for stand-alone web applications deployed to this virtual server. A realm defined in a stand-alone web application's web.xml file overrides the virtual server's realm.
securePagesWithPragma
true
Set this property to false to ensure that for all web applications on this virtual server file downloads using SSL work properly in Internet Explorer.

You can set this property for a specific web application. For details, see sun-web-app in Sun GlassFish Enterprise Server v3 Application Deployment Guide.

alternatedocroot_n
none
Specifies an alternate document root (docroot), where n is a positive integer that allows specification of more than one. Alternate docroots allow web applications to serve requests for certain resources from outside their own docroot, based on whether those requests match one (or more) of the URI patterns of the web application's alternate docroots.

If a request matches an alternate docroot's URI pattern, it is mapped to the alternate docroot by appending the request URI (minus the web application's context root) to the alternate docroot's physical location (directory). If a request matches multiple URI patterns, the alternate docroot is determined according to the following precedence order:

  • Exact match

  • Longest path match

  • Extension match

For example, the following properties specify three alternate docroots. The URI pattern of the first alternate docroot uses an exact match, whereas the URI patterns of the second and third alternate docroots use extension and longest path prefix matches, respectively.

<property name="alternatedocroot_1" 
   value="from=/my.jpg dir=/srv/images/jpg"/>
<property name="alternatedocroot_2" 
   value="from=*.jpg dir=/srv/images/jpg"/>
<property name="alternatedocroot_3" 
   value="from=/jpg/* dir=/src/images"/>

The value of each alternate docroot has two components: The first component, from, specifies the alternate docroot's URI pattern, and the second component, dir, specifies the alternate docroot's physical location (directory). Spaces are allowed in the dir component.

You can set this property for a specific web application. For details, see sun-web-app in Sun GlassFish Enterprise Server v3 Application Deployment Guide.

contextXmlDefault
none
Specifies the location, relative to domain-dir, of the context.xml file for this virtual server, if one is used. For more information about the context.xml file, see Using a context.xml File in Sun GlassFish Enterprise Server v3 Application Development Guide and The Context Container. Context parameters, environment entries, and resource definitions in context.xml are supported in the Enterprise Server.
allowLinking
false
If true, resources that are symbolic links in web applications on this virtual server are served. The value of this property in the sun-web.xml file takes precedence if defined. For details, see sun-web-app in Sun GlassFish Enterprise Server v3 Application Deployment Guide.

Caution

Caution - Setting this property to true on Windows systems exposes JSP source code.


send-error_n
none
Specifies custom error page mappings for the virtual server, which are inherited by all web applications deployed on the virtual server. A web application can override these custom error page mappings in its web.xml deployment descriptor. The value of each send-error_n property has three components, which may be specified in any order:

The first component, code, specifies the three-digit HTTP response status code for which the custom error page should be returned in the response.

The second component, path, specifies the absolute or relative file system path of the custom error page. A relative file system path is interpreted as relative to the domain-dir/config directory.

The third component, reason, is optional and specifies the text of the reason string (such as Unauthorized or Forbidden) to be returned.

For example:

<property name="send-error_1"
   value="code=401 path=/myhost/401.html reason=MY-401-REASON"/>

This example property definition causes the contents of /myhost/401.html to be returned with 401 responses, along with this response line:

HTTP/1.1 401 MY-401-REASON
redirect_n
none
Specifies that a request for an old URL is treated as a request for a new URL. These properties are inherited by all web applications deployed on the virtual server. The value of each redirect_n property has two components, which may be specified in any order:

The first component, from, specifies the prefix of the requested URI to match.

The second component, url-prefix, specifies the new URL prefix to return to the client. The from prefix is simply replaced by this URL prefix.

For example:

<property name="redirect_1" 
value="from=/dummy url-prefix=http://etude"/>
valve_n
none
Specifies a fully qualified class name of a custom valve, where n is a positive integer that allows specification of more than one. The valve class must implement the org.apache.catalina.Valve interface from Tomcat or previous Enterprise Server releases, or the org.glassfish.web.valve.GlassFishValve interface from the current Enterprise Server release. For example:
<property name="valve_1" 
   value="org.glassfish.extension.Valve"/>

You can set this property for a specific web application. For details, see sun-web-app in Sun GlassFish Enterprise Server v3 Application Deployment Guide.

listener_n
none
Specifies a fully qualified class name of a custom Catalina listener, where n is a positive integer that allows specification of more than one. The listener class must implement the org.apache.catalina.ContainerListener or org.apache.catalina.LifecycleListener interface. For example:
<property name="listener_1" 
   value="org.glassfish.extension.MyLifecycleListener"/>

You can set this property for a specific web application. For details, see sun-web-app in Sun GlassFish Enterprise Server v3 Application Deployment Guide.

errorReportValve
org.apache.catalina.valves.ErrorReportValve
Specifies a fully qualified class name of a custom valve that produces default error pages for applications on this virtual server. Specify an empty string to disable the default error page mechanism for this virtual server.