Interface JdbcConnectionPool
- All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy,jakarta.validation.Payload,org.jvnet.hk2.config.types.PropertyBag,com.sun.enterprise.config.serverbeans.Resource,com.sun.enterprise.config.serverbeans.ResourcePool
jdbc-resource elements (See <jdbc-resource>).
Each named pool definition results in a pool instantiated at server start-up.
Pool is populated when accessed for the first time. If two or more
jdbc-resource elements point to the same jdbc-connection-pool element,
they are using the same pool of connections, at run time.
-
Field Summary
FieldsFields inherited from interface com.sun.enterprise.config.serverbeans.Resource
OBJECT_TYPES -
Method Summary
Modifier and TypeMethodDescriptionGets the value of theallowNonComponentCallersproperty.Gets the value of theassociateWithThreadproperty.@Min(0L) @Max(2147483647L) StringGets the value of theconnectionCreationRetryAttemptsproperty.@Min(0L) @Max(2147483647L) StringGets the value of theconnectionCreationRetryIntervalInSecondsproperty.Gets the value of theconnectionLeakReclaimproperty.@Min(0L) @Max(2147483647L) StringGets the value of theconnectionLeakTimeoutInSecondsproperty.@Pattern(regexp="(auto-commit|meta-data|custom-validation|table)",message="Valid values: (auto-commit|meta-data|custom-validation|table)") StringGets the value of theconnectionValidationMethodproperty.Gets the value of thedatasourceClassnameproperty.Gets the value of thedescriptionproperty.Gets the value of thedriverClassnameproperty.Gets the value of thefailAllConnectionsproperty.default String@Min(0L) @Max(2147483647L) StringGets the value of theidleTimeoutInSecondsproperty.Gets the value of theinitSqlproperty.Gets the value of theisConnectionValidationRequiredproperty.Gets the value of theisIsolationLevelGuaranteedproperty.Gets the value of thelazyConnectionAssociationproperty.Gets the value of thelazyConnectionEnlistmentproperty.Gets the value of thematchConnectionsproperty.@Min(0L) @Max(2147483647L) StringGets the value of themaxConnectionUsageCountproperty.@Min(1L) @Max(2147483647L) StringGets the value of themaxPoolSizeproperty.@Min(0L) @Max(2147483647L) StringGets the value of themaxWaitTimeInMillisproperty.Gets the value of thenonTransactionalConnectionsproperty.Gets the value of thepoolingproperty.@Min(1L) @Max(2147483647L) StringGets the value of thepoolResizeQuantityproperty.List<org.jvnet.hk2.config.types.Property> Properties.@Pattern(regexp="(java.sql.Driver|javax.sql.DataSource|javax.sql.XADataSource|javax.sql.ConnectionPoolDataSource)",message="Valid values: (java.sql.Driver|javax.sql.DataSource|javax.sql.XADataSource|javax.sql.ConnectionPoolDataSource)") StringGets the value of theresTypeproperty.Gets the value of thesqlTraceListenersproperty.@Min(0L) @Max(2147483647L) StringGets the value of thestatementCacheSizeproperty.Gets the value of thestatementCacheTypeproperty.@Min(0L) @Max(2147483647L) String@Min(-1L) StringGets the value of thestatementTimeoutInSecondsproperty.@Min(0L) @Max(2147483647L) StringGets the value of thesteadyPoolSizeproperty.@Pattern(regexp="(read-uncommitted|read-committed|repeatable-read|serializable)",message="Valid values: (read-uncommitted|read-committed|repeatable-read|serializable)") StringGets the value of thetransactionIsolationLevelproperty.@Min(0L) @Max(2147483647L) StringGets the value of thevalidateAtmostOncePeriodInSecondsproperty.Gets the value of thevalidationClassNameproperty.Gets the value of thevalidationTableNameproperty.Gets the value of thewrapJdbcObjectsproperty.voidsetAllowNonComponentCallers(String allowNonComponentCallers) Sets the value of theallowNonComponentCallersproperty.voidsetAssociateWithThread(String associateWithThread) Sets the value of theassociateWithThreadproperty.voidsetConnectionCreationRetryAttempts(String creationAttempts) Sets the value of theconnectionCreationRetryAttemptsproperty.voidsetConnectionCreationRetryIntervalInSeconds(String retryInterval) Sets the value of theconnectionCreationRetryIntervalInSecondsproperty.voidsetConnectionLeakReclaim(String leakReclaim) Sets the value of theconnectionLeakReclaimproperty.voidsetConnectionLeakTimeoutInSeconds(String leakTimeout) Sets the value of theconnectionLeakTimeoutInSecondsproperty.voidsetConnectionValidationMethod(String validationMethod) Sets the value of theconnectionValidationMethodproperty.voidsetDatasourceClassname(String datasourceClassname) Sets the value of thedatasourceClassnameproperty.voidsetDescription(String description) Sets the value of thedescriptionproperty.voidsetDriverClassname(String driverClassname) Sets the value of thedriverClassnameproperty.voidsetFailAllConnections(String failAllConnections) Sets the value of thefailAllConnectionsproperty.voidsetIdleTimeoutInSeconds(String idleTimeout) Sets the value of theidleTimeoutInSecondsproperty.voidsetInitSql(String initSql) Sets the value of theinitSqlproperty.voidsetIsConnectionValidationRequired(String isValidationRequired) Sets the value of theisConnectionValidationRequiredproperty.voidsetIsIsolationLevelGuaranteed(String isGuaranteed) Sets the value of theisIsolationLevelGuaranteedproperty.voidsetLazyConnectionAssociation(String lazyAssociation) Sets the value of thelazyConnectionAssociationproperty.voidsetLazyConnectionEnlistment(String lazyEnlistment) Sets the value of thelazyConnectionEnlistmentproperty.voidsetMatchConnections(String matchConnections) Sets the value of thematchConnectionsproperty.voidsetMaxConnectionUsageCount(String maxUsageCount) Sets the value of themaxConnectionUsageCountproperty.voidsetMaxPoolSize(String maxPoolSize) Sets the value of themaxPoolSizeproperty.voidsetMaxWaitTimeInMillis(String maxWaitTime) Sets the value of themaxWaitTimeInMillisproperty.voidsetNonTransactionalConnections(String nonTransactional) Sets the value of thenonTransactionalConnectionsproperty.voidsetPooling(String pooling) Sets the value of thepoolingproperty.voidsetPoolResizeQuantity(String resizeQuantity) Sets the value of thepoolResizeQuantityproperty.voidsetResType(String resType) Sets the value of theresTypeproperty.voidsetSqlTraceListeners(String traceListeners) Sets the value of thesqlTraceListenersproperty.voidsetStatementCacheSize(String cacheSize) Sets the value of thestatementCacheSizeproperty.voidsetStatementCacheType(String cacheType) Sets the value of thestatementCacheTypeproperty.voidsetStatementLeakReclaim(String leakReclaim) Sets the value of thestatementLeakReclaimproperty.voidsetStatementLeakTimeoutInSeconds(String leakTimeout) Sets the value of thestatementLeakTimeoutInSecondsproperty.voidsetStatementTimeoutInSeconds(String statementTimeout) Sets the value of thestatementTimeoutInSecondsproperty.voidsetSteadyPoolSize(String poolSize) Sets the value of thesteadyPoolSizeproperty.voidsetTransactionIsolationLevel(String isolationLevel) Sets the value of thetransactionIsolationLevelproperty.voidsetValidateAtmostOncePeriodInSeconds(String validatePeriod) Sets the value of thevalidateAtmostOncePeriodInSecondsproperty.voidsetValidationClassname(String classname) Sets the value of thevalidationClassNameproperty.voidsetValidationTableName(String tableName) Sets the value of thevalidationTableNameproperty.voidsetWrapJdbcObjects(String wrapJdbcObjects) Sets the value of thewrapJdbcObjectsproperty.Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParentMethods inherited from interface org.jvnet.hk2.config.types.PropertyBag
addProperty, getProperty, getPropertyValue, getPropertyValue, lookupProperty, removeProperty, removePropertyMethods inherited from interface com.sun.enterprise.config.serverbeans.Resource
getDeploymentOrder, getObjectType, setDeploymentOrder, setObjectTypeMethods inherited from interface com.sun.enterprise.config.serverbeans.ResourcePool
getName, getPing, setName, setPing
-
Field Details
-
CONNECTION_VALIDATION_METHODS
- See Also:
-
ISOLATION_LEVELS
- See Also:
-
RESOURCE_TYPES
- See Also:
-
-
Method Details
-
getDatasourceClassname
String getDatasourceClassname()Gets the value of thedatasourceClassnameproperty.Name of the vendor supplied JDBC datasource resource manager.
An XA or global transactions capable datasource class will implement
XADataSourceinterface. Non XA or Local transactions only datasources will implementDataSourceinterface.- Returns:
- possible object is
String
-
setDatasourceClassname
Sets the value of thedatasourceClassnameproperty.- Parameters:
datasourceClassname- allowed object isString- Throws:
PropertyVetoException
-
getDriverClassname
String getDriverClassname()Gets the value of thedriverClassnameproperty.Name of the vendor supplied JDBC driver resource manager.
Get classnames that implement
Driver.- Returns:
- possible object is
String
-
setDriverClassname
Sets the value of thedriverClassnameproperty.- Parameters:
driverClassname- allowed object isString- Throws:
PropertyVetoException
-
getResType
@Pattern(regexp="(java.sql.Driver|javax.sql.DataSource|javax.sql.XADataSource|javax.sql.ConnectionPoolDataSource)", message="Valid values: (java.sql.Driver|javax.sql.DataSource|javax.sql.XADataSource|javax.sql.ConnectionPoolDataSource)") @Pattern(regexp="(java.sql.Driver|javax.sql.DataSource|javax.sql.XADataSource|javax.sql.ConnectionPoolDataSource)",message="Valid values: (java.sql.Driver|javax.sql.DataSource|javax.sql.XADataSource|javax.sql.ConnectionPoolDataSource)") String getResType()Gets the value of theresTypeproperty.DataSource implementation class could implement one of
DataSource,XADataSourceorConnectionPoolDataSourceinterfaces.This optional attribute must be specified to disambiguate when a Datasource class implements two or more of these interfaces. An error is produced when this attribute has a legal value and the indicated interface is not implemented by the datasource class.
This attribute has no default value.
- Returns:
- possible object is
String
-
setResType
Sets the value of theresTypeproperty.- Parameters:
resType- allowed object isString- Throws:
PropertyVetoException
-
getSteadyPoolSize
Gets the value of thesteadyPoolSizeproperty.Minimum and initial number of connections maintained in the pool.
- Returns:
- possible object is
String
-
setSteadyPoolSize
Sets the value of thesteadyPoolSizeproperty.- Parameters:
poolSize- allowed object isString- Throws:
PropertyVetoException
-
getMaxPoolSize
Gets the value of themaxPoolSizeproperty.Maximum number of connections that can be created.
- Returns:
- possible object is
String
-
setMaxPoolSize
Sets the value of themaxPoolSizeproperty.- Parameters:
maxPoolSize- allowed object isString- Throws:
PropertyVetoException
-
getMaxWaitTimeInMillis
Gets the value of themaxWaitTimeInMillisproperty.Amount of time the caller will wait before getting a connection timeout.
Default is
60sec. A value of0will force caller to wait indefinitely.- Returns:
- possible object is
String
-
setMaxWaitTimeInMillis
Sets the value of themaxWaitTimeInMillisproperty.- Parameters:
maxWaitTime- allowed object isString- Throws:
PropertyVetoException
-
getPoolResizeQuantity
Gets the value of thepoolResizeQuantityproperty.Number of connections to be removed when
idle-timeout-in-secondstimer expires. Connections that have idled for longer than the timeout are candidates for removal. When the pool size reachessteady-pool-size, the connection removal stops.- Returns:
- possible object is
String
-
setPoolResizeQuantity
Sets the value of thepoolResizeQuantityproperty.- Parameters:
resizeQuantity- allowed object isString- Throws:
PropertyVetoException
-
getIdleTimeoutInSeconds
Gets the value of theidleTimeoutInSecondsproperty.Maximum time in seconds, that a connection can remain idle in the pool. After this time, the pool implementation can close this connection. Note that this does not control connection timeouts enforced at the database server side. Administrators are advised to keep this timeout shorter than the database server side timeout (if such timeouts are configured on the specific vendor's database), to prevent accumulation of unusable connection in Application Server.
- Returns:
- possible object is
String
-
setIdleTimeoutInSeconds
Sets the value of theidleTimeoutInSecondsproperty.- Parameters:
idleTimeout- allowed object isString- Throws:
PropertyVetoException
-
getTransactionIsolationLevel
@Pattern(regexp="(read-uncommitted|read-committed|repeatable-read|serializable)", message="Valid values: (read-uncommitted|read-committed|repeatable-read|serializable)") @Pattern(regexp="(read-uncommitted|read-committed|repeatable-read|serializable)",message="Valid values: (read-uncommitted|read-committed|repeatable-read|serializable)") String getTransactionIsolationLevel()Gets the value of thetransactionIsolationLevelproperty.Specifies the Transaction Isolation Level on pooled database connections.
Optional.
Has no default. If left unspecified the pool operates with default isolation level provided by the JDBC Driver. A desired isolation level can be set using one of the standard transaction isolation levels, which see.
Applications that change the Isolation level on a pooled connection programmatically, risk polluting the pool and this could lead to program errors.
- Returns:
- possible object is
String - See Also:
-
setTransactionIsolationLevel
Sets the value of thetransactionIsolationLevelproperty.- Parameters:
isolationLevel- allowed object isString- Throws:
PropertyVetoException
-
getIsIsolationLevelGuaranteed
String getIsIsolationLevelGuaranteed()Gets the value of theisIsolationLevelGuaranteedproperty.Applicable only when a particular isolation level is specified for
transaction-isolation-level.The default value is
true. This assures that every time a connection is obtained from the pool, it is guaranteed to have the isolation set to the desired value.This could have some performance impact on some JDBC drivers. Can be set to
falseby that administrator when they are certain that the application does not change the isolation level before returning the connection.- Returns:
- possible object is
String
-
setIsIsolationLevelGuaranteed
Sets the value of theisIsolationLevelGuaranteedproperty.- Parameters:
isGuaranteed- allowed object isString- Throws:
PropertyVetoException
-
getIsConnectionValidationRequired
String getIsConnectionValidationRequired()Gets the value of theisConnectionValidationRequiredproperty.If
true, connections are validated (checked to find out if they are usable) before giving out to the application.The default is
false.- Returns:
- possible object is
String
-
setIsConnectionValidationRequired
Sets the value of theisConnectionValidationRequiredproperty.- Parameters:
isValidationRequired- allowed object isString- Throws:
PropertyVetoException
-
getConnectionValidationMethod
@Pattern(regexp="(auto-commit|meta-data|custom-validation|table)", message="Valid values: (auto-commit|meta-data|custom-validation|table)") @Pattern(regexp="(auto-commit|meta-data|custom-validation|table)",message="Valid values: (auto-commit|meta-data|custom-validation|table)") String getConnectionValidationMethod()Gets the value of theconnectionValidationMethodproperty.Specifies the type of validation to be performed when
is-connection-validation-requiredistrue. The following types of validation are supported:auto-commitusing connection.autoCommit()meta-datausing connection.getMetaData()tableperforming a query on a user specified table(see validation-table-name)
- Returns:
- possible object is
String
-
setConnectionValidationMethod
Sets the value of theconnectionValidationMethodproperty.- Parameters:
validationMethod- allowed object isString- Throws:
PropertyVetoException
-
getValidationTableName
String getValidationTableName()Gets the value of thevalidationTableNameproperty.Specifies the table name to be used to perform a query to validate a connection.
This parameter is mandatory, if
connection-validation-typeis set totable.Verification by accessing a user specified table may become necessary for connection validation, particularly if database driver caches calls to
setAutoCommit()andgetMetaData().- Returns:
- possible object is
String
-
setValidationTableName
Sets the value of thevalidationTableNameproperty.- Parameters:
tableName- allowed object isString- Throws:
PropertyVetoException
-
getValidationClassname
String getValidationClassname()Gets the value of thevalidationClassNameproperty.Specifies the custom validation class name to be used to perform connection validation.
This parameter is mandatory, if
connection-validation-typeis set tocustom-validation.- Returns:
- possible object is
String
-
setValidationClassname
Sets the value of thevalidationClassNameproperty.- Parameters:
classname- allowed object isString- Throws:
PropertyVetoException
-
getFailAllConnections
String getFailAllConnections()Gets the value of thefailAllConnectionsproperty.Indicates if all connections in the pool must be closed should a single validation check fail.
The default is
false.One attempt will be made to re-establish failed connections.
- Returns:
- possible object is
String
-
setFailAllConnections
Sets the value of thefailAllConnectionsproperty.- Parameters:
failAllConnections- allowed object isString- Throws:
PropertyVetoException
-
getNonTransactionalConnections
String getNonTransactionalConnections()Gets the value of thenonTransactionalConnectionsproperty.A pool with this property set to
truereturns non-transactional connections. This connection does not get automatically enlisted with the transaction manager.- Returns:
- possible object is
String
-
setNonTransactionalConnections
Sets the value of thenonTransactionalConnectionsproperty.- Parameters:
nonTransactional- allowed object isString- Throws:
PropertyVetoException
-
getAllowNonComponentCallers
String getAllowNonComponentCallers()Gets the value of theallowNonComponentCallersproperty.A pool with this property set to
true, can be used by non-J2EE components (i.e components other than EJBs or Servlets). The returned connection is enlisted automatically with the transaction context obtained from the transaction manager. This property is to enable the pool to be used by non-component callers such as ServletFilters, Lifecycle modules, and 3rd party persistence managers. Standard J2EE components can continue to use such pools. Connections obtained by non-component callers are not automatically cleaned at the end of a transaction by the container. They need to be explicitly closed by the caller.- Returns:
- possible object is
String
-
setAllowNonComponentCallers
Sets the value of theallowNonComponentCallersproperty.- Parameters:
allowNonComponentCallers- allowed object isString- Throws:
PropertyVetoException
-
getValidateAtmostOncePeriodInSeconds
Gets the value of thevalidateAtmostOncePeriodInSecondsproperty.Used to set the
time-intervalwithin which a connection is validated atmost once.Default is
0which implies that it is not enabled.TBD: Documentation is to be corrected.
- Returns:
- possible object is
String
-
setValidateAtmostOncePeriodInSeconds
Sets the value of thevalidateAtmostOncePeriodInSecondsproperty.- Parameters:
validatePeriod- allowed object isString- Throws:
PropertyVetoException
-
getConnectionLeakTimeoutInSeconds
Gets the value of theconnectionLeakTimeoutInSecondsproperty.To aid user in detecting potential connection leaks by the application.
When a connection is not returned back to the pool by the application within the specified period, it is assumed to be a potential leak and stack trace of the caller will be logged.
Default is 0, which implies there is no leak detection, by default.
A positive non-zero value turns on leak detection. Note however that, this attribute only detects if there is a connection leak. The connection can be reclaimed only if
connection-leak-reclaimis set to true.- Returns:
- possible object is
String
-
setConnectionLeakTimeoutInSeconds
Sets the value of theconnectionLeakTimeoutInSecondsproperty.- Parameters:
leakTimeout- allowed object isString- Throws:
PropertyVetoException
-
getConnectionLeakReclaim
String getConnectionLeakReclaim()Gets the value of theconnectionLeakReclaimproperty.If enabled, connection will be reusable (put back into pool) after connection-leak-timeout-in-seconds occurs.
Default value is
false.- Returns:
- possible object is
String
-
setConnectionLeakReclaim
Sets the value of theconnectionLeakReclaimproperty.- Parameters:
leakReclaim- allowed object isString- Throws:
PropertyVetoException
-
getConnectionCreationRetryAttempts
Gets the value of theconnectionCreationRetryAttemptsproperty.The number of attempts to create a new connection.
Default is
0, which implies no retries.- Returns:
- possible object is
String
-
setConnectionCreationRetryAttempts
Sets the value of theconnectionCreationRetryAttemptsproperty.- Parameters:
creationAttempts- allowed object isString- Throws:
PropertyVetoException
-
getConnectionCreationRetryIntervalInSeconds
@Min(0L) @Max(2147483647L) @Min(0L) @Max(2147483647L) String getConnectionCreationRetryIntervalInSeconds()Gets the value of theconnectionCreationRetryIntervalInSecondsproperty.The time interval between retries while attempting to create a connection
Default is
10seconds.Effective when
connection-creation-retry-attemptsis greater than0.- Returns:
- possible object is
String
-
setConnectionCreationRetryIntervalInSeconds
Sets the value of theconnectionCreationRetryIntervalInSecondsproperty.- Parameters:
retryInterval- allowed object isString- Throws:
PropertyVetoException
-
getStatementTimeoutInSeconds
Gets the value of thestatementTimeoutInSecondsproperty.Sets the timeout property of a connection to enable termination of abnormally long running queries.
Default value of
-1implies that it is not enabled.- Returns:
- possible object is
String
-
setStatementTimeoutInSeconds
Sets the value of thestatementTimeoutInSecondsproperty.- Parameters:
statementTimeout- allowed object isString- Throws:
PropertyVetoException
-
getLazyConnectionEnlistment
String getLazyConnectionEnlistment()Gets the value of thelazyConnectionEnlistmentproperty.Enlist a resource to the transaction only when it is actually used in a method, which avoids enlistment of connections that are not used in a transaction. This also prevents unnecessary enlistment of connections cached in the calling components.
Default value is
false.- Returns:
- possible object is
String
-
setLazyConnectionEnlistment
Sets the value of thelazyConnectionEnlistmentproperty.- Parameters:
lazyEnlistment- allowed object isString- Throws:
PropertyVetoException
-
getLazyConnectionAssociation
String getLazyConnectionAssociation()Gets the value of thelazyConnectionAssociationproperty.Connections are lazily associated when an operation is performed on them. Also, they are disassociated when the transaction is completed and a component method ends, which helps reuse of the physical connections.
Default value is
false.- Returns:
- possible object is
String
-
setLazyConnectionAssociation
Sets the value of thelazyConnectionAssociationproperty.- Parameters:
lazyAssociation- allowed object isString- Throws:
PropertyVetoException
-
getAssociateWithThread
String getAssociateWithThread()Gets the value of theassociateWithThreadproperty.Associate a connection with the thread such that when the same thread is in need of a connection, it can reuse the connection already associated with that thread, thereby not incurring the overhead of getting a connection from the pool.
Default value is
false.- Returns:
- possible object is
String
-
setAssociateWithThread
Sets the value of theassociateWithThreadproperty.- Parameters:
associateWithThread- allowed object isString- Throws:
PropertyVetoException
-
getPooling
String getPooling()Gets the value of thepoolingproperty.Property to disable pooling for the pool.
- Returns:
- possible object is
String
-
setPooling
Sets the value of thepoolingproperty.- Parameters:
pooling- allowed object isString- Throws:
PropertyVetoException
-
getStatementCacheSize
Gets the value of thestatementCacheSizeproperty.When specified, statement caching is turned on to cache statements, prepared statements, callable statements that are repeatedly executed by applications.
Default value is
0, which implies the feature is not enabled.- Returns:
- possible object is
String
-
setStatementCacheSize
Sets the value of thestatementCacheSizeproperty.- Parameters:
cacheSize- allowed object isString- Throws:
PropertyVetoException
-
getStatementCacheType
String getStatementCacheType()Gets the value of thestatementCacheTypeproperty.When specified, statement caching type is set to cache statements, prepared statements, callable statements that are repeatedly executed by applications.
- Returns:
- possible object is
String
-
setStatementCacheType
Sets the value of thestatementCacheTypeproperty.- Parameters:
cacheType- allowed object isString- Throws:
PropertyVetoException
-
getStatementLeakTimeoutInSeconds
- Returns:
- possible object is
String
-
setStatementLeakTimeoutInSeconds
Sets the value of thestatementLeakTimeoutInSecondsproperty.- Parameters:
leakTimeout- allowed object isString- Throws:
PropertyVetoException
-
getStatementLeakReclaim
String getStatementLeakReclaim() -
setStatementLeakReclaim
Sets the value of thestatementLeakReclaimproperty.- Parameters:
leakReclaim- allowed object isString- Throws:
PropertyVetoException
-
getInitSql
String getInitSql()Gets the value of theinitSqlproperty.Init sql is executed whenever a connection created from the pool.
This is mostly useful when the state of a connection is to be initialized.
- Returns:
- possible object is
String
-
setInitSql
Sets the value of theinitSqlproperty.- Parameters:
initSql- allowed object isString- Throws:
PropertyVetoException
-
getMatchConnections
String getMatchConnections()Gets the value of thematchConnectionsproperty.To switch on/off connection matching for the pool.
It can be set to
falseif the administrator knows that the connections in the pool will always be homogeneous and hence a connection picked from the pool need not be matched by the resource adapter.Default value is
false.- Returns:
- possible object is
String
-
setMatchConnections
Sets the value of thematchConnectionsproperty.- Parameters:
matchConnections- allowed object isString- Throws:
PropertyVetoException
-
getMaxConnectionUsageCount
Gets the value of themaxConnectionUsageCountproperty.When specified, connections will be re-used by the pool for the specified number of times after which it will be closed. This is useful for instance, to avoid statement-leaks.
Default value is
0, which implies the feature is not enabled.- Returns:
- possible object is
String
-
setMaxConnectionUsageCount
Sets the value of themaxConnectionUsageCountproperty.- Parameters:
maxUsageCount- allowed object isString- Throws:
PropertyVetoException
-
getWrapJdbcObjects
String getWrapJdbcObjects()Gets the value of thewrapJdbcObjectsproperty.When set to
true, application will get wrapped jdbc objects forStatement,PreparedStatement,CallableStatement,ResultSet,DatabaseMetaData.Defaults to
false.- Returns:
- possible object is
String
-
setWrapJdbcObjects
Sets the value of thewrapJdbcObjectsproperty.- Parameters:
wrapJdbcObjects- allowed object isString- Throws:
PropertyVetoException
-
getSqlTraceListeners
String getSqlTraceListeners()Gets the value of thesqlTraceListenersproperty.Comma separated list of SQL trace listener implementations to be used to trace the SQL statements executed by the applications.
The default logger used by the system logs the SQL statements based on a set of values stored in
SQLTraceRecordobject.- Returns:
- possible object is
String
-
setSqlTraceListeners
Sets the value of thesqlTraceListenersproperty.- Parameters:
traceListeners- allowed object isString- Throws:
PropertyVetoException
-
getDescription
String getDescription()Gets the value of thedescriptionproperty.- Returns:
- possible object is
String
-
setDescription
Sets the value of thedescriptionproperty.- Parameters:
description- allowed object isString- Throws:
PropertyVetoException
-
getProperty
@PropertyDesc(name="PortNumber",defaultValue="1527",dataType=org.glassfish.config.support.datatypes.Port.class,description="Port on which the database server listens for requests") @PropertyDesc(name="Password",defaultValue="APP",description="Password for connecting to the database") @PropertyDesc(name="User",defaultValue="APP",description="User name for connecting to the database") @PropertyDesc(name="serverName",defaultValue="localhost",description="Database server for this connection pool") @PropertyDesc(name="DatabaseName",defaultValue="sun-appserv-samples",description="Database for this connection pool.") @PropertyDesc(name="connectionAttributes",defaultValue=";create=true",description="connection attributes") List<org.jvnet.hk2.config.types.Property> getProperty()Properties.This list is likely incomplete as of 21 October 2008.
Most JDBC 2.0 drivers permit use of standard property lists, to specify User, Password and other resource configuration. While these are optional properties, according to the specification, several of these properties may be necessary for most databases. See Section 5.3 of JDBC 2.0 Standard Extension API.
The following are the names and corresponding values for these properties:
databaseNamename of the DatabaseserverNamedatabase Server nameportport where a Database server is listening for requestsnetworkProtocolcommunication Protocol useduserdefault name of the database user with which connections will be stablished. Programmatic database authentication or default-resource-principal specified in vendor specific web and ejb deployment descriptors will take precedence, over this default. The details and caveats are described in detail in the Administrator's guidepasswordpassword for default database userroleNamethe initial SQL role namedatasourceNameused to name an underlying XADataSource, or ConnectionPoolDataSource when pooling of connections is donedescriptiontextual Description
When one or more of these properties are specified, they are passed as is using set<Name>(<Value>) methods to the vendors
Datasourceclass (specified indatasource-classname).UserandPasswordproperties are used as default principal, if Container Managed authentication is specified and adefault-resource-principalis not found in application deployment descriptors.- Specified by:
getPropertyin interfaceorg.jvnet.hk2.config.types.PropertyBag
-
getIdentity
- Specified by:
getIdentityin interfacecom.sun.enterprise.config.serverbeans.Resource- Specified by:
getIdentityin interfacecom.sun.enterprise.config.serverbeans.ResourcePool
-