Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Application Server 7 Administrator's Configuration File Reference

Chapter 2
Server Configuration Files

The server.xml file contains most of the server configuration. The encoding is UTF-8 to maintain compatibility with regular UNIX text editors. The server.xml file is located in the instance_dir/config directory. A schema file, sun-server_1_0.dtd, determines the format and content of the server.xml file.

This chapter describes server.xml and sun-server_1_0.dtd in these sections:


The sun-server_1_0.dtd File

The sun-server_1_0.dtd file defines the structure of the server.xml file, including the elements it can contain and the subelements and attributes these elements can have. The sun-server_1_0.dtd file is located in the install_dir/lib/dtds directory.


Note

Do not edit the sun-server_1_0.dtd file; its contents change only with new versions of Sun ONE Application Server.



Note

The sun-server_1_0.dtd interface is Unstable. An unstable interface may be experimental or transitional, and hence may change incompatibly, be removed, or be replaced by a more stable interface in the next release.


For general information about DTD files and XML, see the XML specification at:

http://www.w3.org/TR/REC-xml

Each element defined in a DTD file (which may be present in the corresponding XML file) can contain the following:

Subelements

Elements can contain subelements. For example, the following file fragment defines the iiop-listener element.

<!ELEMENT iiop-listener (ssl?, property*)>

The ELEMENT tag specifies that an iiop-listener element can contain ssl and property elements in that order.

The following table shows how optional suffix characters of subelements determine the requirement rules, or number of allowed occurrences, for the subelements. The left column lists the subelement ending character, and the right column lists the corresponding requirement rule.

Table 2-1  requirement rules and subelement suffixes

Subelement Suffix

Requirement Rule

element*

Can contain zero or more of this subelement.

element?

Can contain zero or one of this subelement.

element+

Must contain one or more of this subelement.

element (no suffix)

Must contain only one of this subelement.

