Connection cache properties

Description

Connection cache property names begin with com.sybase.jaguar.conncache. In EAServer Manager, configure connection cache properties in the Connection Cache Properties dialog box.

In addition to the properties described here, you can configure additional properties for JDBC and Client-Library caches. See “Advanced tab” for more information.

See also

Chapter 4, “Database Access”




com.sybase.jaguar.conncache.cachebyname

Description

Specifies whether components can use this cache by specifying the cache name alone.

Syntax

true or false. The default is false.

Usage

To access a cache from an aliased JNDI reference, this property must be true.

In EAServer Manager, set this property using the Allow By-Name Access check box on the Caching tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.component.resource-ref, com.sybase.jaguar.webapplication.resource-ref




com.sybase.jaguar.conncache.cachesize

Description

This property is obsolete and has been replaced by com.sybase.jaguar.conncache.poolsize.max. EAServer automatically converts settings that use the old name to the new name when the server is started.

Syntax

Same as com.sybase.jaguar.conncache.poolsize.max.




com.sybase.jaguar.conncache.check

Description

Specifies the query to use when testing whether a connection is still usable.

Syntax

The SQL query text. The default is:

select 1

The default does not work on all databases. For example, for an Oracle database, you must set this property to:

select 1 from dual

Usage

To set this property in EAServer Manager, use the Advanced tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.checkallowed




com.sybase.jaguar.conncache.checkallowed

Description

Specifies whether the cache manager should test connections before returning them to the cache.

Syntax

true or false. The default is true.

Usage

The query used to test the cache is specified by the com.sybase.jaguar.conncache.check property.

To set this property in EAServer Manager, use the Enable connection sanity check option on the Caching tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.check




com.sybase.jaguar.conncache.cmp_stats

Description

Enables statistics output for EJB CMP entity beans that use the cache.

Syntax

Integer values. The default of 0 disables statistics output. A positive integer specifies how often, in seconds, the persistence engine logs statistics entries. Statistics output includes table statistics, cache usage statistics, and query statistics. This data can be useful for tuning other connection cache and component properties for best performance.




com.sybase.jaguar.conncache.config-property

Description

Specifies additional driver-specific connection properties.

Syntax

A comma-separated list of parenthesized quadruplets, each of which sets a driver property:

(description=desc, env-entry-value=value, env-entry-type=type, 
env-entry-name=name)

Where:

Variable

Specifies

desc

An optional description.

value

The property value.

type

The Java datatype of the property value.

name

The property name.

Examples

Example 1

This example sets a string property named “DYNAMIC_PREPARE” to a value of “true”:

(description=some description, env-entry-value=true, env-entry-type=java.lang.String, env-entry-name=DYNAMIC_PREPARE)

Example 2

This example configures two properties named “prop1” and “prop2,” of type Integer, to values of 1 and 2, respectively. The description of the second property has been omitted:

(description="Set prop1", env-entry-value=1, env-entry-type=java.lang.Integer, env-entry-name=prop1), (description=, env-entry-value=2, env-entry-type=java.lang.Integer, env-entry-name=prop2) 

Usage

For JDBC 2.0 drivers, the properties are set using reflection, which finds a method that matches the property name and datatype. For example, if you set the property packetSize to a java.lang.Integer value, the cache manager looks for a method named setPacketSize that takes a parameter of this type. For JDBC 1.0 drivers, the properties are set by creating a java.utils.Properties instance that contains the property settings and passing it to the driver.

You can also set properties by adding them to the cache properties directly. Any property whose name does not begin with com.sybase.jaguar is passed to the driver as a String property setting. You cannot set properties of type other than String this way.




com.sybase.jaguar.conncache.conlibdll

Description

Specifies the DLL, shared library, or JDBC driver class name used in the connection.

Syntax

The syntax is the same as the DLL or Class Name field on the Driver tab in the Connection Cache Properties dialog box. See “Driver properties”.




com.sybase.jaguar.conncache.conlibname

Description

Specifies the type of connection cache.

Syntax

Your choices for library type are:

Table B-3: Library type values

Value

To indicate

CTLIB_110

Sybase Open Client Client-Library connections

ODBC

Connections using an open database connectivity driver

JDBC

Connections using Java database connectivity driver

OCI_7

Connection using OCI 7.x

OCI_8

Connections using OCI 8.x

Usage

In EAServer Manager, set this property on the Caching tab in the Connection Cache properties dialog box.




com.sybase.jaguar.conncache.db_type

Description

Specifies the database type.

Syntax

The name of an existing database type entity.

See also

Database type properties




com.sybase.jaguar.conncache.description

Description

Specifies an optional text description of the cache.

Syntax

desc

Where desc is the descriptive text.

Usage

In EAServer Manager, set this property in the Description field on the General tab in the Connection Cache properties dialog box.




com.sybase.jaguar.conncache.highavailability

Description

Specifies whether to use a high availability connection.

Syntax

true or false. The default is false.

Usage

In EAServer Manager, set this property on the Driver tab in the Connection Cache properties dialog box. The property is available only for Client Library 11.0 connections.




com.sybase.jaguar.conncache.idletimeout

