A Enterprise Application Deployment Descriptor Elements

The following sections describe Enterprise application deployment descriptors: application.xml (a Java EE standard deployment descriptor) and weblogic-application.xml (a WebLogic-specific application deployment descriptor).

With Java EE annotations, the standard application.xml deployment descriptor is optional. Annotations simplify the application development process by allowing developers to specify within the Java class itself how the application component behaves in the container, requests for dependency injection, and so on. Annotations are an alternative to deployment descriptors that were required by older versions of Enterprise applications (J2EE 1.4 and earlier). See Chapter 7, "Using Java EE Annotations and Dependency Injection"

The weblogic-application.xml file is also optional if you are not using any WebLogic Server extensions.

weblogic-application.xml Deployment Descriptor Elements

The following sections describe the many of the individual elements that are defined in the weblogic-application.xml Schema. The weblogic-application.xml file is the WebLogic Server-specific deployment descriptor extension for the application.xml deployment descriptor from Sun Microsystems. This is where you configure features such as shared Java EE libraries referenced in the application and EJB caching.

The file is located in the META-INF subdirectory of the application archive. The following sections describe elements that can appear in the file.

weblogic-application

The weblogic-application element is the root element of the application deployment descriptor.

The following table describes the elements you can define within a weblogic-application element.

Table A-1 weblogic-application Elements

Element Required? Maximum Number In File Description
<ejb>

Optional

1

Contains information that is specific to the EJB modules that are part of a WebLogic application. Currently, one can use the ejb element to specify one or more application level caches that can be used by the application's entity beans.

For more information on the elements you can define within the ejb element, see ejb.

<xml>

Optional

1

Contains information about parsers and entity mappings for XML processing that is specific to this application.

For more information on the elements you can define within the xml element, see xml.

<jdbc-connection-pool>

Optional

Unbounded

Zero or more. Specifies an application-scoped JDBC connection pool.

For more information on the elements you can define within the jdbc-connection-pool element, see jdbc-connection-pool.

<security>

Optional

1

Specifies security information for the application.

For more information on the elements you can define within the security element, see security.

<application-param>

Optional

Unbounded

Zero or more. Used to specify un-typed parameters that affect the behavior of container instances related to the application. The parameters listed here are currently supported. Also, these parameters in weblogic-application.xml can determine the default encoding to be used for requests and for responses.

  • webapp.encoding.default—Can be set to a string representing an encoding supported by the JDK. If set, this defines the default encoding used to process servlet requests and servlet responses. This setting is ignored if webapp.encoding.usevmdefault is set to true. This value is also overridden for request streams by the input-charset element of weblogic.xml.

  • webapp.encoding.usevmdefault—Can be set to true or false. If true, the system property file.encoding is used to define the default encoding.

The following parameter is used to affect the behavior of Web applications that are contained in this application.

  • webapp.getrealpath.accept_context_path—This is a compatibility switch that may be set to true or false. If set to true, the context path of Web applications is allowed in calls to the servlet API getRealPath.

Example:

<application-param>
<param-name>webapp.encoding.default
</param-name>
<param-value>UTF8</param-value>
</application-param>

For more information on the elements you can define within the application-param element, see application-param.

<classloader-structure>

Optional

Unbounded

A classloader-structure element allows you to define the organization of classloaders for this application. The declaration represents a tree structure that represents the classloader hierarchy and associates specific modules with particular nodes. A module's classes are loaded by the classloader that its associated with this element.

Example:

<classloader-structure>

<module-ref>

<module-uri>ejb1.jar</module-uri>

</module-ref>

</classloader-structure>

<classloader-structure>

<module-ref>

<module-uri>ejb2.jar</module-uri>

</module-ref>

</classloader-structure>

For more information on the elements you can define within the classloader-structure element, see classloader-structure.

<listener>

Optional

Unbounded

Zero or more. Used to register user-defined application lifecycle listeners. These are classes that extend the abstract base class weblogic.application.ApplicationLifecycleListener.

For more information on the elements you can define within the listener element, see listener.

<singleton-service>

Optional

Unbounded

Zero or more. Used to register user-defined singleton services. These are classes that implement the interface weblogic.cluster.singleton.SingletonService.

For more information on the elements you can define within the singleton-service element, see singleton-service.

<startup>

Optional

Unbounded

Zero or more. Used to register user-defined startup classes.

For more information on the elements you can define within the startup element, see startup.

Note: Application-scoped startup and shutdown classes have been deprecated as of release 9.0 of WebLogic Server. Instead, you should use lifecycle listener events in your applications. For details, see Chapter 10, "Programming Application Life Cycle Events"

<shutdown>

Optional

Unbounded

Zero or more. Used to register user defined shutdown classes.

For more information on the elements you can define within the shutdown element, see shutdown.

Note: Application-scoped startup and shutdown classes have been deprecated as of release 9.0 of WebLogic Server. Instead, you should use lifecycle listener events in your applications. For details, see Chapter 10, "Programming Application Life Cycle Events."

<module>

Optional

Unbounded

Represents a single WebLogic application module, such as a JMS or JDBC module.

