BEA WebLogic Server Tuning Guide
8
When XADataSources are used, WebLogic Server gets the XAConnection objects from the JDBC driver and
acquires the associated logical Connection object from the XAConnection and caches them both. The WebLogic
Server needs the XAConnection object to perform transactional work using the XA facilities and it uses the logical
Connection object to wrap and pass onto the application on demand.
The following diagram outlines the WebLogic Server Connection pooling Model. The same model is used for
XAConnections—WebLogic Server obtains the logical Connection from the JDBC driver once and uses it until it
closes the XAConnection object.
WebLogic Server connection pooling complements the JDBC driver connection pooling. When the JDBC driver
provides Connection pooling for its connections, the JDBC driver pooling mechanism is used only when the
WebLogic Server Connection pooling implementation closes a connection. When the WebLogic Server connection
pooling infrastructure closes the Connection object, it removes it from its Cache. At that point, if the JDBC driver has
connection pooling enabled, the JDBC driver, instead of physically closing the connection, keeps the connection
available for potential later requests from WebLogic Server.
JDBC Driver
WebLogic Server
JDBC
Application
getConnection
1
Connection
Object Cache
Choose a free C
onnection
object or create one (if
necessary)
2
Wrap the object within the
WebLogic Server Connection
object
3
4
Return the WebLogic
Server wrapper object
to the caller
5
Application uses the
connection for database work
delegated to the JDBC driver
by the wrapper
6
Wrapper delegates
database work to the real
DB connection
7
Application closes
the connection
Wrapper, using JDBC APIs,
cleans up the Connection
object and marks it for reuse
8










