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.
Specifies whether components can use this cache by specifying the cache name alone.
true
or false
.
The default is false
.
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.
com.sybase.jaguar.component.resource-ref, com.sybase.jaguar.webapplication.resource-ref
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.
Same as com.sybase.jaguar.conncache.poolsize.max.
Specifies the query to use when testing whether a connection is still usable.
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
To set this property in EAServer Manager, use the Advanced tab in the Connection Cache Properties dialog box.
com.sybase.jaguar.conncache.checkallowed
Specifies whether the cache manager should test connections before returning them to the cache.
true
or false
.
The default is true
.
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.
com.sybase.jaguar.conncache.check
Enables statistics output for EJB CMP entity beans that use the cache.
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.
Specifies additional driver-specific connection properties.
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. |
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)
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)
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.
Specifies the DLL, shared library, or JDBC driver class name used in the connection.
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”.
Specifies the type of connection cache.
Your choices for library type are:
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 |
In EAServer Manager, set this property on the Caching tab in the Connection Cache properties dialog box.
Specifies the database type.
The name of an existing database type entity.
Specifies an optional text description of the cache.
desc
Where desc is the descriptive text.
In EAServer Manager, set this property in the Description field on the General tab in the Connection Cache properties dialog box.
Specifies whether to use a high availability connection.
true
or false
.
The default is false
.
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.
Specifies the number of seconds an idle connection remains in the pool before it is dropped.
The default is 300 seconds (5 minutes).
In EAServer Manager, set this property on the Caching tab in the Connection Cache properties dialog box.
Specifies the cache name.
The cache name as displayed in EAServer Manager.
Specifies the password for connections in the cache.
The password text. Values are encrypted in the repository.
In EAServer Manager, set this property in the Password field on the General tab in the Connection Cache Properties dialog box.
com.sybase.jaguar.conncache.username
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.
The number of connections.
In EAServer Manager, set this property in the Maximum Connections field on the Caching tab in the Connection Cache Properties dialog box.
com.sybase.jaguar.conncache.poolsize.max
Specifies the number of connections kept open in the cache.
A positive integer. If not set, the default is 10.
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.
com.sybase.jaguar.conncache.poolsize.min
Specifies the minimum number of connections kept open in the cache.
A positive integer. If not set, the default is 0.
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.
com.sybase.jaguar.conncache.poolsize.max
The refresh rate for the connection cache.
The default is 600 seconds (10 minutes).
In EAServer Manager, set this property on the Caching tab in the Connection Cache properties dialog box.
The “server name” to connect to, which may be a URL for JDBC connection caches.
See “General properties”. The syntax is the same as for the Server Name field in the EAServer Manager Connection Cache Properties dialog box.
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.
true
or false
.
The default is false
.
Enables set-proxy support for connections to databases that support this feature.
true
or false
.
The default is false
, which
disables set-proxy support.
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.
com.sybase.jaguar.conncache.username, com.sybase.jaguar.conncache.ssa.systemid
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.
The user name. If not set, the default is the value of com.sybase.jaguar.conncache.username.
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.
com.sybase.jaguar.conncache.ssa, com.sybase.jaguar.conncache.username
Specifies the user name for connections in the cache.
The user name.
In EAServer Manager, set this property using the User name field on the General tab in the Connection Cache Properties dialog box.
com.sybase.jaguar.conncache.password.e
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.
true
or false
.
The default is true
.
In EAServer Manager, set this property in the Wait for Connection field on the Caching tab in the Connection Cache Properties dialog box.
com.sybase.jaguar.conncache.poolsize.max com.sybase.jaguar.conncache.poolsize.min com.sybase.jaguar.conncache.poolmanager.maxconnection
Copyright © 2005. Sybase Inc. All rights reserved. |