This element has the following child elements:

  • name—The name of the module.

  • type—The type of module. Valid values are JMS, JDBC, or Interception.

  • path—The path of the XML file that fully describes the module, relative to the root of the Enterprise application.

The following example shows how to specify a JMS module called Workflows, fully described by the XML file jms/Workflows-jms.xml:

<module>
  <name>Workflows</name>
  <type>JMS</type>
  <path>jms/Workflows-jms.xml</path>
</module>
<library-ref>

Optional

Unbounded

A reference to a shared Java EE library.

For more information on the elements you can define within the library element, see library-ref.

<fair-share-request>

Optional

Unbounded

Specifies a fair share request class, which is a type of Work Manager request class. In particular, a fair share request class specifies the average percentage of thread-use time required to process requests.

The <fair-share-request> element can take the following child elements:

  • name—The name of the fair share request class.

  • fair-share—An integer representing the average percentage of thread-use time.

See "Using Work Managers to Optimize Scheduled Work".

<response-time-request>

Optional

Unbounded

Specifies a response time request class, which is a type of Work manager class. In particular, a response time request class specifies a response time goal in milliseconds.

The <response-time-request> element can take the following child elements:

  • name—The name of the response time request class.

  • goal-ms—The integer response time goal.

See "Using Work Managers to Optimize Scheduled Work".

<context-request>

Optional

Unbounded

Specifies a context request class, which is a type of Work manager class. In particular, a context request class assigns request classes to requests based on context information, such as the current user or the current user's group.

The <context-request> element can take the following child elements:

  • name—The name of the context request class.

  • context-case—An element that describes the context.

The <context-case> element can itself take the following child elements:

  • user-name or group-name—The user or group to which the context applies.

  • request-class-name—The name of the request class.

See "Using Work Managers to Optimize Scheduled Work".

<max-threads-constraint>

Optional

Unbounded

Specifies a max-threads-constraint Work Manager constraint. A Work Manager constraint defines minimum and maximum numbers of threads allocated to execute requests and the total number of requests that can be queued or executing before WebLogic Server begins rejecting requests.

The max-threads constraint limits the number of concurrent threads executing requests from the constrained work set.

The <max-threads-constraint> element can take the following child elements:

  • name—The name of the max-thread-constraint.

  • Either count or pool-name—The integer maximum number of concurrent threads, or the name of a connection pool which determines the maximum.

See "Using Work Managers to Optimize Scheduled Work".

<min-threads-constraint>

Optional

Unbounded

Specifies a min-threads-constraint Work Manager constraint. A Work Manager constraint defines minimum and maximum numbers of threads allocated to execute requests and the total number of requests that can be queued or executing before WebLogic Server begins rejecting requests.

The min-threads constraint guarantees a number of threads the server will allocate to affected requests to avoid deadlocks.

The <min-threads-constraint> element can take the following child elements:

  • name—The name of the min-thread-constraint.

  • count—The integer minimum number of threads.

See "Using Work Managers to Optimize Scheduled Work".

<capacity>

Optional

Unbounded

Specifies a capacity Work Manager constraint. A Work Manager constraint defines minimum and maximum numbers of threads allocated to execute requests and the total number of requests that can be queued or executing before WebLogic Server begins rejecting requests.

The capacity constraint causes the server to reject requests only when it has reached its capacity.

The <capacity> element can take the following child elements:

  • name—The name of the capacity constraint.

  • count—The integer thread capacity.

See "Using Work Managers to Optimize Scheduled Work".

<work-manager>

Optional

Unbounded

Specifies the Work Manager that is associated with the application.

For more information on the elements you can define within the work-manager element, see work-manager.

See "Using Work Managers to Optimize Scheduled Work" for detailed information on Work Managers.

<application-admin-mode-trigger>

Optional

Unbounded

Specifies the number of stuck threads needed to bring the application into administration mode.

You can specify the following child elements:

  • max-stuck-thread-time—The maximum amount of time, in seconds, that a thread should remain stuck.

  • stuck-thread-count—Number of stuck threads that triggers the stuck thread work manager.

<session-descriptor>

Optional

Unbounded

Specifies a list of configuration parameters for servlet sessions.

For more information on the elements you can define within the <session-descriptor> element, see session-descriptor.

<library-context-root-override>

Optional

Unbounded

Zero or more. Used to override the context-root of a Web module specified in the deployment descriptor of a library referenced by this application.

For more information on the elements you can define within the <library-context-root-override> element, see library-context-root-override.

<component-factory-class-name>

Optional

1

Used to enable the Spring extension by setting this element to org.springframework.jee.interfaces.SpringComponentFactory. This element exists in EJB, Web, and application descriptors. A module-level descriptor overwrites an application-level descriptor. If set to null (default), the Spring extension is disabled.

<prefer-application-packages>

Optional

1

Used for filtering ClassLoader configuration. Specifies a list of packages for classes that must always be loaded from the application.

<prefer-application-resources>

Optional

1

Used for filtering ClassLoader configuration. Specifies a list of resources that must always be loaded from the application, even if the resources are found in the system classloader.

Note that the resource loading behavior is different from the resource loading behavior when <prefer-application-packages> is used.

In that case, application resources get a preference over system resources. The resources captured in this element are never looked up in the system classloader.

<fast-swap>

Optional

1

