Specifies a Java Authorization Contract for Containers (JACC) provider for pluggable authorization.
The following table describes subelements for the jacc-provider element.
Table 1–39 jacc-provider Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the jacc-provider element.
Table 1–40 jacc-provider Attributes
Attribute |
Default |
Description |
---|---|---|
default |
Specifies the name of the JACC provider. |
|
com.sun.enterprise.security.provider.PolicyWrapper |
Corresponds to and can be overridden by the system property javax.security.jacc.policy.provider . |
|
com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl |
Corresponds to and can be overridden by the system property javax.security.jacc.PolicyConfigurationFactory.provider . |
Specifies the Virtual Machine for the Java platform (JVM software) configuration parameters.
The following table describes subelements for the java-config element.
Table 1–41 java-config Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Configures a profiler for use with the Enterprise Server. |
|
zero or more |
Contains JVM command line options. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the java-config element.
Table 1–42 java-config Attributes
Attribute |
Default |
Description |
---|---|---|
${com.sun.aas.javaRoot} |
The path to the directory where the JDK is installed. |
|
false |
(optional) If true, the server starts up in debug mode ready for attachment with a JPDA-based debugger. |
|
-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 GlassFish Enterprise Server v3 Prelude Developer’s Guide. |
|
-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 details about the rmic command, see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/rmic.html. |
|
-g |
(optional) Specifies options passed to the Java compiler at application deployment time. |
|
none |
Deprecated. Do not use. |
|
none |
Deprecated. Do not use. |
|
none |
(optional) Specifies a prefix for the native library path. The native library path is the automatically constructed concatenation of the Enterprise 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. |
|
none |
(optional) Specifies a suffix for the native library path. |
|
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. |
|
true |
Deprecated. Do not use. |
Defines the properties that are required for creating a JDBC connection pool.
The following table describes subelements for the jdbc-connection-pool element.
Table 1–43 jdbc-connection-pool Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the jdbc-connection-pool element. Changing the following attributes requires a server restart: datasource-classname, associate-with-thread, lazy-connection-association, and lazy-connection-enlistment.
Table 1–44 jdbc-connection-pool Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the name of the connection pool. A jdbc-resource element’s pool-name attribute refers to this name. |
|
none |
(optional) Specifies a text description of this element. |
|
none |
Specifies the class name of the associated vendor-supplied data source. This class must implement javax.sql.DataSource, javax.sql.XADataSource , javax.sql.ConnectionPoolDatasource, or a combination. |
|
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. |
|
8 |
(optional) Specifies the initial and minimum number of connections maintained in the pool. |
|
32 |
(optional) Specifies the maximum number of connections that can be created to satisfy client requests. |
|
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. |
|
2 |
(optional) Specifies the number of idle 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-timeout-in-seconds interval. An idle connection is one that has not been used for a period of idle-timeout-in-seconds. When the pool size reaches steady-pool-size, connection removal stops. |
|
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. This timeout value must be kept shorter than the server side (database) timeout value to prevent the accumulation of unusable connections in the application. |
|
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. |
|
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. |
|
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. |
|
auto-commit |
(optional) Legal values are as follows:
Because many JDBC drivers cache the results of auto-commit and meta-data calls, they do not always provide reliable validations. Check with the driver vendor to determine whether these calls are cached or not. The table must exist and be accessible, but it doesn't require any rows. Do not use an existing table that has a large number of rows or a table that is already frequently accessed. More details can be found at Connection Validation in GlassFish JDBC. |
|
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-method is set to table. |
|
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. |
|
false |
(optional) If true, non-transactional connections can be made to the JDBC connection pool. These connections are not automatically enlisted with the transaction manager. |
|
false |
(optional) If true, non-Java-EE components, such as servlet filters, lifecycle modules, and third party persistence managers, can use this JDBC connection pool. The returned connection is automatically enlisted with the transaction context obtained from the transaction manager. Standard Java EE components can also use such pools. Connections obtained by non-component callers are not automatically closed at the end of a transaction by the container. They must be explicitly closed by the caller. |
|
0 |
Detects potential connection leaks by the application. A connection that is not returned back to the pool by the application within the specified period is assumed to be potentially leaking, and a stack trace of the caller is logged. A zero value disables leak detection. A nonzero value enables leak tracing. Use this attribute along with connection-leak-reclaim to avoid potential connection leaks from the application. More details are at Connection Leak Tracing. |
|
false |
If true, the pool will reclaim a connection after connection-leak-timeout-in-seconds occurs. |
|
0 |
Specifies the number of attempts to create a new connection in case of a failure. |
|
10 |
Specifies the time interval between attempts to create a connection when connection-creation-retry-attempts is greater than 0. |
|
0 |
Specifies the time interval within which a connection is validated at most once. Minimizes the number of validation calls. |
|
-1 |
Sets the query timeout property of a statement to enable termination of abnormally long running queries. The default value of -1 disables this feature. An abnormally long running JDBC query executed by an application may leave it in a hanging state unless a timeout is explicitly set on the statement. This attribute guarantees that all queries automatically time out if not completed within the specified period. When statements are created, the queryTimeout is set according to the value specified in this attribute. This works only when the underlying JDBC driver supports queryTimeout for Statement, PreparedStatement, CallableStatement, and ResultSet. |
|
false |
If true, a connection is not enlisted in a transaction until it is used. If false, any connection object available to a transaction is enlisted in the transaction. |
|
false |
If true, a physical connection is not associated with a logical connection until it is used. If false, a physical connection is associated with a logical connection even before it is used. |
|
false |
Specifies whether a connection is associated with the thread to enable the thread to reuse the connection. If true, allows a connection to be saved as a ThreadLocal in the calling thread. This connection gets reclaimed only when the calling thread dies or when the calling thread is not in use and the pool has run out of connections. If false, the thread must obtain a connection from the pool each time the thread requires a connection. This attribute associates a connection with a thread such that when the same thread is in need of a connection, it can reuse the connection already associated with that thread. In this case, the overhead of getting a connection from the pool is avoided. However, when this value is set to true, you should verify that the value of the max-pool-size attribute is comparable to the max-thread-pool-size attribute of the thread-pool element. If the max-thread-pool-size value is much higher than the max-pool-size value, a lot of time is spent associating a connection with a new thread after dissociating it from an older one. Use this attribute in cases where the thread pool should reuse connections to avoid this overhead. |
|
false |
Specifies whether a connection that is selected from the pool should be matched with the connections with certain credentials. If true, enables connection matching. You can set to false if connections are homogeneous. If the connection pool is used by applications that have multiple user credentials, match-connections must be true. The connection pool matches the request's credential with the connections in the pool and returns a matched connection for use. For new requests with different credentials, unmatched free connections are automatically purged to provide new connections to satisfy the new requests. This attribute need not be true if it is known that there is only one credential used by the applications and therefore the pool has homogeneous connections. |
|
0 |
Specifies the number of times a connections is reused by the pool, after which it is closed. A zero value disables this feature. By limiting the maximum number of times a connection can be reused, you can avoid statement leaks if the application does not close statements. |
|
false |
If true, wrapped JDBC objects are returned for Statement, PreparedStatement, CallableStatement, ResultSet, and DatabaseMetaData. This option ensures that Statement.getConnection() is the same as DataSource.getConnection(). Therefore, this option should be true when both Statement.getConnection() and DataSource.getConnection() are done. The default is false to avoid breaking existing applications. |
Most JDBC 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 Enterprise Server, some properties might be necessary for most databases. For details, see the JDBC 4.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.
Changing JDBC driver properties requires a server restart.
Table 1–45 jdbc-connection-pool Properties
Property |
Description |
---|---|
Specifies the user name for connecting to the database. |
|
Specifies the password for connecting to the database. |
|
Specifies the database for this connection pool. |
|
Specifies the database server for this connection pool. |
|
Specifies the port on which the database server listens for requests. |
|
Specifies the communication protocol. |
|
Specifies the initial SQL role name. |
|
Specifies an underlying XADataSource, or a ConnectionPoolDataSource if connection pooling is done. |
|
Specifies a text description. |
|
Specifies the URL for this connection pool. Although this is not a standard property, it is commonly used. |
|
Deprecated. Use the equivalent attribute. |
|
Deprecated. Use the equivalent attribute. |
|
Deprecated. Use the equivalent attribute. |
|
Deprecated. Use the equivalent attribute. |
Defines a JDBC (javax.sql.DataSource) resource.
The following table describes subelements for the jdbc-resource element.
Table 1–46 jdbc-resource Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the jdbc-resource element.
Table 1–47 jdbc-resource Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the JNDI name for the resource. |
|
none |
(optional) Specifies a text description of this element. |
|
none |
Specifies the name of the associated jdbc-connection-pool. |
|
user |
(optional) Defines the type of the resource. Allowed values are:
|
|
enabled |
true |
(optional) Determines whether this resource is enabled at runtime. |
Configures the host of the built-in Java Message Service (JMS) that is managed by the Enterprise Server.
This element is not implemented for GlassFish v3 Prelude.
The following table describes subelements for the jms-host element.
Table 1–48 jms-host Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the jms-host element.
Table 1–49 jms-host Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the name of the JMS host. |
|
machine-name |
(optional) Specifies the host name of the JMS host. |
|
7676 |
(optional) Specifies the port number used by the JMS provider. |
|
admin |
(optional) Specifies the administrator user name for the JMS provider. |
|
admin |
(optional) Specifies the administrator password for the JMS provider. |
Configures the built-in Java Message Service (JMS) that is managed by the Enterprise Server.
This element is not implemented for GlassFish v3 Prelude.
The following table describes subelements for the jms-service element.
Table 1–50 jms-service Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a host. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the jms-service element.
Table 1–51 jms-service Attributes
Attribute |
Default |
Description |
---|---|---|
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. |
|
EMBEDDED |
Specifies the type of JMS service:
|
|
none |
(optional) Specifies the string of arguments supplied for startup of the corresponding JMS instance. |
|
none |
Specifies the name of the default jms-host. If type is set to LOCAL, this jms-host is automatically started at Enterprise Server startup. |
|
5 |
(optional) Specifies the interval between reconnect attempts. |
|
3 |
(optional) Specifies the number of reconnect attempts. |
|
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. |
|
random |
(optional) Specifies whether the reconnection logic selects the broker from the imqAddressList in a random or sequential (priority) fashion. |
|
3 |
(optional) Specifies the number of times the reconnection logic iterates over the imqAddressList if addresslist-behavior is set to PRIORITY. |
|
mq |
(optional) Specifies the scheme for establishing connection with the broker. For example, specify http for connecting to the broker over HTTP. |
|
jms |
(optional) Specifies the type of broker service. If a broker supports SSL, the type of service can be ssljms. |
The following table describes properties for the jms-service element.
Table 1–52 jms-service Properties
Configures a JSR 160/255 compliant remote JMX connector, which handles the JMX communication between the domain administration server, the node agents, and the remote server instances. This JMX connector also handles JMX communication between an external management client and the domain administration server.
Only the system JMX connector is started by the server processes at startup. Do not configure additional JMX connectors.
The following table describes subelements for the jmx-connector element.
Table 1–53 jmx-connector Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Defines SSL parameters. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the jmx-connector element.
Table 1–54 jmx-connector Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the name of the connector used by the designated system JMX connector for JMX communication between server instances. Do not modify this name. |
|
rmi_jrmp |
(optional) Specifies the protocol that this JMX connector supports. The only supported protocol is rmi_jrmp. Do not modify this value. |
|
0.0.0.0 |
Specifies the IP address of the naming service where the JMX connector server stub is registered. This is not the port of the server socket that does the actual JMX communication. This is the address of the network interface where the RMI registry is started. If your system has multiple network interfaces, modify this value so that only a particular interface is selected. |
|
8686 |
Specifies the port number on with the naming service (RMI registry) listens for RMI client connections. The only use of this naming service is to download the RMI stubs. If the default port is occupied, a free port is used. Legal values are 1 - 65535. On UNIX, creating sockets that listen on ports 1 - 1024 requires superuser privileges. |
|
admin-realm |
Specifies the name of an auth-realm subelement of the security-service element for the server instance that is running this JMX connector's server end. Note that this is a dedicated administration security realm. |
|
false |
(optional) Determines whether JMX communication is encrypted. |
|
true |
(optional) Enables the JMX connector. Do not modify this value. |
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.
none - contains data