Sun Java System Application Server Platform Edition 8.2 Administration Reference

J

j2ee-application

Specifies a deployed J2EE application.

Superelements

applications

Subelements

The following table describes subelements for the j2ee-application element.

Table 1–54 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.

Table 1–55 j2ee-application Attributes

Attribute 

Default 

Description 

name

none 

The name of the application. 

location

none 

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

object-type

user

(optional) Defines the type of the resource. Allowed values are: 

  • system-all - A system resource for all server instances and the domain application server.

  • system-admin - A system resource only for the domain application server.

  • system-instance - A system resource for all server instances only.

  • user - A user resource.

enabled

true

(optional) Determines whether the application is enabled. 

directory-deployed

false

(optional) Specifies whether the application has been deployed to a directory. 

jacc-provider

Specifies a Java Authorization Contract for Containers (JACC) provider for pluggable authorization.

Superelements

security-service

Subelements

The following table describes subelements for the jacc-provider element.

Table 1–56 jacc-provider Subelements

Element 

Required 

Description 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the jacc-provider element.

Table 1–57 jacc-provider Attributes

Attribute 

Default 

Description 

name

default

Specifies the name of the JACC provider. 

policy-provider

none 

Corresponds to and can be overridden by the system property javax.security.jacc.policy.provider .

policy-configuration-factory-provider

none 

Corresponds to and can be overridden by the system property javax.security.jacc.PolicyConfigurationFactory.provider .

java-config

Specifies Java Virtual Machine (JVM) configuration parameters.

Superelements

config

Subelements

The following table describes subelements for the java-config element.

Table 1–58 java-config Subelements

Element 

Required 

Description 

profiler

zero or one 

Configures a profiler for use with the 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.

Table 1–59 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.

debug-options

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

(optional) Specifies JPDA (Java Platform Debugger Architecture) options. A list of debugging options is available at http://java.sun.com/products/jpda/doc/conninv.html#Invocation.

For more information about debugging, see the Sun Java System Application Server Platform Edition 8.2 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.

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. Only prefix the system classpath to override system classes, such as the XML parser classes. Use this attribute with caution. 

classpath-suffix

none 

(optional) Specifies a suffix for the system classpath. 

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") .

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 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

none 

(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 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. To prevent environment variable side effects in a production environment, set this value to true.

jdbc-connection-pool

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

Superelements

resources

Subelements

The following table describes subelements for the jdbc-connection-pool element.

Table 1–60 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.

Table 1–61 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, java.sql.XADataSource , javax.sql.ConnectionPoolDatasource, or a combination.

res-type

javax.sql. DataSource

(optional) Specifies the interface the data source class implements. The value of this attribute can be javax.sql.DataSource, javax.sql.XADataSource , or javax.sql.ConnectionPoolDatasource. 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 created or destroyed to maintain the steady-pool-size.

When the pool has no free connections, this number of connections is created, subject to the max-pool-size limit.

Connections are destroyed 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. All the invalid and idle connections are removed, sometimes resulting in removing a number of connections greater than this value.

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 might impact performance on some JDBC drivers. Only 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. 

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.

Properties

Most JDBC 3.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 the Application Server, some properties might be necessary for most databases. For details, see the JDBC 3.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.

Table 1–62 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. 

jdbc-resource

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

Superelements

resources

Subelements

The following table describes subelements for the jdbc-resource element.

Table 1–63 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.

Table 1–64 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.

object-type

user

(optional) Defines the type of the resource. Allowed values are: 

  • system-all - A system resource for all server instances and the domain application server.

  • system-admin - A system resource only for the domain application server.

  • system-instance - A system resource for all server instances only.

  • user - A user resource.

enabled

true

(optional) Determines whether this resource is enabled at runtime. 

jms-host

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

Superelements

jms-service

Subelements

The following table describes subelements for the jms-host element.

Table 1–65 jms-host Subelements

Element 

Required 

Description 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the jms-host element.

Table 1–66 jms-host Attributes

Attribute 

Default 

Description 

name

none 

Specifies the name of the JMS host. 

host

machine-name

(optional) Specifies the host name of the JMS host. 

port

7676

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

admin-user-name

admin

(optional) Specifies the administrator user name for the JMS provider. 

admin-password

admin

(optional) Specifies the administrator password for the JMS provider. 

jms-service

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

Superelements

config

Subelements

The following table describes subelements for the jms-service element.

Table 1–67 jms-service Subelements

Element 

Required 

Description 

jms-host

zero or more 

Specifies a host. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the jms-service element.

Table 1–68 jms-service Attributes

Attribute 

Default 

Description 

init-timeout-in-seconds

60

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

type

LOCAL

(optional) Specifies the type of JMS service: 

  • LOCAL means the JMS provider is started along with the Application Server

  • REMOTE means the JMS provider is remote and is not started by the Application Server

start-args

none 

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

default-jms-host

none 

Specifies the name of the default jms-host. If type is set to LOCAL, this jms-host is automatically started at Application Server startup.

reconnect-interval-in-seconds

60

(optional) Specifies the interval between reconnect attempts. 

reconnect-attempts

3

(optional) Specifies the number of reconnect attempts. 

reconnect-enabled

true

(optional) If true, reconnection is enabled. The JMS service 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 might not be able to complete successfully or the transaction might be rolled back due to a JMS exception. When the JMS service reestablishes the connection, JMS message redelivery semantics apply.

addresslist-behavior

random

(optional) Specifies whether the reconnection logic selects the broker from the imqAddressList in a random or sequential (priority) fashion.

addresslist-iterations

3

(optional) Specifies the number of times the reconnection logic iterates over the imqAddressList if addresslist-behavior is set to PRIORITY.

mq-scheme

mq

(optional) Specifies the scheme for establishing connection with the broker. For example, specify http for connecting to the broker over HTTP.

mq-service

jms

(optional) Specifies the type of broker service. If a broker supports SSL, the type of service can be ssljms.

Properties

The following table describes properties for the jms-service element.

Table 1–69 jms-service Properties

Property 

Default 

Description 

instance-name

imqbroker

Specifies the full Sun Java System Message Queue broker instance name.

instance-name-suffix

none 

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

append-version

false

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

jvm-options

Contains JVM command line options, for example:

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

For information about JVM options, see http://java.sun.com/docs/hotspot/VMOptions.html.

Superelements

java-config, profiler

Subelements

none - contains data