Specifies whether FastSwap deployment is used to minimize redeployment since Java classes are redefined in-place without reloading the ClassLoader.

For more information, see "Using FastSwap Deployment to Minimize Redeployment" in Deploying Applications to WebLogic Server.

For information on the elements you can define within the <fast-swap> element, see fast-swap.


ejb

The following table describes the elements you can define within an ejb element.

Table A-2 ejb Elements

Element Required? Maximum Number in File Description
<entity-cache>

Optional

Unbounded

Zero or more. The entity-cache element is used to define a named application level cache that is used to cache entity EJB instances at runtime. Individual entity beans refer to the application-level cache that they must use, referring to the cache name. There is no restriction on the number of different entity beans that may reference an individual cache.

To use application-level caching, you must specify the cache using the <entity-cache-ref> element of the weblogic-ejb-jar.xml descriptor. Two default caches named ExclusiveCache and MultiVersionCache are used for this purpose. An application may explicitly define these default caches to specify non-default values for their settings. Note that the caching-strategy cannot be changed for the default caches. By default, a cache uses max-beans-in-cache with a value of 1000 to specify its maximum size.

Example:

<entity-cache>

<entity-cache-name>ExclusiveCache</entity-cache-name>

<max-cache-size>

<megabytes>50</megabytes>

</max-cache-size>

</entity-cache>

For more information on the elements you can define within the entity-cache element, see entity-cache.

<start-mbds-with- application

Optional

1

Allows you to configure the EJB container to start Message Driven BeanS (MDBS) with the application. If set to true, the container starts MDBS as part of the application. If set to false, the container keeps MDBS in a queue and the server starts them as soon as it has started listening on the ports.


entity-cache

The following table describes the elements you can define within a entity-cache element.

Table A-3 entity-cache Elements

Element Required? Maximum Number in File Description
<entity-cache-name>

Required

1

Specifies a unique name for an entity bean cache. The name must be unique within an ear file and may not be the empty string.

Example:

<entity-cache-name>ExclusiveCache</entity-cache-name>
<max-beans-in-cache>

Optional

If you specify this element, you cannot also specify <max-cache-size>.

1

Specifies the maximum number of entity beans that are allowed in the cache. If the limit is reached, beans may be passivated. This mechanism does not take into account the actual amount of memory that different entity beans require. This element can be set to a value of 1 or greater.

Default Value: 1000

<max-cache-size>

Optional

If you specify this element, you cannot also specify <max-beans-in-cache>.

1

Used to specify a limit on the size of an entity cache in terms of memory size—expressed either in terms of bytes or megabytes. A bean provider should provide an estimate of the average size of a bean in the weblogic-ejb-jar.xml descriptor if the bean uses a cache that specifies its maximum size using the max-cache-size element. By default, a bean is assumed to have an average size of 100 bytes.

For more information on the elements you can define within the ejb element, see max-cache-size.

<max-queries-in-cache>

Optional

1

Specifies the maximum SQL queries that can be present in the entity cache at a given moment.

<caching-strategy>

Optional

1

Specifies the general strategy that the EJB container uses to manage entity bean instances in a particular application level cache. A cache buffers entity bean instances in memory and associates them with their primary key value.

The caching-strategy element can only have one of the following values:

  • Exclusive—Caches a single bean instance in memory for each primary key value. This unique instance is typically locked using the EJB container's exclusive locking when it is in use, so that only one transaction can use the instance at a time.

  • MultiVersion—Caches multiple bean instances in memory for a given primary key value. Each instance can be used by a different transaction concurrently.

Default Value: MultiVersion

Example:

<caching-strategy>Exclusive</caching-strategy>


max-cache-size

The following table describes the elements you can define within a max-cache-size element.

Table A-4 max-cache-size Elements

Element Required? Maximum Number in File Description
<bytes>

You must specify either <bytes> or <megabytes>

1

The size of an entity cache in terms of memory size, expressed in bytes.

<megabytes>

You must specify either <bytes> or <megabytes>

1

The size of an entity cache in terms of memory size, expressed in megabytes.


xml

The following table describes the elements you can define within an xml element.

Table A-5 xml Elements

Element Required? Maximum Number in File Description
<parser-factory>

Optional

1

The parent element used to specify a particular XML parser or transformer for an enterprise application.

For more information on the elements you can define within the parser-factory element, see parser-factory.

<entity-mapping>

Optional

Unbounded

Zero or More. Specifies the entity mapping. This mapping determines the alternative entity URI for a given public or system ID. The default place to look for this entity URI is the lib/xml/registry directory.

For more information on the elements you can define within the entity-mapping element, see entity-mapping.


parser-factory

The following table describes the elements you can define within a parser-factory element.

Table A-6 parser-factory Elements

Element Required? Maximum Number in File Description
<saxparser-factory>

Optional

1

Allows you to set the SAXParser Factory for the XML parsing required in this application only. This element determines the factory to be used for SAX style parsing. If you do not specify the saxparser-factory element setting, the configured SAXParser Factory style in the Server XML Registry is used.

Default Value: Server XML Registry setting

<document-builder-factory>

Optional

1

