Skip Headers
Oracle® Coherence User's Guide for Oracle Coherence*Web
Release 3.4.2

Part Number E14408-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

A Coherence*Web Configuration Parameters

Coherence*Web provides a wide variety of configuration options as described in Table A-1. The process for configuring Coherence*Web is slightly different between the WebLogic SPI-based installation case and the generic WebInstaller installation case.

Table A-1 Configuration Parameters for Coherence*Web

Parameter Name Description

coherence-factory-class

The fully-qualified class name of the SessionHelper.Factory to use.

Defaults to com.tangosol.coherence.servlet.apiXX.DefaultFactory where XX is 22, 23, 24, or 25 for Servlet 2.2, 2.3, 2.4, or 2.5 containers respectively.

coherence-sessioncollection-class

The fully-qualified class name of the HttpSessionCollection implementation to use. Possible values include:

A value for this parameter must be specified.

coherence-cluster-owned

If true, Coherence*Web will automatically shut down the Coherence node when the Web application shuts down. You must use the WAR scoped cluster node deployment model in this case. See "WAR-Scoped Cluster Nodes" for more information.

If false, the Web application is responsible for shutting down the Coherence node (see com.tangosol.net.CacheFactory.shutdown()) in accordance to its own considerations. You must carefully consider a cluster node scoping deployment model in this case and the circumstances under which the application shuts down the Coherence node and the side-effects of doing so. See "Cluster Node Isolation" for more information on cluster node scoping.

Note: When using the WebInstaller, a value of true instructs the WebInstaller to place the Coherence library in the WEB-INF/lib directory of each Web application found in your J2EE application.

If unspecified, this parameter defaults to false.

coherence-servletcontext-clustered (See Note 1)

Either true or false to indicate whether the attributes of the ServletContext will be clustered. If true, then all serializable ServletContext attribute values will be shared among all cluster nodes.

If unspecified, defaults to false, primarily because the Servlet specification indicates that the ServletContext attributes are local to a JVM and should not be clustered.

coherence-servletcontext-cachename (See Note 1)

The name of the Coherence cache that will be used to hold the servlet context data if the servlet context is clustered.

If unspecified, defaults to servletcontext-storage. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-eventlisteners (See Note 1)

The comma-delimited list of names of application classes that want to receive events from the Web container. This list comes from the application listeners declared in the listener elements of web.xml.

coherence-enable-sessioncontext (See Note 1)

When set to true, allows the application to iterate sessions from the session context, thus disobeying the deprecation in the servlet specification.

If unspecified, defaults to false.

coherence-contextless-session-retain-millis

The number of milliseconds that a server will hold a lock on a session while accessing that session without the session being implied by the current request context. A session is implied by the current request context if and only if the current thread is processing a Servlet request, and the request is associated with that session. All other access to a session object is "out of context". For example, if a reference to an arbitrary session is obtained from a SessionContext object (if that option is enabled), or if the application has code that holds on to session object references to manage sessions directly. Since session access requires session ownership, "out of context" access to the session object will automatically obtain ownership on behalf of the caller; that ownership will be retained for the number of milliseconds specified by this option so that repeated calls to the session do not individually obtain and release ownership, which is potentially an expensive operation. The legal range is 10 to 10000 (from 1/100th of a second up to 10 seconds).

If unspecified, defaults to 200.

coherence-session-cookies-enabled (See Note 1)

If unspecified, defaults to true to enable session cookies.

coherence-session-cookie-name (See Note 1)

The name of the session cookie.

If unspecified, defaults to JSESSIONID.

coherence-session-cookie-domain (See Note 1)

The domain of the session cookie as defined by RFC 2109. By default, no domain is set explicitly by the session management implementation.

coherence-session-cookie-path (See Note 1)

The path of the session cookie as defined by RFC 2109. By default, no path is set explicitly by the session management implementation.

coherence-session-cookie-max-age (See Note 1)

The maximum age in seconds of the session cookie as defined by RFC 2109. A value of -1 indicates that the cookie will not be persistent on the client; a positive value gives the maximum age that the cookie will be persisted by the client. Zero is not permitted.

If unspecified, defaults to -1.

coherence-session-urlencode-enabled (See Note 1)

When set to true, enables URL encoding of session ids.

If unspecified, defaults to true.

coherence-session-urlencode-name (See Note 1)

The parameter name to encode the session id into the URL with. On some containers, this value cannot be overridden.

If unspecified, defaults to jsessionid.

coherence-session-urldecode-bycontainer (See Note 1)

When set to true, uses the container's decoding of the URL session ID. If coherence-session-urlencode-name has been overridden, this must be set to false. Setting this to false will not work in some containers.

If unspecified, defaults to true.

coherence-session-urlencode-bycontainer (See Note 1)

When set to true to use the container's encoding of the URL session ID. Setting this to true may conflict with the setting for coherence-session-urlencode-name if it has been specified.

If unspecified, defaults to false.

coherence-reaperdaemon-cluster-coordinated

When set to true, coordinates reaping in the cluster such that only one server will perform reaping within a given reaping cycle, and it will be responsible for checking all of the sessions that are being managed in the cluster.

If unspecified, defaults to false.

coherence-reaperdaemon-sweep-modulo

The number of times that the reaper reaps the sessions that are being used locally before it will check sessions that may be orphaned or expired elsewhere in the cluster. This setting is only used when coordinate reaping is disabled. Setting it to 1, for example, will cause the daemon to check this server's fair share of the session ids in the cluster every time that it wakes up to check for expired sessions (for example every 60 seconds). Setting it to 10 will cause those sessions to be checked every 600 seconds instead, but the sessions that are being used on this server will still be checked every 60 seconds.

