Object factory for JDBC 2.0 standard extension XAConnections. You pool the
XAConnections instead of the java.sql.Connections since with vendor
conformant drivers, you don't have direct access to the java.sql.Connection,
and any work done isn't associated with the java.sql.Connection anyway.
Note: This implementation requires that the TransactionManager
be bound to a JNDI name.
Note: This implementation has special handling for Minerva JDBC
1/2 XA Wrappers. Namely, when a request comes in, if it is for a wrapper
connection and it has the same current transaction as a previous active
connection, the same previous connection will be returned. Otherwise,
you won't be able to share changes across connections like you can with
the native JDBC 2 Standard Extension implementations.
author: Aaron Mulder (ammulder@alumni.princeton.edu) author: Bill Burke author: REVISIONS: author: 20010703 bill added code for transaction isolation version: $Revision: 1.2 $
checkValidObject(Object source, Object parameters) For XAConnectionImpl check that parameters = String[2]{username, password}
and that these match the the source connection user and password.
isUniqueRequest() If a new object is requested and it is a JDBC 1/2 wrapper connection
in the same Transaction as an existing connection, return that same
connection.
public void
poolStarted(ObjectPool pool) Verifies that the data source and transaction manager are accessible.
For XAConnectionImpl check that parameters = String[2]{username, password}
and that these match the the source connection user and password. Return
true for non-XAConnectionImpl sources
Have XAClientConnections save a stack trace on creation
This is useful for debugging non-closed connections.
It must be used with ReleaseOnCommit option
Registers the XAConnection's XAResource with the current transaction (if
there is one). Sets listeners that will handle deregistering and
returning the XAConnection to the pool via callbacks.
Sets the XADataSource used to generate XAConnections. This may be
supplied by the vendor, or it may use the wrappers for non-compliant
drivers (see XADataSourceImpl).
See Also:org.ofbiz.minerva.pool.jdbc.xa.wrapper.XADataSourceImpl
Sets the number of PreparedStatements to be cached for each
Connection. Your DB product may impose a limit on the number
of open PreparedStatements. The default value is 10.