Allows you to set the Document Builder Factory for the XML parsing required in this application only. This element determines the factory to be used for DOM style parsing. If you do not specify the document-builder-factory element setting, the configured DOM style in the Server XML Registry is used.

Default Value: Server XML Registry setting

<transformer-factory>

Optional

1

Allows you to set the Transformer Engine for the style sheet processing required in this application only. If you do not specify a value for this element, the value configured in the Server XML Registry is used.

Default value: Server XML Registry setting.


entity-mapping

The following table describes the elements you can define within an entity-mapping element.

Table A-7 entity-mapping Elements

Element Required? Maximum Number in File Description
<entity-mapping-name>

Required

1

Specifies the name for this entity mapping.

<public-id>

Optional

1

Specifies the public ID of the mapped entity.

<system-id>

Optional

1

Specifies the system ID of the mapped entity.

<entity-uri>

Optional

1

Specifies the entity URI for the mapped entity.

<when-to-cache>

Optional

1

Legal values are:

  • cache-on-reference

  • cache-at-initialization

  • cache-never

The default value is cache-on-reference.

<cache-timeout-interval>

Optional

1

Specifies the integer value in seconds.


jdbc-connection-pool

Note:

The jdbc-connection-pool element is deprecated. To define a data source in your Enterprise application, you can package a JDBC module with the application. For more information, see "Configuring JDBC Application Modules for Deployment" in Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server.

The following table describes the elements you can define within a jdbc-connection-pool element.

Table A-8 jdbc-connection-pool Elements

Element Required? Maximum Number in File Description
<data-source-jndi-name>

Required

1

Specifies the JNDI name in the application-specific JNDI tree.

<connection-factory>

Required

1

Specifies the connection parameters that define overrides for default connection factory settings.

  • user-name—Optional. The user-name element is used to override UserName in the JDBCDataSourceFactoryMBean.

  • url—Optional. The url element is used to override URL in the JDBCDataSourceFactoryMBean.

  • driver-class-name—Optional. The driver-class-name element is used to override DriverName in the JDBCDataSourceFactoryMBean.

  • connection-params—Zero or more.

  • parameter+ (param-value, param-name)—One or more

For more information on the elements you can define within the connection-factory element, see connection-factory.

<pool-params>

Optional

1

Defines parameters that affect the behavior of the pool.

For more information on the elements you can define within the pool-params element, see pool-params.

<driver-params>

Optional

1

Sets behavior on WebLogic Server drivers.

For more information on the elements you can define within the driver-params element, see driver-params.

<acl-name>

Optional

1

DEPRECATED.


connection-factory

The following table describes the elements you can define within a connection-factory element.

Table A-9 connection-factory Elements

Element Required? Maximum Number in File Description
<factory-name>

Optional

1

Specifies the name of a JDBCDataSourceFactoryMBean in the config.xml file.

<connection-properties>

Optional

1

Specifies the connection properties for the connection factory. Elements that can be defined for the connection-properties element are:

  • user-name—Optional. Used to override UserName in the JDBCDataSourceFactoryMBean.

  • password—Optional. Used to override Password in the JDBCDataSourceFactoryMBean.

  • url—Optional. Used to override URL in the JDBCDataSourceFactoryMBean.

  • driver-class-name—Optional. Used to override DriverName in the JDBCDataSourceFactoryMBean

  • connection-params—Zero or more. Used to set parameters which will be passed to the driver when making a connection. Example:

<connection-params>
  <parameter>
   <description>Desc of param
   </description>
   <param-name>foo</param-name>
   <param-value>xyz</param-value>
  </parameter>
</connection-params>

pool-params

The following table describes the elements you can define within a pool-params element.

Table A-10 pool-params Elements

Element Required? Maximum Number in File Description
<size-params>

Optional

1

Defines parameters that affect the number of connections in the pool.

  • initial-capacity—Optional. The initial-capacity element defines the number of physical database connections to create when the pool is initialized. The default value is 1.

  • max-capacity—Optional. The max-capacity element defines the maximum number of physical database connections that this pool can contain. Note that the JDBC Driver may impose further limits on this value. The default value is 1.

  • capacity-increment—Optional. The capacity-increment element defines the increment by which the pool capacity is expanded. When there are no more available physical connections to service requests, the pool creates this number of additional physical database connections and adds them to the pool. The pool ensures that it does not exceed the maximum number of physical connections as set by max-capacity. The default value is 1.

  • shrinking-enabled—Optional. The shrinking-enabled element indicates whether or not the pool can shrink back to its initial-capacity when connections are detected to not be in use.

  • shrink-period-minutes—Optional. The shrink-period-minutes element defines the number of minutes to wait before shrinking a connection pool that has incrementally increased to meet demand. The shrinking-enabled element must be set to true for shrinking to take place.

  • shrink-frequency-seconds—Optional.

  • highest-num-waiters—Optional.

  • highest-num-unavailable—Optional.

<xa-params>

Optional

1