If unspecified, defaults to 4.

coherence-reaperdaemon-assume-locality

This setting allows the reaper to assume that the sessions that are stored on this node (for example, by a distributed cache service) are the only sessions that this node must check for expiry. This value must be set to false if the session storage cache is being managed by nodes that are not running a reaper, for example if cache servers are being used to manage the session storage cache. (It is suggested that if cache servers are being used, that the "split" model be selected, and that the session overflow storage be run in a separate distributed cache service that is managed entirely by the cache servers, while the session storage cache itself remain in a distributed cache service that is managed entirely by the application server JVMs to be able to take advantage of this "assume locality" feature.)

If unspecified, defaults to true.

coherence-reaperdaemon-cycle-seconds

The number of seconds that the daemon rests between reaping. For production clusters with long session timeouts, this can safely be set higher. For testing, particularly with short session timeouts, it can be set much lower. Setting it too low can cause more network traffic and use more processing cycles, and only has benefit if the application requires the sessions to be invalidated quickly when they have expired.

If unspecified, defaults to 300.

coherence-reaperdaemon-priority

The priority for the session reaper daemon. For more information, see the source for the java.lang.Thread class.

If unspecified, defaults to 5.

coherence-session-cachename

This name overrides the name of the clustered cache that stores the sessions.

If unspecified, defaults to session-storage. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-session-deathcert-cachename

This name overrides the name of the clustered cache that stores the IDs of "recently departed" sessions.

If unspecified, defaults to session-death-certificates. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-session-management-cachename

This name overrides the name of the clustered cache that stores the management and configuration information for the session management implementation. Generally, it should be configured as a replicated cache.

If unspecified, defaults to session-management. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-session-expire-seconds

This value overrides the session expiry time, and is expressed in seconds. Setting it to -1 will cause sessions to never expire.

If unspecified, defaults to 1800.

coherence-session-id-length (See Note 1)

This is the length, in characters, of generated session IDs. The suggested absolute minimum length is 8.

If unspecified, defaults to 12.

coherence-shutdown-delay-seconds

This value determines how long the session management implementation waits before shutting down after receiving the last indication that the application has been stopped, either from ServletContextListener events (Servlet 2.3 or later) or by the destruction of Servlet and Filter objects. This value is expressed in seconds. A value of zero indicates synchronous shut-down; any positive value indicates asynchronous shut-down.

If unspecified, defaults to 0, because some servers are not capable of asynchronous shut-down.

coherence-session-member-locking

This value, if set to true, will prevent two threads in different JVMs from processing a request for the same session at the same time. A value of false is incompatible with sticky session optimizations and thread locking (that is, both coherence-session-thread-locking and coherence-sticky-sessions should be set to false if this value is set to false).

If unspecified, defaults to false.

coherence-session-thread-locking

This value, if set to true, will prevent two threads in the same JVM from processing a request for the same session at the same time. If set to true the value of the coherence-session-member-locking parameter will be ignored, as thread locking implies member locking.

If unspecified, defaults to true.

coherence-session-strict-spec

This value, if set to true, will indicate that the implementation will strictly adhere to the Servlet specification; setting it to false will allow the implementation to ignore certain types of exceptions, instead of shutting down the application.

If unspecified, defaults to true.

coherence-sticky-sessions

This value, if set to true, specifies whether sticky sessions optimizations will be used. This should only be enabled if a sticky load balancer is being used.

If unspecified, defaults to false.

coherence-distributioncontroller-class

This value specifies a class name of the com.tangosol.coherence.servlet.HttpSessionCollection.SessionDistributionController interface implementation to use. This feature requires coherence-sticky-sessions optimization to be enabled.

Legal values include:

coherence-scopecontroller-class

This value specifies a class name of the optional com.tangosol.coherence.servlet.HttpSessionCollection.AttributeScopeController interface implementation to use.

See "Session Attribute Scoping" for more information.

Legal values include:

coherence-preserve-attributes

This value, if set to true, specifies whether non-serializable attributes should be preserved as local ones. This feature requires coherence-sticky-sessions optimization to be enabled.

If unspecified, defaults to false.

coherence-local-session-cachename

This name overrides the name of the local cache that stores non-distributed sessions when coherence-distributioncontroller-class parameter is specified.

If unspecified, defaults to local-session-storage. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-local-attribute-cachename

This name overrides the name of the local cache that stores non-distributed sessions when either coherence-sessiondistributioncontroller-class parameter is specified or coherence-preserve-attributes parameter is true.

If unspecified, defaults to local-attribute-storage. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-session-overflow-cachename

For the split model, this value overrides the name of the clustered cache that stores the "large attributes" that exceed a certain size and thus are determined to be more efficiently managed as separate cache entries and not as part of the serialized session object itself.

If unspecified, defaults to session-overflow. This parameter is described in Appendix B, "Session Cache Configuration File."

coherence-attribute-overflow-threshold

For the split model, this value specifies the minimum length (in bytes) that the serialized form of an attribute value must be for that attribute value to be stored in the separate "overflow" cache that is reserved for large attributes.

If unspecified, defaults to 1024.


Notes:

  1. This parameter does not control Coherence Web behavior when used with the WebLogic SPI implementation. If you are configuring Coherence Web using the WebLogic SPI implementation, see "Configuring Web Applications for Coherence*Web" for more details on how to configure this attribute.