Description

Specifies the number of seconds an idle connection remains in the pool before it is dropped.

Syntax

The default is 300 seconds (5 minutes).

Usage

In EAServer Manager, set this property on the Caching tab in the Connection Cache properties dialog box.




com.sybase.jaguar.conncache.name

Description

Specifies the cache name.

Syntax

The cache name as displayed in EAServer Manager.




com.sybase.jaguar.conncache.password.e

Description

Specifies the password for connections in the cache.

Syntax

The password text. Values are encrypted in the repository.

Usage

In EAServer Manager, set this property in the Password field on the General tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.username




com.sybase.jaguar.conncache.poolmanager.maxconnection

Description

Specifies the maximum number of connections that can be allocated before the value of the com.sybase.jaguar.conncache.poolmanager.wait property determines whether to wait for a connection. The number of connections should be greater than or equal to the value of com.sybase.jaguar.conncache.poolsize.max. A value of 0 indicates that new connections should be opened whenever they are required. Excess connections are deallocated and not returned to the cache.

Syntax

The number of connections.

Usage

In EAServer Manager, set this property in the Maximum Connections field on the Caching tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.poolsize.max




com.sybase.jaguar.conncache.poolsize.max

Description

Specifies the number of connections kept open in the cache.

Syntax

A positive integer. If not set, the default is 10.

Usage

The cache size specifies the number of connections kept open in the cache. At times, more connections may be open than the size allows if additional connections are required. However, excess connections are deallocated and not returned to the cache.

In EAServer Manager, set this property in the Maximum Connection Cache Pool Size field on the Caching tab in the Connection Properties dialog box.

See also

com.sybase.jaguar.conncache.poolsize.min




com.sybase.jaguar.conncache.poolsize.min

Description

Specifies the minimum number of connections kept open in the cache.

Syntax

A positive integer. If not set, the default is 0.

Usage

When the server starts, it preallocates and opens the specified number of connections.

In EAServer Manager, set this property in the Minimum Connection Cache Pool Size field on the Caching tab in the Connection Properties dialog box.

See also

com.sybase.jaguar.conncache.poolsize.max




com.sybase.jaguar.conncache.refreshrate

Description

The refresh rate for the connection cache.

Syntax

The default is 600 seconds (10 minutes).

Usage

In EAServer Manager, set this property on the Caching tab in the Connection Cache properties dialog box.




com.sybase.jaguar.conncache.remotesvrname

Description

The “server name” to connect to, which may be a URL for JDBC connection caches.

Syntax

See “General properties”. The syntax is the same as for the Server Name field in the EAServer Manager Connection Cache Properties dialog box.




com.sybase.jaguar.conncache.replaceorwithcolon

Description

If this property is set to true, pipe characters, ‘|’, in the server URL for JDBC connection caches are replaced with ‘:’ before calling the JDBC driver’s setServerName() method.

Syntax

true or false. The default is false.




com.sybase.jaguar.conncache.ssa

Description

Enables set-proxy support for connections to databases that support this feature.

Syntax

true or false. The default is false, which disables set-proxy support.

Usage

Current versions of Adaptive Server Enterprise and Adaptive Server Anywhere allow a user to assume the identity and privileges of another user. You can use this feature with any database that recognizes this command:

set session authorization “login-name

When proxy support is enabled, connections retrieved from the cache are set to act as a proxy for the user name associated with the EAServer client. To set proxy to another user name, use the Java JCMCache.getProxyConnection() method or the C JagCmGetProxyConnection() routine in your component.

The user name specified in the cache properties (com.sybase.jaguar.conncache.username) must have set-proxy privileges in the database and/or server used by the cache.

In EAServer Manager, set this property using the Advanced tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.username, com.sybase.jaguar.conncache.ssa.systemid




com.sybase.jaguar.conncache.ssa.systemid

Description

Specifies an alternate user name to set proxy to if the cache is used by an EJB CMP entity bean and the cache has set-proxy support enabled.

Syntax

The user name. If not set, the default is the value of com.sybase.jaguar.conncache.username.

Usage

In an EJB CMP entity bean, the client user name is not available to set proxy to since the persistence engine runs as the system user. In this case, if a user name is specified with this property, the cache manager sets proxy to the specified user. Otherwise, it sets proxy to the cache’s User Name.

See also

com.sybase.jaguar.conncache.ssa, com.sybase.jaguar.conncache.username




com.sybase.jaguar.conncache.username

Description

Specifies the user name for connections in the cache.

Syntax

The user name.

Usage

In EAServer Manager, set this property using the User name field on the General tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.password.e




com.sybase.jaguar.conncache.wait

Description

Specifies whether to wait for a connection, when the number of connections that have been allocated is equal to the value of com.sybase.jaguar.conncache.poolmanager.maxconnection.

Syntax

true or false. The default is true.

Usage

In EAServer Manager, set this property in the Wait for Connection field on the Caching tab in the Connection Cache Properties dialog box.

See also

com.sybase.jaguar.conncache.poolsize.max com.sybase.jaguar.conncache.poolsize.min com.sybase.jaguar.conncache.poolmanager.maxconnection