Defines the parameters for the XA DataSources.

  • debug-level—Optional. Integer. The debug-level element defines the debugging level for XA operations. The default value is 0.

  • keep-conn-until-tx-complete-enabled—Optional. Boolean. If you set the keep-conn-until-tx-complete-enabled element to true, the XA connection pool associates the same XA connection with the distributed transaction until the transaction completes.

  • end-only-once-enabled—Optional. Boolean. If you set the end-only-once-enabled element to true, the XAResource.end() method is only called once for each pending XAResource.start() method.

  • recover-only-once-enabled—Optional. Boolean. If you set the recover-only-once-enabled element to true, recover is only called one time on a resource.

  • tx-context-on-close-needed—Optional. Set the tx-context-on-close-needed element to true if the XA driver requires a distributed transaction context when closing various JDBC objects (for example, result sets, statements, connections, and so on). If set to true, the SQL exceptions that are thrown while closing the JDBC objects in no transaction context are swallowed.

  • new-conn-for-commit-enabled—Optional. Boolean. If you set the new-conn-for-commit-enabled element to true, a dedicated XA connection is used for commit/rollback processing of a particular distributed transaction.

<xa-params> Continued...

Optional

1

  • prepared-statement-cache-sizeDeprecated. Optional. Use the prepared-statement-cache-size element to set the size of the prepared statement cache. The size of the cache is a number of prepared statements created from a particular connection and stored in the cache for further use. Setting the size of the prepared statement cache to 0 turns it off.

Note: Prepared-statement-cache-size is deprecated. Use cache-size in driver-params/prepared-statement. See driver-params for more information.

  • keep-logical-conn-open-on-release—Optional. Boolean. Set the keep-logical-conn-open-on-release element to true, to keep the logical JDBC connection open when the physical XA connection is returned to the XA connection pool. The default value is false.

  • local-transaction-supported—Optional. Boolean. Set the local-transaction-supported to true if the XA driver supports SQL with no global transaction; otherwise, set it to false. The default value is false.

  • resource-health-monitoring-enabled—Optional. Set the resource-health-monitoring-enabled element to true to enable JTA resource health monitoring for this connection pool.

<xa-params> Continued...

Optional

1

  • xa-set-transaction-timeout—Optional.

    Used in: xa-params

    Example:

    <xa-set-transaction-timeout>

    true

    </xa-set-transaction-timeout>

  • xa-transaction-timeout—Optional.

    When the xa-set-transaction-timeout value is set to true, the transaction manager invokes setTransactionTimeout on the resource before calling XAResource.start. The Transaction Manager passes the global transaction timeout value. If this attribute is set to a value greater than 0, then this value is used in place of the global transaction timeout.

    Default value: 0

    Used in: xa-params

    Example:

    <xa-transaction-timeout>

    30

    </xa-transaction-timeout>

  • rollback-localtx-upon-connclose—Optional.

    When the rollback-localtx-upon-connclose element is true, the connection pool calls rollback() on the connection before putting it back in the pool.

    Default value: false

    Used in: xa-params

    Example:

    <rollback-localtx-upon-connclose>

    true </rollback-localtx-upon-connclose>

<login-delay-seconds>

Optional

1

Sets the number of seconds to delay before creating each physical database connection. Some database servers cannot handle multiple requests for connections in rapid succession. This property allows you to build in a small delay to let the database server catch up. This delay occurs both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created.

<leak-profiling-enabled>

Optional

1

Enables JDBC connection leak profiling. A connection leak occurs when a connection from the pool is not closed explicitly by calling the close() method on that connection. When connection leak profiling is active, the pool stores the stack trace at the time the connection object is allocated from the pool and given to the client. When a connection leak is detected (when the connection object is garbage collected), this stack trace is reported.

This element uses extra resources and will likely slowdown connection pool operations, so it is not recommended for production use.

<connection-check-params>

Optional

1

  • Defines whether, when, and how connections in a pool is checked to make sure they are still alive.

  • table-name—Optional. The table-name element defines a table in the schema that can be queried.

  • check-on-reserve-enabled—Optional. If the check-on-reserve-enabled element is set to true, then the connection will be tested each time before it is handed out to a user.

  • check-on-release-enabled—Optional. If the check-on-release-enabled element is set to true, then the connection will be tested each time a user returns a connection to the pool.

  • refresh-minutes—Optional. If the refresh-minutes element is defined, a trigger is fired periodically (based on the number of minutes specified). This trigger checks each connection in the pool to make sure it is still valid.

  • check-on-create-enabled—Optional. If set to true, then the connection will be tested when it is created.

  • connection-reserve-timeout-seconds—Optional. Number of seconds after which the call to reserve a connection from the pool will timeout.

  • connection-creation-retry-frequency-seconds—Optional. The frequency of retry attempts by the pool to establish connections to the database.

  • inactive-connection-timeout-seconds—Optional. The number of seconds of inactivity after which reserved connections will forcibly be released back into the pool.

<connection-check-params>
Continued...

Optional

1

  • test-frequency-seconds—Optional. The number of seconds between database connection tests. After every test-frequency-seconds interval, unused database connections are tested using table-name. Connections that do not pass the test will be closed and reopened to re-establish a valid physical database connection. If table-name is not set, the test will not be performed.

  • init-sql—Optional. Specifies a SQL query that automatically runs when a connection is created.

<jdbcxa-debug-level>

Optional

1

This is an internal setting.

<remove-infected-connections-enabled>

Optional

1