If an element cannot contain other elements, you see EMPTY or (#PCDATA) instead of a list of element names in parentheses.

Data

Some elements contain character data instead of subelements. These elements have definitions of the following format:

<!ELEMENT element-name (#PCDATA)>

For example:

<!ELEMENT description (#PCDATA)>

In the server.xml file, white space is treated as part of the data in a data element. Therefore, there should be no extra white space before or after the data delimited by a data element. For example:

<description>shopping cart bean</description>

Attributes

Elements that have ATTLIST tags contain attributes (name-value pairs). For example:

<!ATTLIST iiop-listener    id        CDATA      #REQUIRED
                           address   CDATA      #REQUIRED
                           port      CDATA      "3700"
                           enabled   %boolean;  "true">

An iiop-listener element can contain id, address, port, and enabled attributes.

The #REQUIRED label means that a value must be supplied. The #IMPLIED label means that the attribute is optional, and that Sun ONE Application Server generates a default value. Wherever possible, explicit defaults for optional attributes (such as "true") are listed.

Attribute declarations specify the type of the attribute. For example, CDATA means character data, and %boolean is a predefined enumeration.


Elements in the server.xml File

This section describes the XML elements in the server.xml file. Elements are grouped as follows:

For an alphabetical listing of elements in server.xml, see Appendix B, "Alphabetical List of Server Configuration Elements".


General Elements

General elements are as follows:

server

Defines a server. This is the root element; there can only be one server element in a server.xml file.

Subelements

The following table describes subelements for the server element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-2  server subelements

Element

Required

Description

http-service

only one

Defines the HTTP service.

iiop-service

only one

Defines the IIOP service.

admin-service

zero or one

Not implemented.

web-container

only one

Configures the web container.

ejb-container

only one

Configures the EJB container.

mdb-container

only one

Configures the message-driven bean (MDB) container.

jms-service

only one

Configures the Java Message Service provider.

log-service

only one

Configures the system logging service.

security-service

only one

Defines information needed by the J2EE security service.

transaction-service

only one

Configures the Java Transaction Service.

java-config

only one

Contains the JVM configuration.

resources

only one

Contains configured resources.

applications

only one

Contains deployed J2EE applications, J2EE modules, and Lifecycle modules.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the server element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-3  server attributes

Attribute

Default

Description

name

none

Specifies the name of the server instance.

locale

operating system default

(optional) Specifies the server instance language.

log-root

instance_dir/logs

(optional) Specifies where the server instance’s log files are kept. The directory in which the server log is kept must be writable by whatever user account the server runs as. See the log-service description for details about logs.

application-root

instance_dir/applications

(optional) Specifies the absolute path where deployed applications reside for this server instance.

session-store

instance_dir/session-store

(optional) Specifies the directory where passivated beans are stored in the file system.

property

Specifies a property, or a variable that is defined in server.xml and referenced in obj.conf. For information about variables, see "Variables".

A property adds configuration information to its parent element that is one or both of the following:

For example, an auth-realm element can include property subelements:

<auth-realm name="file"
  classname="com.iplanet.ias.security.auth.realm.file.FileRealm">
  <property name="file" value="instance_dir/config/keyfile"/>
  <property name="jaas-context" value="fileRealm"/>
</auth-realm>

Which properties an auth-realm element uses depends on the value of the auth-realm element’s name attribute. The file realm uses file and jaas-context properties. Other realms use different properties.

Subelements

The following table describes subelements for the property element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-4  property subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

Attributes

The following table describes attributes for the property element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-5  property attributes

Attribute

Default

Description

name

none

Specifies the name of the property or variable.

value

none

Specifies the value of the property or variable.

description

Contains a text description of the parent element.

Subelements

none

Attributes

none

admin-service

This element is not implemented and should not be used.

server-instance

This element is not implemented and should not be used.


Listener Service Elements

Listener service elements are as follows:

http-service

Defines the HTTP service.

For more information about the quality of service features defined in this element’s attributes, see the Sun ONE Application Server Performance Tuning, Sizing, and Scaling Guide.

Subelements

The following table describes subelements for the http-service element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-6  http-service subelements

Element

Required

Description

http-listener

zero or more

Defines an HTTP listen socket.

mime

zero or more

Defines MIME types.

acl

zero or more

References an ACL file.

virtual-server-class

zero or more

Defines a virtual server class.

http-qos

zero or one

Defines quality of service parameters.

property

zero or more

Specifies a property or a variable.


Note

The http-listener, mime, acl, and virtual-server-class elements can occur in any order, but http-qos and property elements must occur second to last and last, respectively.


Attributes

The following table describes attributes for the http-service element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-7  http-service attributes

Attribute

Default

Description

qos-metrics-interval-in-seconds

30

(optional) Specifies the interval during which traffic is measured.

qos-recompute-time-interval-in-millis

100

(optional) Specifies the period in which the bandwidth gets recomputed for all server entities.

qos-enabled

true

(optional) Enables quality of service features, which let you set limits on server entities or view server statistics for bandwidth and connections. Allowed values are yes, no, on, off, 1, 0, true, false.

http-listener

Defines an HTTP listen socket.


Note

When you create a secure listener through the Administration interface, security is automatically turned on globally in init.conf. When you create a secure listener manually in server.xml, you must manually turn on security by editing the init.conf. file’s Security directive.


Subelements

The following table describes subelements for the http-listener element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-8  http-listener subelements

Element

Required

Description

ssl

zero or one

Defines SSL parameters.

Attributes

The following table describes attributes for the http-listener element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-9  http-listener attributes

Attribute

Default

Description

id

none

The unique listener name. An http-listener name cannot begin with a number.

address

none

IP address of the listener. Can be in dotted-pair or IPv6 notation. Can be any (for INADDR_ANY) to listen on all IP addresses. Can be a hostname.

port

none

Port number on which the listener listens. Legal values are 1 - 65535. On UNIX, creating sockets that listen on ports 1 - 1024 requires superuser privileges. Configuring an SSL listener to listen on port 443 is recommended.

family

inet

(optional) The socket family type. Legal values are inet, inet6, and nca. Use the value inet6 for IPv6 listeners. If this value is inet6, IPv4 addresses are prefixed with ::ffff: in the server log. Specify nca to make use of the Solaris Network Cache and Accelerator.

acceptor-threads

1

(optional) Number of acceptor threads for the listener. The recommended value is the number of processors in the machine. Legal values are 1 - 1024.

blocking-enabled

false

(optional) Determines whether the listener and the accepted socket are put in to blocking mode. Use of blocking mode may improve benchmark scores. Legal values are on, off, yes, no, 1, 0, true, false.

security-enabled

false

(optional) Determines whether the listener runs SSL. Legal values are on, off, yes, no, 1, 0, true, false. You can turn SSL2 or SSL3 on or off and set ciphers using an ssl element.

The Security setting in the init.conf file globally enables or disables SSL by making certificates available to the server instance. Therefore, Security in init.conf must be on or security-enabled in server.xml does not work. For more information, see Chapter 3, "Syntax and Use of init.conf".

default-virtual-server

none

The id attribute of the default virtual server for this particular listener.

server-name

none

Tells the server what to put in the host name section of any URLs it sends to the client. This affects URLs the server automatically generates; it doesn’t affect the URLs for directories and files stored in the server. This name should be the alias name if your server uses an alias.

If you append a colon and port number, that port will be used in URLs the server sends to the client.

enabled

true

(optional) Determines whether the listener is active. Legal values are on, off, yes, no, 1, 0, true, false.


Caution

Blocking mode sockets should not be used in real world deployments. Use of blocking mode sockets precludes dynamic reconfiguration and exposes the server to denial of service attacks.


ssl

Defines SSL (Secure Socket Layer) parameters.

An ssl element is required inside an http-listener element that has its security-enabled attribute set to on.

An ssl element is only allowed inside an http-listener or iiop-listener element.

Subelements

none

Attributes

The following table describes attributes for the ssl element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-10  ssl attributes

Attribute

Default

Description

cert-nickname

none

The nickname of the server certificate in the certificate database or the PKCS#11 token. In the certificate, the name format is tokenname:nickname. Including the tokenname: part of the name in this attribute is optional.

ssl2-enabled

false

(optional) Determines whether SSL2 is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

If both SSL2 and SSL3 are enabled for a virtual server, the server tries SSL3 encryption first. If that fails, the server tries SSL2 encryption.

ssl2-ciphers

none

(optional) A comma-separated list of the SSL2 ciphers used, with the prefix + to enable or - to disable, for example +rc4. Allowed values are rc4, rc4export, rc2, rc2export, idea, des, desede3.

ssl3-enabled

true

(optional) Determines whether SSL3 is enabled. Legal values are on, off, yes, no, 1, 0, true, false. The default is true.

If both SSL2 and SSL3 are enabled for a virtual server, the server tries SSL3 encryption first. If that fails, the server tries SSL2 encryption.

ssl3-tls-ciphers

none

(optional) A comma-separated list of the SSL3 ciphers used, with the prefix + to enable or - to disable, for example +rsa_des_sha. Allowed SSL3 values are rsa_rc4_128_md5, rsa_3des_sha, rsa_des_sha, rsa_rc4_40_md5, rsa_rc2_40_md5, rsa_null_md5. Allowed TLS values are rsa_des_56_sha, rsa_rc4_56_sha.

tls-enabled

true

(optional) Determines whether TLS is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

tls-rollback-enabled

true

(optional) Determines whether TLS rollback is enabled. Legal values are on, off, yes, no, 1, 0, true, false. TLS rollback should be enabled for Microsoft Internet Explorer 5.0 and 5.5. For more information, see the Sun ONE Application Server Administrator’s Guide.

client-auth-enabled

false

(optional) Determines whether SSL3 client authentication is performed on every request, independent of ACL-based access control. Legal values are on, off, yes, no, 1, 0, true, false.

mime

Defines MIME types.

The most common way that the server determines the MIME type of a requested resource is by invoking the type-by-extension directive in the ObjectType section of the obj.conf file. The type-by-extension function does not work if no mime element has been defined in the server element.


Note

The mime.types interface is Unstable. An unstable interface may be experimental or transitional, and hence may change incompatibly, be removed, or be replaced by a more stable interface in the next release.


Subelements

none

Attributes

The following table describes attributes for the mime element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-11  mime attributes

Attribute

Default

Description

id

none

Internal name for the MIME types listing. Used in a virtual-server element to define the MIME types used by the virtual server. The MIME types name cannot begin with a number.

file

none

The name of a MIME types file. For information about the format of this file, see Chapter 4, "MIME Types".

acl

References an ACL file.


Note

The ACL file interface is Unstable. An unstable interface may be experimental or transitional, and hence may change incompatibly, be removed, or be replaced by a more stable interface in the next release.


Subelements

none

Attributes

The following table describes attributes for the acl element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-12  acl attributes

Attribute

Default

Description

id

none

Internal name for the ACL file listing. Used in a virtual-server element to define the ACL file used by the virtual server. An ACL file listing name cannot begin with a number.

file

none

An ACL file. Each ACL file must have a unique name. For information about the format of an ACL file, see the Sun ONE Application Server Administrator’s Guide to Security.

virtual-server-class

Defines a virtual server class.

Subelements

The following table describes subelements for the virtual-server-class element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-13  virtual-server-class subelements

Element

Required

Description

virtual-server

zero or more

Defines a virtual server.

http-qos

zero or one

Defines quality of service parameters.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the virtual-server-class element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-14  virtual-server-class attributes

Attribute

Default

Description

id

none

Virtual server class ID. This is a unique ID that allows lookup of a specific virtual server class. A virtual server class ID cannot begin with a number.

config-file

none

(optional) The file name of the obj.conf file for this class of virtual servers. Can be overridden in a virtual-server element.

default-object

default

(optional) Tells the server which object loaded from an obj.conf file is the default. Can be overridden in a virtual-server element.

The default object is expected to have all the name translation (NameTrans) directives for the virtual server; any server behavior that is configured in the default object affects the entire virtual server class.

If you specify an object that doesn’t exist, the server doesn’t report an error until a client tries to retrieve a document. The Administration interface assumes the default to be the object named default. Don’t deviate from this convention if you use (or plan to use) the Administration interface.

accept-language

false

(optional) If true, the server parses the Accept-Language header and sends an appropriate language version based on which language the client can accept. You should set this value to true only if the server supports multiple languages. Can be overridden in a virtual-server element. Legal values are on, off, yes, no, 1, 0, true, false. Can be overridden in a virtual-server element.

enabled

true

(optional) Determines whether the virtual server class is active. Legal values are on, off, yes, no, 1, 0, true, false.

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 may 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 you first install Sun ONE Application Server, 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 Sun ONE Application 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.

Subelements

The following table describes subelements for the virtual-server element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-15  virtual-server subelements

Element

Required

Description

http-qos

zero or one

Defines quality of service parameters.

auth-db

zero or more

Defines the user database for the virtual server; not applicable to J2EE applications.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the virtual-server element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-16  virtual-server attributes

Attribute

Default

Description

id

none

Virtual server ID. This is a unique ID that allows lookup of a specific virtual server. Can also be referred to as the variable $id in an obj.conf file. A virtual server ID cannot begin with a number.

http-listeners

none

(optional) A comma-separated list of http-listener ids that specify the connection(s) the virtual server uses. Required only for a virtual-server that is not the default-virtual-server of an http-listener.

default-web-module

none

(optional) The default web-module for this virtual server, which responds to all requests that cannot be resolved to other web modules deployed to this virtual server.

If this attribute is empty, the web-module assigned to this virtual server that has an empty context-root attribute is used. If no web-module assigned to this virtual server has an empty context-root, the system default web module is used.

config-file

virtual_server_name-obj.conf

(optional) The file name of the obj.conf file for this virtual server. Can override the value in a virtual-server-class element.

default-object

default

(optional) Tells the server which object loaded from an obj.conf file is the default. Can override the value in a virtual-server-class element.

The default object is expected to have all the name translation (NameTrans) directives for the virtual server; any server behavior that is configured in the default object affects the entire server. The default value is default.

If you specify an object that doesn’t exist, the server doesn’t report an error until a client tries to retrieve a document. The Administration interface assumes the default to be the object named default. Don’t deviate from this convention if you use (or plan to use) the Administration interface.

hosts

none

A comma-separated list of values allowed in the Host request header to select the current virtual server. Each virtual-server that is configured to the same http-listener must have a unique hosts value for that listener.

mime

none

The id of the mime element used by the virtual server.

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.

acls

none

(optional) One or more id attributes of acl elements, separated by commas. Specifies the ACL file(s) used by the virtual server.

accept-language

false

(optional) If true, the server parses the Accept-Language header and sends an appropriate language version based on which language the client can accept. You should set this value to on only if the server supports multiple languages. Legal values are on, off, yes, no, 1, 0, true, false. Can override the value in a virtual-server-class element.

log-file

server.log in the directory specified by the log-root attribute of the server 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 whatever user account the server runs as. See the log-service description for details about logs.

Properties

The following table describes properties for the virtual-server element. The left column lists the property name, the middle column indicates the default value if the property is omitted, and the right column describes what the property does.

Table 2-17  virtual-server properties

Property

Default

Description

sso-enabled

true

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. Legal values are on, off, yes, no, 1, 0, true, false.

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.

http-qos

Defines quality of service parameters of an http-service, virtual-server-class, or virtual-server element.

Attributes in the http-service element activate the quality of service features.

For more information, see the Sun ONE Application Server Performance Tuning, Sizing, and Scaling Guide.

Subelements

none

Attributes

The following table describes attributes for the http-qos element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-18  http-qos attributes

Attribute

Default

Description

bandwidth-limit

none

(required if enforce-bandwidth-limit is true) The maximum bandwidth limit for the server, virtual-server-class, or virtual-server in bytes per second.

enforce-bandwidth-limit

false

(optional) Specifies whether the bandwidth limit should be enforced or not. Allowed values are yes, no, on, off, 1, 0, true, false.

connection-limit

none

(required if enforce-connection-limit is true) The maximum number of concurrent connections for the server, virtual-server-class, or virtual-server.

enforce-connection-limit

false

(optional) Specifies whether the connection limit should be enforced or not. Allowed values are yes, no, on, off, 1, 0, true, false.

auth-db

Defines the user database used by the virtual-server; not applicable to J2EE applications.

See "User Database Selection" for more information about how a user database is selected for a given virtual server.


Note

The user database applies only to the security of the server itself. It is not related to J2EE application and module security. For more information, see the Sun ONE Application Server Administrator’s Guide to Security.


Subelements

none

Attributes

The following table describes attributes for the auth-db element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-19  auth-db attributes

Attribute

Default

Description

id

none

The user database name in the virtual server’s ACL file. A user database name cannot begin with a number.

database

none

The user database name in the dbswitch.conf file.

basedn

none

(optional) Overrides the base DN lookup in the dbswitch.conf file. However, the basedn value is still relative to the base DN value from the dbswitch.conf entry.

certmaps

none

(optional) Specifies which certificate to LDAP entry mappings (defined in certmap.conf) to use. If not present, all mappings are used. All lookups based on mappings in certmap.conf are relative to the final base DN of the virtual-server.

iiop-service

Defines the IIOP service.

Subelements

The following table describes subelements for the iiop-service element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-20  iiop-service subelements

Element

Required

Description

orb

only one

Configures the ORB.

ssl-client-config

zero or one

Defines SSL parameters for the ORB.

iiop-listener

zero or more

Defines an IIOP listen socket.

Attributes

none

orb

Configures the ORB.

To enable SSL for outbound connections, include an ssl-client-config subelement in the parent iiop-service element.

Subelements

The following table describes subelements for the orb element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-21  orb subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the orb element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-22  orb attributes

Attribute

Default

Description

message-fragment-size

1024

(optional) GIOPv1.2 messages larger than this number of bytes are fragmented.

steady-thread-pool-size

10

(optional) The minimum number of worker threads in the ORB.

max-thread-pool-size

200

(optional) The maximum number of worker threads in the ORB.

idle-thread-timeout-in-seconds

300

(optional) Idle worker threads are removed from the pool after this amount of time.

max-connections

1024

(optional) The maximum number of incoming connections on all IIOP listeners. Legal values are integers.

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

monitoring-enabled

false

(optional) Determines whether monitoring of the ORB is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

ssl-client-config

Defines SSL parameters for the ORB when it makes outbound SSL connections and behaves as a client.

Subelements

The following table describes subelements for the ssl-client-config element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-23  ssl-client-config subelements

Element

Required

Description

ssl

only one

Defines SSL parameters.

Attributes

none

iiop-listener

Defines an IIOP listen socket.

To enable SSL for this listener, include an ssl subelement.


Note

When you create a secure listener through the Administration interface, security is automatically turned on globally in init.conf. When you create a secure listener manually in server.xml, you must manually turn on security by editing the init.conf. file’s Security directive.


Subelements

The following table describes subelements for the iiop-listener element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-24  iiop-listener subelements

Element

Required

Description

ssl

zero or one

Defines SSL parameters.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the iiop-listener element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-25  iiop-listener attributes

Attribute

Default

Description

id

none

The listener name. An iiop-listener name cannot begin with a number.

address

none

IP address of the listener. Can be in dotted-pair or IPv6 notation or just a name.

port

3700

(for the first server instance)

(optional) Port number to create the listener on. Legal values are 1 - 65535. On UNIX, creating sockets that listen on ports 1 - 1024 requires superuser privileges.

enabled

true

(optional) Determines whether the listener is active. Legal values are on, off, yes, no, 1, 0, true, false.


Container Elements

Container configuration elements are as follows:

web-container

Configures the web container.

Subelements

The following table describes subelements for the web-container element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-26  web-container subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the web-container element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-27  web-container attributes

Attribute

Default

Description

monitoring-enabled

false

(optional) Determines whether monitoring of the web container is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

ServletContext.log messages are logged at the INFO level by default.

ejb-container

Configures the EJB container. Stateless session beans are maintained in pools. Stateful session beans have session affinity and are cached. Entity beans associated with a database primary key are also cached. Entity beans not yet associated with a primary key are maintained in pools. Pooled entity beans are used to run ejbCreate() and finder methods.

Subelements

The following table describes subelements for the ejb-container element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-28  ejb-container subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the ejb-container element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-29  ejb-container attributes

Attribute

Default

Description

steady-pool-size

32

(optional) Specifies the initial and minimum number of beans maintained in the pool. Must be 0 or greater and less than max-pool-size.

Bean instances are removed from the pool and returned after use. The pool is replenished or cleaned up periodically to maintain this size.

Applies to stateless session beans and entity beans.

pool-resize-quantity

16

(optional) Specifies the number of beans to be:

  • created if a request arrives when the pool has no available beans (subject to the max-pool-size limit)
  • removed when the pool-idle-timeout-in-seconds timer expires and a cleaner thread removes any unused instances

Must be 0 or greater and less than max-pool-size. The pool is not resized below the steady-pool-size.

Applies to stateless session beans and entity beans.

max-pool-size

64

(optional) Specifies the maximum number of beans that can be created to satisfy client requests. A value of 0 indicates an unbounded pool.

Applies to stateless session beans and entity beans.

cache-resize-quantity

16

(optional) Specifies the number of beans to be:

  • created if a request arrives when the pool has no available beans (subject to the max-cache-size limit)
  • passivated when the cache-idle-timeout-in-seconds timer expires and a cleaner thread removes any unused instances, or when the cache size exceeds max-cache-size.

Must be greater than 1 and less than max-cache-size.

Applies to stateful session beans and entity beans.

max-cache-size

512

(optional) Specifies the maximum number of beans in the cache. A value of 0 indicates an unbounded cache.

Applies to stateful session beans and entity beans.

pool-idle-timeout-in-seconds

600

(optional) Specifies the maximum time that a bean can remain idle in the pool. After this amount of time, the pool can remove this bean. A value of 0 specifies that idle beans can remain in the pool indefinitely.

Applies to stateless session beans and entity beans.

cache-idle-timeout-in-seconds

600

(optional) Specifies the maximum time that a bean can remain idle in the cache. After this amount of time, the container can passivate this bean. A value of 0 specifies that beans may never become candidates for passivation.

Applies to stateful session beans and entity beans.

removal-timeout-in-seconds

5400

(optional) Specifies the amount of time that a bean can remain passivated before it is removed from the session store. A value of 0 specifies that the container does not remove inactive beans automatically.

If removal-timeout-in-seconds is less than or equal to cache-idle-timeout-in-seconds, beans are removed immediately without being passivated.

The session-store attribute of the server element determines the location of the session store.

Applies to stateful session beans and entity beans.

victim-selection-policy

nru

(optional) Specifies how entity and stateful session beans are selected for passivation. Allowed values are fifo, lru, and nru:

  • fifo selects the oldest instance.
  • lru selects the least recently accessed instance.
  • nru selects a not recently used instance.

commit-option

B

(optional) Determines which commit option is used for entity beans. Legal values are B or C.

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

monitoring-enabled

false

(optional) Determines whether monitoring of the EJB container is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

mdb-container

Configures the message-driven bean (MDB) container.

Subelements

The following table describes subelements for the mdb-container element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-30  mdb-container subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the mdb-container element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-31  mdb-container attributes

Attribute

Default

Description

steady-pool-size

10

(optional) Specifies the initial and minimum number of beans maintained in the pool.

pool-resize-quantity

2

(optional) Specifies the number of beans to be created if a request arrives when the pool is empty (subject to the max-pool-size limit), or the number of beans to remove if idle for more than idle-timeout-in-seconds.

max-pool-size

60

(optional) Specifies the maximum number of beans that can be created to satisfy client requests.

idle-timeout-in-seconds

600

(optional) Specifies the maximum time that a bean can remain idle in the pool. After this amount of time, the bean is destroyed.

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

monitoring-enabled

false

(optional) Determines whether monitoring of the message-driven bean (MDB) container is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

Properties

The following table describes properties for the mdb-container element. The left column lists the property name, the middle column indicates the default value if the property is omitted, and the right column describes what the property does.

Table 2-32  mdb-container properties

Property

Default

Description

cmt-max-runtime-exceptions

1

Specifies the maximum number of RuntimeException occurrences allowed from a message-driven bean’s onMessage() method when container-managed transactions are used. Deprecated.

reconnect-enabled

true

If true, the MDB container automatically tries to reconnect to the JMS provider when the connection is broken.

When the connection is broken, depending on the message processing stage, the onMessage() method may not be able to complete successfully or the transaction may be rolled back due to a JMS exception. When the MDB container reestablishes the connection, JMS message redelivery semantics apply.

reconnect-delay-in-seconds

60

Specifies the delay between reconnect attempts.

reconnect-max-retries

60

Specifies the maximum number of reconnect attempts.


J2EE Service Elements

J2EE service elements are as follows:

jms-service

Configures the built-in Java Message Service (JMS) that is managed by the Sun ONE Application Server.

Subelements

The following table describes subelements for the jms-service element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-33  jms-service subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the jms-service element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-34  jms-service attributes

Attribute

Default

Description

port

7676

(optional) Specifies the port number used by the JMS provider.

admin-user-name

admin

Specifies the administrator user name for the JMS provider.

admin-password

admin

Specifies the administrator password for the JMS provider.

init-timeout-in-seconds

60

(optional) Specifies the amount of time the server instance waits at startup for the corresponding JMS instance to respond. If there is no response, startup is aborted. If set to 0, the server instance waits indefinitely.

start-args

none

(optional) Specifies the string of arguments supplied for startup of the corresponding JMS instance.

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

enabled

true

(optional) If set to true, the Sun ONE Application Server instance is responsible for starting up and shutting down the JMS provider. If set to false, the Sun ONE Application Server instance does not start up nor shut down the JMS provider (either because the JMS provider is not used or because it is managed independently of the Sun ONE Application Server).

Legal values are on, off, yes, no, 1, 0, true, false.

Properties

The following table describes properties for the jms-service element. The left column lists the property name, the middle column indicates the default value if the property is omitted, and the right column describes what the property does.

Table 2-35  jms-service properties

Property

Default

Description

instance-name

domain_instance

Specifies the full Sun ONE Message Queue broker instance name, which is a concatenation of the domain and server instance names. For example: domain1_server1.

instance-name-suffix

none

Specifies a suffix to add to the full Sun ONE Message Queue broker instance name. The suffix is separated from the instance name by an underscore character (_). For example, if the instance name is domain1_server1, appending the suffix xyz changes the instance name to domain1_server1_xyz.

append-version

false

If true, appends the major and minor version numbers, preceded by underscore characters (_), to the full Sun ONE Message Queue broker instance name. For example, if the instance name is domain1_server1, appending the version numbers changes the instance name to domain1_server1_7_0.

log-service

Configures the system logging service, which includes the following log files:

Subelements

The following table describes subelements for the log-service element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-36  log-service subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the log-service element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-37  log-service attributes

Attribute

Default

Description

file

server.log

in the directory specified by the log-root attribute of the server 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 whatever user account the server runs as.

If you specify an absolute path, this value overrides the log-root attribute of the server element.

If you specify a relative path, it is relative to the log-root attribute of the server element. If no log-root value is specified, it is relative to instance_dir/config.

level

INFO

(optional) Controls the default type of messages logged by other elements to the server log. Many other elements can override this default in their log-level attributes. Allowed values are, from highest to lowest: FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALERT, FATAL.

Each value logs all messages for all lower values; for example, FINEST logs all messages, and FATAL logs only FATAL messages. The default value is SEVERE, which logs all SEVERE, ALERT, and FATAL messages.

log-stdout

true

(optional) If true, redirects stdout output to the server log. Legal values are on, off, yes, no, 1, 0, true, false.

log-stderr

true

(optional) If true, redirects stderr output to the server log. Legal values are on, off, yes, no, 1, 0, true, false.

echo-log-messages-to-stderr

true

(optional) If true, sends log messages to stderr in addition to the server log. Legal values are on, off, yes, no, 1, 0, true, false.

create-console

false

(optional, Windows only) If true, creates a Windows console for stderr output. Legal values are on, off, yes, no, 1, 0, true, false.

log-virtual-server-id

false

(optional) If true, virtual server IDs are displayed in the virtual server logs. This is useful if multiple virtual-server elements share the same log file. Legal values are on, off, yes, no, 1, 0, true, false.

use-system-logging

false

(optional) If true, uses the UNIX syslog service or Windows Event Logging to produce and manage logs. Legal values are on, off, yes, no, 1, 0, true, false.

security-service

Defines parameters and configuration information needed by the J2EE security service.

Subelements

The following table describes subelements for the security-service element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-38  security-service subelements

Element

Required

Description

auth-realm

one or more

Defines a realm for authentication.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the security-service element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-39  security-service attributes

Attribute

Default

Description

default-realm

file

(optional) Specifies the active authentication realm (an auth-realm name attribute) for this server instance.

default-principal

none

(optional) Used as the identity of the default security context when necessary and when no principal is provided. This attribute need not be set for normal server operation.

default-principal-password

none

(optional) The password of the default principal. This attribute need not be set for normal server operation.

anonymous-role

ANYONE

(optional) Used as the name for default, or anonymous, role. The anonymous role is always assigned to all principals. This role value can be used in J2EE deployment descriptors to grant access to anyone.

audit-enabled

false

(optional) If true, additional access logging is performed to provide audit information. Legal values are on, off, yes, no, 1, 0, true, false.

Audit information consists of:

  • Authentication success and failure events
  • Servlet and EJB access grants and denials

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

auth-realm

Defines a realm for authentication.

Authentication realms require provider-specific properties, which vary depending on what a particular implementation needs.

For more information about how to define realms, see the Sun ONE Application Server Developer’s Guide.

Here is an example of the default file realm:

<auth-realm name="file"
  classname="com.iplanet.ias.security.auth.realm.file.FileRealm">
  <property name="file" value="instance_dir/config/keyfile"/>
  <property name="jaas-context" value="fileRealm"/>
</auth-realm>

Which properties an auth-realm element uses depends on the value of the auth-realm element’s name attribute. The file realm uses file and jaas-context properties. Other realms use different properties.

Subelements

The following table describes subelements for the auth-realm element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-40  auth-realm subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the auth-realm element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-41  auth-realm attributes

Attribute

Default

Description

name

none

Specifies the name of this realm.

classname

none

Specifies the Java class that implements this realm.

Properties

The standard realms provided with Sun ONE Application Server have required and optional properties. A custom realm may have different properties.

The following table describes properties for the auth-realm element. The left column lists the property name, the middle column indicates the standard realms that use the property, and the right column describes what the property does.

Table 2-42  auth-realm properties

Property

Realms

Description

jaas-context

file, ldap, solaris

Specifies the JAAS (Java Authentication and Authorization Service) context.

file

file

Specifies the file that stores user names. The default is instance_dir/config/keyfile.

assign-groups

certificate

(optional) If this property is set, its value is taken to be a comma-separated list of group names. All clients who present valid certificates are assigned membership to these groups for the purposes of authorization decisions in the web and EJB containers.

directory

ldap

Specifies the LDAP URL to your server.

base-dn

ldap

Specifies the LDAP base DN for the location of user data. This base DN can be at any level above the user data, since a tree scope search is performed. The smaller the search tree, the better the performance.

search-filter

ldap

(optional) Specifies the search filter to use to find the user. The default is uid=%s (%s expands to the subject name).

group-base-dn

ldap

(optional) Specifies the base DN for the location of groups data. By default it is same as the base-dn, but it can be tuned if necessary.

group-search-filter

ldap

(optional) Specifies the search filter to find group memberships for the user. The default is uniquemember=%d (%d expands to the user element DN).

group-target

ldap

(optional) Specifies the LDAP attribute name that contains group name entries. The default is CN.

search-bind-dn

ldap

(optional) Specifies an optional DN used to authenticate to the directory for performing the search-filter lookup. Only required for directories that do not allow anonymous search.

search-bind-password

ldap

(optional) Specifies the LDAP password for the DN given in search-bind-dn.

transaction-service

Configures the Java Transaction Service (JTS).

Subelements

The following table describes subelements for the transaction-service element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-43  transaction-service subelements

Element

Required

Description

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the transaction-service element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-44  transaction-service attributes

Attribute

Default

Description

automatic-recovery

false

(optional) If true, the server instance attempts transaction recovery during startup. Legal values are on, off, yes, no, 1, 0, true, false.

timeout-in-seconds

0

(optional) Specifies the amount of time after which the transaction is aborted. If set to 0, the transaction never times out.

tx-log-dir

directory specified by the log-root attribute of the server element

(optional) Overrides the location of the transaction log directory. The directory in which the transaction logs are kept must be writable by whatever user account the server runs as. See the log-service description for details about logs.

heuristic-decision

rollback

(optional) During recovery, if the outcome of a transaction cannot be determined from the logs, this property determines the outcome. Allowed values are rollback and commit.

keypoint-interval

2048

(optional) Specifies the number of transactions between keypoint operations in the log. Keypoint operations reduce the size of the transaction log file by compressing it. A larger value for this attribute (for example, 4096) results in a larger transaction log file, but fewer keypoint operations and potentially better performance. A smaller value (for example, 100) results in smaller log files, but slightly reduced performance due to the greater frequency of keypoint operations.

log-level

Value of level attribute of log-service element

(optional) Controls the type of messages logged by this element to the server log. For details, see the description of the level attribute of the log-service element.

monitoring-enabled

false

(optional) Determines whether monitoring of the JTS is enabled. Legal values are on, off, yes, no, 1, 0, true, false. The default is false.

Properties

The following table describes properties for the transaction-service element. The left column lists the property name, the middle column indicates the default value if the property is omitted, and the right column describes what the property does.

Table 2-45  transaction-service properties

Property

Default

Description

oracle-xa-recovery-workaround

false

If true, the Oracle XA Resource workaround is used in transaction recovery. Legal values are on, off, yes, no, 1, 0, true, false.

sybase-xa-recovery-workaround

false

If true, the Sybase XA Resource workaround is used in transaction recovery. Legal values are on, off, yes, no, 1, 0, true, false.

disable-distributed-transaction-logging

false

If true, disables transaction logging, which may improve performance. Legal values are on, off, yes, no, 1, 0, true, false.

If the automatic-recovery attribute is set to true, this property is ignored.

xaresource-txn-timeout

specific to the XAResource used

Changes the XAResource timeout. In some cases, the XAResource default timeout can cause transactions to be aborted, so it is desirable to change it.


Java Configuration Elements

Java configuration elements are as follows:

java-config

Specifies Java Virtual Machine (JVM) configuration parameters.

Subelements

The following table describes subelements for the java-config element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-46  java-config subelements

Element

Required

Description

profiler

zero or one

Configures a profiler for use with Sun ONE Application Server.

jvm-options

zero or more

Contains JVM command line options.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the java-config element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-47  java-config attributes

Attribute

Default

Description

java-home

none

The path to the directory where the JDK is installed.

debug-enabled

false

(optional) If true, the server starts up in debug mode ready for attachment with a JPDA-based debugger. Legal values are on, off, yes, no, 1, 0, true, false.

debug-options

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n

(optional) Specifies JPDA (Java Platform Debugger Architecture) options. A list of debugging options that you can include is available here:

http://java.sun.com/products/jpda/ doc/conninv.html#Invocation

For more information about debugging, see the Sun ONE Application Server Developer’s Guide.

rmic-options

-iiop -poa -alwaysgenerate -keepgenerated -g

(optional) Specifies options passed to the RMI compiler at application deployment time. The -keepgenerated option saves generated source for stubs and ties.

For more information about the rmic command, see the Sun ONE Application Server Developer’s Guide to Enterprise JavaBeans Technology.

javac-options

-g

(optional) Specifies options passed to the Java compiler at application deployment time.

classpath-prefix

none

(optional) Specifies a prefix for the system classpath. You should only prefix the system classpath if you wish to override system classes, such as the XML parser classes. Use this attribute with caution.

server-classpath

none

(optional) Specifies the classpath for the environment from which the server was started. This classpath can be accessed using System.getProperty("java.class.path").

classpath-suffix

none

(optional) Specifies a suffix for the system classpath.

native-library-path-prefix

none

(optional) Specifies a prefix for the native library path.

The native library path is the automatically constructed concatenation of the Sun ONE Application Server installation relative path for its native shared libraries, the standard JRE native library path, the shell environment setting (LD_LIBRARY_PATH on UNIX), and any path specified in the profiler element. Since this is synthesized, it does not appear explicitly in the server configuration.

native-library-path-suffix

none

(optional) Specifies a suffix for the native library path.

bytecode-preprocessors

 

(optional) A comma separated list of class names, each of which must implement the com.sun.appserv.BytecodePreprocessor interface. Each of the specified preprocessor classes is called in the order specified.

env-classpath-ignored

true

(optional) If false, the CLASSPATH environment variable is read and appended to the Sun ONE Application Server classpath. The CLASSPATH environment variable is added after the classpath-suffix, at the very end.

For a development environment, this value should be set to false. For a production environment, this value should be set to true to prevent environment variable side effects.

Legal values are on, off, yes, no, 1, 0, true, false.

profiler

Configures a profiler for use with Sun ONE Application Server. For more information about profilers, see the Sun ONE Application Server Developer’s Guide.

Subelements

The following table describes subelements for the profiler element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-48  profiler subelements

Element

Required

Description

jvm-options

zero or more

Contains profiler-specific JVM command line options.

property

zero or more

Specifies a property or a variable.


Note

Subelements of a profiler element can occur in any order.


Attributes

The following table describes attributes for the profiler element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-49  profiler attributes

Attribute

Default

Description

name

none

Specifies the name of the profiler.

classpath

none

(optional) Specifies the classpath for the profiler.

native-library-path

none

(optional) Specifies the native library path for the profiler.

enabled

true

(optional) Determines whether the profiler is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

jvm-options

Contains JVM command line options, for example:

<jvm-options>-Xdebug -Xmx128m</jvm-options>

For information about the options you can use, see:

http://java.sun.com/docs/hotspot/VMOptions.html

Subelements

none

Attributes

none


Resource Elements

Resource elements are as follows:

resources

Contains configured resources, such as database connections, JavaMail sessions, and so on.


Note

You must specify a JNDI name for each resource. To avoid collisions with names of other enterprise resources in JNDI, and to avoid portability problems, all names in a Sun ONE Application Server application should begin with the string java:comp/env.


Subelements

The following table describes subelements for the resources element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-50  resources subelements

Element

Required

Description

custom-resource

zero or more

Defines a custom resource.

external-jndi-resource

zero or more

Defines a resource that resides in an external JNDI repository.

jdbc-resource

zero or more

Defines a JDBC (Java Database Connectivity) resource.

mail-resource

zero or more

Defines a JavaMail resource.

jms-resource

zero or more

Defines a JMS resource.

persistence-manager-factory-resource

zero or more

Defines a persistence manager factory resource for CMP.

jdbc-connection-pool

zero or more

Defines the properties that are required for creating a JDBC connection pool.


Note

Subelements of a resources element can occur in any order.


Attributes

none

custom-resource

Defines a custom resource, which specifies a custom server-wide resource object factory. Such object factories implement the javax.naming.spi.ObjectFactory interface.

Subelements

The following table describes subelements for the custom-resource element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-51  custom-resource subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the custom-resource element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-52  custom-resource attributes

Attribute

Default

Description

jndi-name

none

Specifies the JNDI name for the resource.

res-type

none

Specifies the fully qualified type of the resource.

factory-class

none

Specifies the fully qualified name of the user-written factory class, which implements javax.naming.spi.ObjectFactory.

enabled

true

(optional) Determines whether this resource is enabled at runtime. Legal values are on, off, yes, no, 1, 0, true, false.

external-jndi-resource

Defines a resource that resides in an external JNDI repository. For example, a generic Java object could be stored in an LDAP server. An external JNDI factory must implement the javax.naming.spi.InitialContextFactory interface.

Subelements

The following table describes subelements for the external-jndi-resource element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-53  external-jndi-resource subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the external-jndi-resource element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-54  external-jndi-resource attributes

Attribute

Default

Description

jndi-name

none

Specifies the JNDI name for the resource.

jndi-lookup-name

none

Specifies the JNDI lookup name for the resource.

res-type

none

Specifies the fully qualified type of the resource.

factory-class

none

Specifies the fully qualified name of the factory class, which implements javax.naming.spi.InitialContextFactory.

For more information about JNDI, see the Sun ONE Application Server Developer’s Guide to J2EE Features and Services.

enabled

true

(optional) Determines whether this resource is enabled at runtime. Legal values are on, off, yes, no, 1, 0, true, false.

jdbc-resource

Defines a JDBC (javax.sql.DataSource) resource.

Subelements

The following table describes subelements for the jdbc-resource element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-55  jdbc-resource subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the jdbc-resource element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-56  jdbc-resource attributes

Attribute

Default

Description

jndi-name

none

Specifies the JNDI name for the resource.

pool-name

none

Specifies the name of the associated JDBC connection pool, defined in a jdbc-connection-pool element.

enabled

true

(optional) Determines whether this resource is enabled at runtime. Legal values are on, off, yes, no, 1, 0, true, false.

mail-resource

Defines a JavaMail (javax.mail.Session) resource.

Subelements

The following table describes subelements for the mail-resource element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-57  mail-resource subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the mail-resource element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-58  mail-resource attributes

Attribute

Default

Description

jndi-name

none

Specifies the JNDI name for the resource.

store-protocol

imap

(optional) Specifies the storage protocol service, which connects to a mail server, retrieves messages, and saves messages in folder(s). Example values are imap and pop3.

store-protocol-class

com.sun.mail.imap.IMAPStore

(optional) Specifies the service provider implementation class for storage.

transport-protocol

smtp

(optional) Specifies the transport protocol service, which sends messages.

transport-protocol-class

com.sun.mail.smtp.SMTPTransport

(optional) Specifies the service provider implementation class for transport.

host

none

The mail server host name.

user

none

The mail server user name.

from

none

The e-mail address the mail server uses to indicate the message sender.

debug

false

(optional) Determines whether debugging for this resource is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

enabled

true

(optional) Determines whether this resource is enabled at runtime. Legal values are on, off, yes, no, 1, 0, true, false.

Properties

You can set properties for the mail-resource element and then get these properties in a JavaMail Session object later. Every property name must start with a mail- prefix. Sun ONE Application Server the changes the dash (-) character to a period (.) in the name of the property and saves the property to the MailConfiguration and JavaMail Session objects. If the name of the property doesn’t start with mail-, the property is ignored.

For example, if you want to define the property mail.password in a JavaMail Session object, first edit server.xml as follows:

...
<mail-resource jndi-name="mail/Session" ...>
  <property name="mail-password" value="adminadmin"/>
</mail-resource>
...

After you get the JavaMail Session object, you can get the mail.password property to retrieve the value adminadmin, as follows:

String password = session.getProperty("mail.password");

jms-resource

Defines a JMS (Java Message Service) resource.

Subelements

The following table describes subelements for the jms-resource element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-59  jms-resource subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the jms-resource element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-60  jms-resource attributes

Attribute

Default

Description

jndi-name

none

Specifies the JNDI name for the resource.

res-type

none

Specifies the fully qualified type of the resource, which is one of the following:

javax.jms.Topic
javax.jms.Queue
javax.jms.TopicConnectionFactory
javax.jms.QueueConnectionFactory

enabled

true

(optional) Determines whether this resource is enabled at runtime. Legal values are on, off, yes, no, 1, 0, true, false.

Properties

The following table describes properties for the jms-resource element. The left column lists the property name, the middle column indicates the default value if the property is omitted, and the right column describes what the property does.

Table 2-61  jms-resource properties

Property

Default

Description

imqDestinationName

none

Specifies the JMS physical destination name associated with this JMS resource. You must specify this property for jms-resource elements with the res-type of javax.jms.Topic or javax.jms.Queue.

The Sun ONE Message Queue Administrator's Guide shows a default value for this property, but this does not apply in the Sun ONE Application Server environment.

imqBrokerHostName

the same host name as the Sun ONE Application Server instance (localhost)

Specifies the host name where the JMS service (Sun ONE Message Queue broker) is running. For jms-resource elements with the res-type of javax.jms.TopicConnectionFactory or javax.jms.QueueConnectionFactory.

imqBrokerHostPort

the jms-service element’s port attribute

Specifies the port where the JMS service (Sun ONE Message Queue broker) is running. For jms-resource elements with the res-type of javax.jms.TopicConnectionFactory or javax.jms.QueueConnectionFactory.

imqConfiguredClientID

none

Specifies the JMS Client Identifier to be associated with a Connection created using the createQueueConnection and createTopicConnection JMS APIs of the QueueConnectionFactory and TopicConnectionFactory classes, respectively.

For jms-resource elements with the res-type of javax.jms.TopicConnectionFactory or javax.jms.QueueConnectionFactory.

Durable subscription names are unique and only valid within the scope of a client identifier. To create or reactivate a durable subscriber, the connection must have a valid client identifier. The JMS specification ensures that client identifiers are unique and that a given client identifier is allowed to be used by only one active connection at a time.

persistence-manager-factory-resource

Defines a persistence manager factory resource for container-managed persistence (CMP).

Subelements

The following table describes subelements for the persistence-manager-factory-resource element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-62  persistence-manager-factory-resource subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the persistence-manager-factory-resource element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-63  persistence-manager-factory-resource attributes

Attribute

Default

Description

jndi-name

none

Specifies the JNDI name for the resource.

factory-class

com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl

(optional) Specifies the name of the factory class. This attribute supports third party CMP persistence manager factories. Use the name required by the third party CMP implementation. Do not specify this attribute for the built-in CMP implementation.

jdbc-resource-jndi-name

none

(optional) Specifies the jdbc-resource from which database connections are obtained. Must be the jndi-name of an existing jdbc-resource.

enabled

true

(optional) Determines whether this resource is enabled at runtime. Legal values are on, off, yes, no, 1, 0, true, false.

jdbc-connection-pool

Defines the properties that are required for creating a JDBC connection pool.


Tip

You can create a pool definition and then copy, paste, and edit it to configure multiple JDBC data sources.


Subelements

The following table describes subelements for the jdbc-connection-pool element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-64  jdbc-connection-pool subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the jdbc-connection-pool element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-65  jdbc-connection-pool attributes

Attribute

Default

Description

name

none

Specifies the name of the connection pool. A jdbc-resource element’s pool-name attribute refers to this name.

datasource-classname

none

Specifies the class name of the associated vendor-supplied data source. This class must implement java.sql.DataSource or java.sql.XADataSource or both.

res-type

javax.sql.DataSource

(optional) Specifies the interface the data source class implements. The value of this attribute can be javax.sql.DataSource or javax.sql.XADataSource. If the value is not one of these interfaces, the default is used. An error occurs if this attribute has a legal value and the indicated interface is not implemented by the data source class.

steady-pool-size

8

(optional) Specifies the initial and minimum number of connections maintained in the pool.

max-pool-size

32

(optional) Specifies the maximum number of connections that can be created to satisfy client requests.

max-wait-time-in-millis

60000

(optional) Specifies the amount of time, in milliseconds, that the caller is willing to wait for a connection. If 0, the caller is blocked indefinitely until a resource is available or an error occurs.

pool-resize-quantity

2

(optional) Specifies the number of connections to be destroyed if the existing number of connections is above the steady-pool-size (subject to the max-pool-size limit). This is enforced periodically at the idle-time-out-in-seconds interval. An idle connection is one that has not been used for a period of idle-time-out-in-seconds.

idle-timeout-in-seconds

300

(optional) Specifies the maximum time that a connection can remain idle in the pool. After this amount of time, the pool can close this connection.

transaction-isolation-level

default JDBC driver isolation level

(optional) Specifies the transaction isolation level on the pooled database connections. Allowed values are read-uncommitted, read-committed, repeatable-read, or serializable.

Applications that change the isolation level on a pooled connection programmatically risk polluting the pool, which can lead to errors. See is-isolation-level-guaranteed for more details.

is-isolation-level-guaranteed

true

(optional) Applicable only when transaction-isolation-level is explicitly set. If true, every connection obtained from the pool is guaranteed to have the desired isolation level. This may impact performance on some JDBC drivers. You can set this attribute to false if you are certain that the hosted applications do not return connections with altered isolation levels.

is-connection-validation-required

false

(optional) Specifies whether connections have to be validated before being given to the application. If a resource’s validation fails, it is destroyed, and a new resource is created and returned. Legal values are on, off, yes, no, 1, 0, true, false.

connection-validation-method

auto-commit

(optional) Legal values are as follows:

  • auto-commit (default), which uses Connection.setAutoCommit(Connection.getAutoCommit())
  • meta-data, which uses Connection.getMetaData()
  • table, which performs a query on a table specified in the validation-table-name attribute

validation-table-name

none

(optional) Specifies the table name to be used to perform a query to validate a connection. This parameter is mandatory if and only if connection-validation-type is set to table.

fail-all-connections

false

(optional) If true, closes all connections in the pool if a single validation check fails. This parameter is mandatory if and only if is-connection-validation-required is set to true. Legal values are on, off, yes, no, 1, 0, true, false.

Properties

Most JDBC 2.0 drivers allow use of standard property lists to specify the user, password, and other resource configuration information. Although properties are optional with respect to Sun ONE Application Server, some properties may be necessary for most databases. For details, see Section 5.3 of JDBC 2.0 Standard Extension API.

When properties are specified, they are passed to the vendor’s data source class (specified by the datasource-classname attribute) as is using setName(value) methods.

The user and password properties are used as the default principal if container managed authentication is specified and a default-resource-principal is not found in the application deployment descriptors.

The following table describes some common properties for the jdbc-connection-pool element. The left column lists the property name, and the right column describes what the property does.

Table 2-66  jdbc-connection-pool properties

Property

Description

user

Specifies the user name for this connection pool.

password

Specifies the password for this connection pool.

databaseName

Specifies the database for this connection pool.

serverName

Specifies the database server for this connection pool.

port

Specifies the port on which the database server listens for requests.

networkProtocol

Specifies the communication protocol.

roleName

Specifies the initial SQL role name.

datasourceName

Specifies an underlying XADataSource, or a ConnectionPoolDataSource if connection pooling is done.

description

Specifies a text description.

url

Specifies the URL for this connection pool. Although this is not a standard property, it is commonly used.


Application Elements

Application elements are as follows:

applications

Contains deployed J2EE applications, J2EE modules, and Lifecycle modules.

Subelements

The following table describes subelements for the applications element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-67  applications subelements

Element

Required

Description

lifecycle-module

zero or more

Specifies a deployed lifecycle module.

j2ee-application

zero or more

Specifies a deployed J2EE application.

ejb-module

zero or more

Specifies a deployed EJB module.

web-module

zero or more

Specifies a deployed web module.

connector-module

zero or more

Specifies a deployed connector module.


Note

Subelements of an applications element can occur in any order.


Attributes

The following table describes attributes for the applications element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-68  applications attributes

Attribute

Default

Description

dynamic-reload-enabled

false

(optional) Specifies whether dynamic reloading is enabled. This attribute should be set to true in a development environment and false in a production environment. Legal values are on, off, yes, no, 1, 0, true, false.

dynamic-reload-poll-interval-in-seconds

2

(optional) Specifies the interval at which applications and modules are checked for code changes and dynamically reloaded.

lifecycle-module

Specifies a deployed lifecycle module. For more information about lifecycle modules, see the Sun ONE Application Server Developer’s Guide.

Subelements

The following table describes subelements for the lifecycle-module element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-69  lifecycle-module subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

property

zero or more

Specifies a property or a variable.

Attributes

The following table describes attributes for the lifecycle-module element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-70  lifecycle-module attributes

Attribute

Default

Description

name

none

The name of the lifecycle module.

class-name

none

The fully qualified name of the lifecycle module’s class file, which must implement the com.sun.appserv.server.LifecycleListener interface.

classpath

value of application-root attribute of server element

(optional) The classpath for the lifecycle module. Specifies where the module is located.

load-order

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.

is-failure-fatal

false

(optional) Determines whether the server is shut down if the lifecycle module fails. Legal values are on, off, yes, no, 1, 0, true, false.

enabled

true

(optional) Determines whether the lifecycle module is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

j2ee-application

Specifies a deployed J2EE application.

Subelements

The following table describes subelements for the j2ee-application element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-71  j2ee-application subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

Attributes

The following table describes attributes for the j2ee-application element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-72  j2ee-application attributes

Attribute

Default

Description

name

none

The name of the application.

location

none

The location of the application in the Sun ONE Application Server file system.

virtual-servers

all virtual servers

(optional) The virtual servers to which the web modules within this application are deployed.

enabled

true

(optional) Determines whether the application is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

ejb-module

Specifies a deployed EJB module.

Subelements

The following table describes subelements for the ejb-module element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-73  ejb-module subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

Attributes

The following table describes attributes for the ejb-module element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-74  ejb-module attributes

Attribute

Default

Description

name

none

The name of the EJB module.

location

none

The location of the EJB module in the Sun ONE Application Server file system.

enabled

true

(optional) Determines whether the EJB module is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

web-module

Specifies a deployed web module.

Subelements

The following table describes subelements for the web-module element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-75  web-module subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

Attributes

The following table describes attributes for the web-module element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-76  web-module attributes

Attribute

Default

Description

name

none

The name of the web module.

context-root

empty string

The context root (context path without the / in front) at which the web module is installed (see Section 5.4 of the Servlet 2.3 specification).

If this attribute is an empty string, which is the default value, this web module can be the default web module for the virtual-server elements specified in the virtual-servers attribute.

If multiple web modules assigned to a virtual server have an empty context root, one of them is loaded, and the rest generate error messages such as: Virtual server [virtual_server] already has a web module loaded at [/].

location

none

A fully qualified or relative path to the directory to which the contents of the .war file have been extracted. If relative, it is relative to the following directory:

instance_dir/applications/j2ee-modules/

virtual-servers

all virtual servers

(optional) The virtual-server elements to which the web module is deployed.

enabled

true

(optional) Determines whether the web module is enabled. Legal values are on, off, yes, no, 1, 0, true, false.

connector-module

Specifies a deployed connector module.

Subelements

The following table describes subelements for the connector-module element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 2-77  connector-module subelements

Element

Required

Description

description

zero or one

Contains a text description of this element.

Attributes

The following table describes attributes for the connector-module element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 2-78  connector-module attributes

Attribute

Default

Description

name

none

The name of the connector module.

location

none

The location of the connector module in the Sun ONE Application Server file system.

enabled

true

(optional) Determines whether the connector module is enabled. Legal values are on, off, yes, no, 1, 0, true, false.


User Database Selection


Note

The user database applies only to the security of the server itself. It is not related to J2EE application and module security.


The auth-db element in server.xml selects a user database for the parent virtual-server element as follows:

This layer between the ACL file and the dbswitch.conf file gives the server administrator full control over which databases virtual server administrators and users have access to.


Note

The dbswitch.conf interface is Unstable. An unstable interface may be experimental or transitional, and hence may change incompatibly, be removed, or be replaced by a more stable interface in the next release.


The dbswitch.conf file establishes the root of the search tree for LDAP databases as follows:

A user database is selected for a virtual server as follows:


The Sun ONE LDAP Schema

You can use the dcsuffix attribute in the dbswitch.conf file if your LDAP database meets the requirements outlined in this section.

The subtree rooted at an ISP entry (for example, o=isp) is called the convergence tree. It contains all the directory data related to organizations (customers) served by an ISP.

The subtree rooted at o=internet is called the domain component tree or dc tree. It contains a sparse DNS tree with entries for the customer domains served. These entries are links to the appropriate location in the convergence tree where the data for that domain is located.

The directory tree may be single rooted, which is recommended (for example, o=root may have o=isp and o=internet under it), or have two separate roots, one for the convergence tree and one for the dc tree.

The Convergence Tree

The top level of the convergence tree must have one organization entry for each customer (or organization), and one for the ISP itself.

Underneath each organization, there must be two organizationalUnit entries: ou=People and ou=Groups. A third, ou=Devices, can be present if device data is to be stored for the organization.

Each user entry must have a unique uid value within a given organization. The namespace under this subtree can be partitioned into various ou entries that aggregate user entries in convenient groups (for example, ou=eng, ou=corp). User uid values must still be unique within the entire People subtree.

User entries in the convergence tree are of type inetOrgPerson. The cn, sn, and uid attributes must be present. The uid attribute must be a valid e-mail name (specifically, it must be a valid local-part as defined in RFC822). It is recommended that the cn contain name initial sn. It is recommended that the RDN of the user entry be the uid value. User entries must contain the auxiliary class inetUser if they are to be considered enabled for service or valid.

User entries can also contain the auxiliary class inetSubscriber, which is used for account management purposes. If an inetUserStatus attribute is present in an entry and has a value of inactive or deleted, the entry is ignored.

Groups are located under the Groups subtree and consist of LDAP entries of type groupOfUniqueNames.

The Domain Component (dc)Tree

The dc tree contains hierarchical domain entries, each of which is a DNS name component.

Entries that represent the domain name of a customer are overlaid with the LDAP auxiliary class inetDomain. For example, the two LDAP entries dc=customer1,dc=com,o=Internet,o=root and dc=customer2,dc=com,o=Internet,o=root contain the inetDomain class, but dc=com,o=Internet,o=root does not. The latter is present only to provide structure to the tree.

Entries with an inetDomain attribute are called virtual domains. These must have the attribute inetDomainBaseDN filled with the DN of the top level organization entry where the data of this domain is stored in the convergence tree. For example, the virtual domain entry in dc=cust2,dc=com,o=Internet,o=root would contain the attribute inetDomainBaseDN with value o=Cust2,o=isp,o=root.

If an inetDomainStatus attribute is present in an entry and has a value of inactive or deleted, the entry is ignored.


Variables

Some variables are defined in server.xml for use in the obj.conf file. The following file fragment defines a docroot variable:

<property name="docroot" value="/server/docs/class2/acme" />

A docroot variable allows different document root directories to be assigned for different virtual servers. The variable is then used in the obj.conf file. For example:

NameTrans fn=document-root root="$docroot"

Using this docroot variable allows you to define different document roots for different virtual servers within the same virtual server class.


Note

A variable must be defined in the server.xml file at the http-service, virtual-server-class, or virtual-server level. Defining variables with default values at the http-service or virtual-server-class level and overriding them at the virtual-server level is recommended.


Format of a Variable

A variable is found in obj.conf when the following regular expression matches:

\$[A-Za-z][A-Za-z0-9_]*

This expression represents a $ followed by one or more alphanumeric characters. A delimited version (“${property}”) is not supported. To get a regular $ character, use $$ to have variable substitution.

The id Variable

A special variable, id, is always available within a virtual-server element and refers to the value of the id attribute. It is predefined and cannot be overridden. The id attribute uniquely identifies a virtual server. For example:

<property name=docroot value="/export/$id" />

If the id attribute of the parent virtual-server element is myserver, the docroot variable is set to the value /export/myserver.

Other Important Variables

The following variables are used in various parts of the Sun ONE Application Server configuration. Unlike the $id variable, they are not predefined in the server, and they can be overridden.

General Variables

The following table lists general server.xml variables. The left column lists variables, and the right column lists descriptions of those variables.

Table 2-79  General variables

Variable

Description

docroot

The document root of the virtual server. Typically evaluated as the parameter to the document-root function in the obj.conf file.

accesslog

The access log file for a virtual server.

send-cgi Variables

The following table lists server.xml variables used by the send-cgi function in the obj.conf file. The left column lists variables, and the right column lists descriptions of those variables.

Table 2-80  send-cgi variables

Variable

Description

user

The value of the user CGI parameter.

group

The value of the group CGI parameter.

chroot

The value of the chroot CGI parameter.

dir

The value of the dir CGI parameter.

nice

The value of the nice CGI parameter.

For more information about the send-cgi function, see the Sun ONE Application Server Developer’s Guide to NSAPI.

Variable Evaluation

Variables are evaluated when generating specific objsets for individual virtual servers. Evaluation is recursive: variable values can contain other variables. For example:

...
<virtual-server-class>
  ...
  <virtual-server ...>
    ...
    <property name=docroot value="$docrootbase/nonjava/$id" />
  </virtual-server>
  <virtual-server ...>
    ...
    <property name=docroot value="$docrootbase/java/$id" />
  </virtual-server>
  ...
  <property name=docrootbase value="/export" />
</virtual-server-class>
...

Variables in subelements override variables in the parent elements. For example, it is possible to set a variable for a class of virtual servers and override it with a definition of the same variable in an individual virtual server.


Sample server.xml File

When you first install the Windows version of Sun ONE Application Server, the server.xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<!-- server_7_0_dtd version: 1.1.2.39 -->

<!DOCTYPE server PUBLIC "-//Sun Microsystems Inc.//DTD Sun ONE Application Server 7.0//EN" "file:///C:/Sun/AppServer7/lib/dtds/sun-server_1_0.dtd">

<server name="server1" log-root="C:/Sun/AppServer7/domains/domain1/server1/logs" application-root="C:/Sun/AppServer7/domains/domain1/server1/applications" session-store="C:/Sun/AppServer7/domains/domain1/server1/session-store">

  <http-service qos-enabled="false">

    <http-listener id="http-listener-1" address="0.0.0.0" port="1024" acceptor-threads="1" blocking-enabled="false" security-enabled="false" default-virtual-server="server1" server-name="goliath" enabled="true"/>

    <mime id="mime1" file="mime.types"/>

    <acl id="acl1" file="C:/Sun/AppServer7/domains/domain1/server1/config/generated.server1.acl"/>

    <virtual-server-class id="defaultclass" config-file="obj.conf" default-object="default" accept-language="false" enabled="true">

      <virtual-server id="server1" http-listeners="http-listener-1" hosts="goliath" mime="mime1" state="on" accept-language="false">

      <auth-db id="default" database="default"/>

      <property name="dir" value=""/>

      <property name="nice" value=""/>

      <property name="user" value=""/>

      <property name="group" value=""/>

      <property name="chroot" value=""/>

      <property name="docroot" value="C:/Sun/AppServer7/domains/domain1/server1/docroot"/>

      <property name="accesslog" value="C:/Sun/AppServer7/domains/domain1/server1/logs/access"/>

      </virtual-server>

    </virtual-server-class>

  </http-service>

  <iiop-service>

    <orb message-fragment-size="1024" steady-thread-pool-size="10" max-thread-pool-size="200" idle-thread-timeout-in-seconds="300" max-connections="1024" monitoring-enabled="false"/>

    <iiop-listener id="orb-listener-1" address="goliath" port="3700" enabled="true">

    </iiop-listener>

  </iiop-service>

  <web-container monitoring-enabled="false" >

  </web-container>

  <ejb-container steady-pool-size="32" pool-resize-quantity="16" max-pool-size="64" cache-resize-quantity="32" max-cache-size="512" pool-idle-timeout-in-seconds="600" cache-idle-timeout-in-seconds="600" removal-timeout-in-seconds="5400" victim-selection-policy="nru" commit-option="B" monitoring-enabled="false">

  </ejb-container>

  <mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="false">

  </mdb-container>

  <jms-service port="7676" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true">

  </jms-service>

  <log-service file="C:/Sun/AppServer7/domains/domain1/server1/logs/server.log" level="INFO" log-stdout="true" log-stderr="true" echo-log-messages-to-stderr="true" create-console="true" log-virtual-server-id="false" use-system-logging="false">

  </log-service>

  <security-service default-realm="file" anonymous-role="ANYONE" audit-enabled="false">

    <auth-realm name="file" classname="com.iplanet.ias.security.auth.realm.file.FileRealm">

      <property name="file" value="C:/Sun/AppServer7/domains/domain1/server1/config/keyfile"/>

      <property name="jaas-context" value="fileRealm"/>

    </auth-realm>

    <auth-realm name="ldap" classname="com.iplanet.ias.security.auth.realm.ldap.LDAPRealm">

      <property name="directory" value="ldap://localhost:389"/>

      <property name="base-dn" value="o=isp"/>

      <property name="jaas-context" value="ldapRealm"/>

    </auth-realm>

    <auth-realm name="certificate" classname="com.iplanet.ias.security.auth.realm.certificate.CertificateRealm">

    </auth-realm>

    <!--

    <auth-realm name="solaris" classname="com.iplanet.ias.security.auth.realm.solaris.SolarisRealm">

      <property name="jaas-context" value="solarisRealm"/>

    </auth-realm>

    -->

  </security-service>

  <transaction-service automatic-recovery="false" timeout-in-seconds="0" tx-log-dir="C:/Sun/AppServer7/domains/domain1/server1/logs" heuristic-decision="rollback" keypoint-interval="2048" monitoring-enabled="false">

  </transaction-service>

  <java-config java-home="C:/Sun/AppServer7/jdk" server-classpath="C:/Sun/AppServer7/lib/appserv-rt.jar;C:/Sun/AppServer7/jdk/lib/ tools.jar;C:/Sun/AppServer7/lib/appserv-ext.jar;C:/Sun/AppServer7/lib/appserv-cmp .jar;C:/Sun/AppServer7/lib/appserv-ideplugin.jar;C:\Sun\AppServer7\imq\lib/imq.ja r;C:\Sun\AppServer7\imq\lib/jaxm-api.jar;C:\Sun\AppServer7\imq\lib/imqadmin.jar;C :\Sun\AppServer7\imq\lib/imqutil.jar;C:/Sun/AppServer7/lib/appserv-admin.jar;C:\S un\AppServer7\share\lib/jaxrpc-impl.jar;C:\Sun\AppServer7\share\lib/jaxrpc-api.ja r;C:\Sun\AppServer7\share\lib/jaxr-impl.jar;C:\Sun\AppServer7\share\lib/jaxr-api. jar;C:\Sun\AppServer7\share\lib/jhall.jar;C:\Sun\AppServer7\share\lib/activation. jar;C:\Sun\AppServer7\share\lib/mail.jar;C:\Sun\AppServer7\share\lib/saaj-api.jar ;C:\Sun\AppServer7\share\lib/saaj-impl.jar;C:\Sun\AppServer7\share\lib/commons-lo gging.jar;C:\Sun\AppServer7\imq\lib/fscontext.jar;C:\Sun\AppServer7\imq\lib/provi derutil.jar;C:/Sun/AppServer7/lib/appserv-jstl.jar" classpath-suffix="C:/Sun/AppServer7/pointbase/client_tools/lib/pbclient42RE.jar" env-classpath-ignored="true" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n" debug-enabled="false" javac-options="-g">

    <jvm-options>-Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter </jvm-options>

    <jvm-options>-Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl </jvm-options>

     <jvm-options>-Djava.security.policy=C:/Sun/AppServer7/domains/domain1/server1/con fig/server.policy</jvm-options>

     <jvm-options>-Djava.security.auth.login.config=C:/Sun/AppServer7/domains/domain1/ server1/config/login.conf</jvm-options>

     <jvm-options>-Dcom.sun.jdo.api.persistence.model.multipleClassLoaders=reload </jvm-options>

<jvm-options>-Djava.util.logging.manager=com.iplanet.ias.server.logging.ServerLog Manager</jvm-options>

   <jvm-options>-Dcom.sun.aas.configRoot=C:/Sun/AppServer7\config</jvm-options>

  <jvm-options>-Dcom.sun.aas.imqLib=C:\Sun\AppServer7\imq\lib</jvm-options>

<jvm-options>-Dcom.sun.aas.imqBin=C:\Sun\AppServer7\imq\bin</jvm-options>

<jvm-options>-Dcom.sun.aas.webServicesLib=C:\Sun\AppServer7\share\lib</jvm-option s>

  <jvm-options>-Dsun.rmi.dgc.server.gcInterval=300000</jvm-options>

  <jvm-options> -Xrs -Xms128m -Xmx256m </jvm-options>

  </java-config>

  <resources>

  </resources>

  <applications dynamic-reload-enabled="false" dynamic-reload-poll-interval-in-seconds="2">

  </applications>

</server>



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.