Controls whether a connection is removed from the pool when the application asks for the underlying vendor connection object. Enabling this attribute has an impact on performance; it essentially disables the pooling of connections (as connections are removed from the pool and replaced with new connections).


driver-params

The following table describes the elements you can define within a driver-params element.

Table A-11 driver-params Elements

Element Required? Maximum Number in File Description
<statement>

Optional

1

Defines the driver-params statement. Contains the following optional element: profiling-enabled.

Example:

<statement>

<profiling-enabled>true

</profiling-enabled>

</statement>

<prepared-statement

Optional

1

Enables the running of JDBC prepared statement cache profiling. When enabled, prepared statement cache profiles are stored in external storage for further analysis. This is a resource-consuming feature, so it is recommended that you turn it off on a production server. The default value is false.

  • profiling-enabled—Optional.

  • cache-profiling-threshold—Optional. The cache-profiling-threshold element defines a number of statement requests after which the state of the prepared statement cache is logged. This element minimizes the output volume. This is a resource-consuming feature, so it is recommended that you turn it off on a production server.

  • cache-size—Optional. The cache-size element returns the size of the prepared statement cache. The size of the cache is a number of prepared statements created from a particular connection and stored in the cache for further use.

  • parameter-logging-enabled—Optional. During SQL roundtrip profiling it is possible to store values of prepared statement parameters. The parameter-logging-enabled element enables the storing of statement parameters. This is a resource-consuming feature, so it is recommended that you turn it off on a production server.

  • max-parameter-length—Optional. During SQL roundtrip profiling it is possible to store values of prepared statement parameters. The max-parameter-length element defines maximum length of the string passed as a parameter for JDBC SQL roundtrip profiling. This is a resource-consuming feature, so you should limit the length of data for a parameter to reduce the output volume.

  • cache-type—Optional.

<row-prefetch-enabled>

Optional

1

Specifies whether to enable row prefetching between a client and WebLogic Server for each ResultSet.

When an external client accesses a database using JDBC through Weblogic Server, row prefetching improves performance by fetching multiple rows from the server to the client in one server access. WebLogic Server ignores this setting and does not use row prefetching when the client and WebLogic Server are in the same JVM

<row-prefetch-size>

Optional

1

Specifies the number of result set rows to prefetch for a client.

The optimal value depends on the particulars of the query. In general, increasing this number increases performance, until a particular value is reached. At that point further increases do not result in any significant increase in performance.

Note: Typically you will not see any increase in performance after 100 rows. The default value should be adequate for most situations.

Valid values for this element are between 2 and 65536. The default value is 48.

<stream-chunk-size>

Optional

1

Specifies the data chunk size for streaming data types, which are pulled from WebLogic Server to the client as needed.


security

The following table describes the elements you can define within a security element.

Table A-12 security Elements

Element Required? Maximum Number in File Description
<realm-name>

Optional

1

Names a security realm to be used by the application. If none is specified, the system default realm is used

<security-role-assignment>

Optional

Unbounded

Declares a mapping between an application-wide security role and one or more WebLogic Server principals.

Example:

   <security-role-assignment>
     <role-name>
       PayrollAdmin
     </role-name>
     <principal-name>
       Tanya
     </principal-name>
     <principal-name>
       Fred
     </principal-name>
     <principal-name>
       system
     </principal-name>
   </security-role-assignment>

application-param

The following table describes the elements you can define within a application-param element.

Table A-13 application-param Elements

Element Required? Maximum Number in File Description
<description>

Optional

1

Provides a description of the application parameter.

<param-name>

Required

1

Defines the name of the application parameter.

<param-value>

Required

1

Defines the value of the application parameter.


classloader-structure

The following table describes the elements you can define within a classloader-structure element.

Table A-14 classloader-structure Elements

Element Required? Maximum Number in File Description
<module-ref>

Optional

Unbounded

The following list describes the elements you can define within a module-ref element:

  • module-uri—Zero or more. Defined within the module-ref element.

<classloader-structure>

Optional

Unbounded

Allows for arbitrary nesting of classloader structures for an application. However, for this version of WebLogic Server, the depth is restricted to three levels.


listener

The following table describes the elements you can define within a listener element.

Table A-15 listener Elements

Element Required? Maximum Number in File Description
<listener-class>

Required

1

Name of the user's implementation of ApplicationLifecycleListener.

<listener-uri>

Optional

1

A JAR file within the EAR that contains the implementation. If you do not specify the listener-uri, it is assumed that the class is visible to the application.

<run-as-principal-name>

Optional

1

Specific a user identity to startup and shutdown application lifecycle events. The identity specified here should be a valid user name in the system. If run-as-principal-name is not specified, the deployment initiator user identity will be used as the run-as identity for the execution of the application lifecycle listener.

Note: If the run-as-principal-name identity defined for the application lifecycle listener is an administrator, the application deployer must have administrator privileges; otherwise, deployment will fail.


singleton-service

The following table describes the elements you can define within a singleton-service element.

Table A-16 singleton-service Elements

Element Required? Maximum Number in File Description
<class-name>

Required

1

Defines the name of the class to be run when the application is being deployed.

<singleton-uri>

Optional

1

Defines a JAR file within the EAR that contains the singleton-service. If singleton-uri is not defined, then its assumed that the class is visible to the application.


startup

The following table describes the elements you can define within a startup element.

Note::

Application-scoped startup and shutdown classes have been deprecated as of release 9.0 of WebLogic Server. Instead, you should use lifecycle listener events in your applications. For details, see Chapter 10, "Programming Application Life Cycle Events."

Table A-17 startup Elements

Element Required? Maximum Number in File Description
<startup-class>

Required

1

Defines the name of the class to be run when the application is being deployed.

<startup-uri>

Optional

1

Defines a JAR file within the EAR that contains the startup-class. If startup-uri is not defined, then its assumed that the class is visible to the application.


shutdown

The following table describes the elements you can define within a shutdown element.

Note: :

Application-scoped startup and shutdown classes have been deprecated as of release 9.0 of WebLogic Server. Instead, you should use lifecycle listener events in your applications. For details, see Chapter 10, "Programming Application Life Cycle Events."

Table A-18 shutdown Elements

Element Required Optional Maximum Number in File Description

<shutdown-class>

Required

1

Defines the name of the class to be run when the application is undeployed.

<shutdown-uri>

Optional

1

Defines a JAR file within the EAR that contains the shutdown-class. If you do not define the shutdown-uri element, it is assumed that the class is visible to the application.


work-manager

The following table describes the elements you can define within a work-manager element.

See "Using Work Managers to Optimize Scheduled Work" for examples and information on Work Managers.

Table A-19 work-manager Elements

Element Required? Maximum Number in File Description
<name>

Required

1

The name of the Work Manager.

<response-time-request-class>

Optional

1

See the description of the <response-time-request> element in weblogic-application for information on this child element of <work-manager>.

If you specify this element, you cannot also specify <fair-share-request-class>, <context-request-class>, or <request-class-name>.

<fair-share-request-class>

Optional

1

See the description of the <fair-share-request> element in weblogic-application for information on this child element of <work-manager>.

If you specify this element, you cannot also specify <response-time-request-class>, <context-request-class>, or <request-class-name>.

<context-request-class>

Optional

1

See the description of the <context-request> element in weblogic-application for information on this child element of <work-manager>.

If you specify this element, you cannot also specify <fair-share-request-class>, <response-time-request-class>, or <request-class-name>.

<request-class-name>

Optional

1

The name of the request class.

If you specify this element, you cannot also specify <fair-share-request-class>, <context-request-class>, or <response-time-request-class>.

<min-threads-constraint>

Optional

1

See the description of the <min-threads-constraint> element in weblogic-application for information on this child element of <work-manager>.

If you specify this element, you cannot also specify <min-threads-constraint-name>.

<min-threads-constraint-name>

Optional

1

The name of the min-threads constraint.

If you specify this element, you cannot also specify <min-threads-constraint>.

<max-threads-constraint>

Optional

1

See the description of the <max-threads-constraint> element in weblogic-application for information on this child element of <work-manager>.

If you specify this element, you cannot also specify <max-threads-constraint-name>.

<max-threads-constraint-name>

Optional

1

The name of the max-threads constraint.

If you specify this element, you cannot also specify <max-threads-constraint>.

<capacity>

Optional

1

See the description of the <capacity> element in weblogic-application for information on this child element of <work-manager>.

If you specify this element, you cannot also specify <capacity-name>.

<capacity-name>

Optional

1

The name of the thread capacity constraint.

If you specify this element, you cannot also specify <capacity>.

<work-manager-shutdown-trigger>

Optional

1

Used to specify a Stuck Thread Work Manager component that can shut down the Work Manager in response to stuck threads.

You can specify the following child elements:

  • max-stuck-thread-time—The maximum amount of time, in seconds, that a thread should remain stuck.

  • stuck-thread-count—Number of stuck threads that triggers the stuck thread work manager.

If you specify this element, you cannot also specify <ignore-stuck-threads>.

<ignore-stuck-threads>

Optional

1

Specifies whether the Work Manager should ignore stuck threads and never shut down even if threads become stuck.

If you specify this element, you cannot also specify <work-manager-shutdown-trigger>.


session-descriptor

The following table describes the elements you can define within a session-descriptor element.

Table A-20 session-descriptor Elements

Element Required? Maximum Number in File Description
<timeout-secs>

Optional

1

Specifies the number of seconds after which the session times out.

Default value is 3600 seconds.

<invalidation-interval-secs>

Optional

1

Specifies the number of seconds of the invalidation trigger interval.

Default value is 60 seconds.

<debug-enabled>

Optional

1

Specifies whether debugging is enabled for HTTP sessions.

Default value is false.

<id-length>

Optional

1

Specifies the length of the session ID.

Default value is 52.

<tracking-enabled>

Optional

1

Specifies whether session tracking is enabled between HTTP requests.

Default value is true.

<cache-size>

Optional

1

Specifies the cache size for JDBC and file persistent sessions.

Default value is 1028.

<max-in-memory-sessions>

Optional

1

Specifies the maximum sessions limit for memory/replicated sessions.

Default value is -1, or unlimited.

<cookies-enabled>

Optional

1

Specifies the Web application container should set cookies in the response.

Default value is true.

<cookie-name>

Optional

1

Specifies the name of the cookie that tracks sessions.

Default name is JSESSIONID.

<cookie-path>

Optional

1

Specifies the session tracking cookie path.

Default value is /.

<cookie-domain>

Optional

1

Specifies the session tracking cookie domain.

Default value is null.

<cookie-comment>

Optional

1

Specifies the session tracking cookie comment.

Default value is null.

<cookie-secure>

Optional

1

Specifies whether the session tracking cookie is marked secure.

Default value is false.

<cookie-max-age-secs>

Optional

1

Specifies that maximum age of the session tracking cookie.

Default value is -1, or unlimited.

<persistent-store-type>

Optional

1

Specifies the type of storage for session persistence.

You can specify the following values:

  • memory—Default value.

  • replicated—Requires clustering.

  • replicated_if_clustered—Defaults to memory in non-clustered case.

  • file

  • jdbc

  • cookie

<persistent-store-cookie-name>

Optional

1

Specifies the name of the cookie that holds the attribute name and values when using cookie-based session persistence.

Default value is WLCOOKIE.

<persistent-store-dir>

Optional

1

Specifies the name of the directory when using file-based session persistence. The directory is relative to the temporary directory defined for the Web application.

Default value is session_db.

<persistent-store-pool>

Optional

1

Specifies the name of the JDBC connection pool when using jdbc-based session persistence.

<persistent-store-table>

Optional

1

Specifies the name of the database table when using jdbc-based session persistence.

Default value is wl_servlet_sessions.

<jdbc-column-name-max-inactive-interval>

Optional

1

Alternative name for the wl_max_inactive_interval column name when using jdbc-based session persistence. Required for certain databases that do not support long column names

<jdbc-connection-timeout-secs>

Optional

1

DEPRECATED

<url-rewriting-enabled>

Optional

1

Specifies whether URL rewriting is enabled.

Default value is true.

<http-proxy-caching-of-cookies>

Optional

1

Specifies whether WebLogic Server adds the following HTTP header to the response:

Cache-control: no-cache=set-cookie

This header specifies that proxy caches should not cache the cookies.

Default value is true, which means that the header is NOT added. Set this element to false if you want the header added to the response.

<encode-session-id-in-query-params>

Optional

1

Specifies whether WebLogic Server should encode the session ID in the path parameters.

Default value is false.

<monitoring-attribute-name>

Optional

1

Used to tag runtime information for different sessions. For example, set this element to username if you have a username attribute that is guaranteed to be unique.

<sharing-enabled>

Optional

1

Specifies whether HTTP sessions are shared across multiple Web applications.

Default value is false.


library-ref

The following table describes the elements you can define within a library-ref element.

See Chapter 9, "Creating Shared Java EE Libraries and Optional Packages," for additional information and examples.

Table A-21 library Elements

Element Required? Maximum Number in File Description
<library-name>

Required

1

Specifies the name of the referenced shared Java EE library.

<specification-version>

Optional

1

Specifies the minimum specification-version required.

<implementation-version>

Optional

1

Specifies the minimum implementation-version required.

<exact-match>

Optional

1

Specifies whether there must be an exact match between the specification and implementation version that is specified and that of the referenced library.

Default value is false.

<context-root>

Optional

1

Specifies the context-root of the references Web Applications shared Java EE library.


library-context-root-override

The following table describes the elements you can define within a library-context-root-override element to override context-root elements within a referenced EAR library. See library-ref.

See Chapter 9, "Creating Shared Java EE Libraries and Optional Packages," for additional information and examples.

Table A-22 library-context-root-override Elements

Element Required? Maximum Number in File Description
<library-context-root>

Optional

1

Overrides the context-root elements declared in libraries. In the absence of this element, the library's context-root is used.

Only a referencing application (i.e., a user application) can override the context-root elements declared in its libraries.

<override-value>

Optional

1

Specifies the value of the library-context-root-override element when overriding the context-root elements declared in libraries. In the absence of these elements, the library's context-root is used.


fast-swap

The following table describes the elements you can define within a fast-swap element.

For more information about FastSwap Deployment, see "Using FastSwap Deployment to Minimize Redeployment" in Deploying Applications to WebLogic Server.

Table A-23 fast-swap Elements

Element Required? Maximum Number in File Description
<enabled>

Optional

1

Set to true to enable FastSwap deployment in your application.

<refresh-interval>

Optional

1

FastSwap checks for changes in application classes when an incoming HTTP request is received. Subsequent HTTP requests arriving within the refresh-interval seconds will not trigger a check for changes. The first HTTP request arriving after the refresh-interval seconds have passed, will cause FastSwap to perform a class-change check again.

<redefinition-task-limit>

Optional

1

FastSwap class redefinitions are performed asynchronously by redefinition tasks. They can be controlled and inspected using JMX interfaces.

Specifies the number of redefinition tasks that will be retained by the FastSwap system. If the number of tasks exceeds this limit, older tasks are automatically removed.


weblogic-application.xml Schema

See http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd for the XML Schema of the weblogic-application.xml deployment descriptor file.

application.xml Schema

For more information about application.xml deployment descriptor elements, see the JEE 5 schema available at http://java.sun.com/xml/ns/javaee/application_5.xsd.