WebLogic JDBC

For Online Oracle Weblogic Admin Training, please contact through http://www.appsdbatraining.com

WebLogic JDBC

• Connection pool:
Connection pool is a named group of identical JDBC connections to a database that are created when the connection pool is deployed.Connection pooling is for efficiency purposes to reduce the overhead of creating connection objects at run-time.

JDBC Flow logic:
When server startup, depending on the initial JDBC pool capacity, connections are created.Connections are created based on the information provided in pool attributes.At runtime, Client asks for a connection, weblogic would take an existing connection from pool and do a ping (query is user defined).
If ping is successful, weblogic would give connection to client, else it will recreate and give the connection.


JDBC configuration
1) Create a connection Pool from Admin console.
Provide all the JDBC driver attributes like Driver class, Driver URL and test table name.
2) Target the connection pool to the list of servers.
3) Create a Data source and assign it to the pool created.
4) Target the Data source to the servers where connection pool is targeted.

• WebLogic has integrated JDBC drivers.
All the drivers that Weblogic ship are JDBC type 4 thin drivers.
(All the Weblogic JDBC drivers are from Data Direct technologies)

WebLogic would also include some of the frequently used drivers. These drivers come with installation. These drivers are shipped for convenience purpose and it is advisable to use the latest drivers available from vendors website.

The following are the that drivers come with Weblogic installation: (Apart from Weblogic type 4 integrated drivers)
They are located under /beahome/weblogic81/server/ext/jdbc :

• Oracle 10g,9.2 thin driver
• Sybase Jconnect5.5 , 4.x

Any driver that implements JDBC spec can be used with Weblogic  The driver should be thread safe too. (Suitable for multi-threaded apps)

WebLogic would support type-2 OCI drivers too. However thin driver is recommended because it is 100% java and not prone to jvm crash or native memory leak. In case of Oracle, the performance between thin driver and OCI driver has been pretty much narrowed down with JDK1.4 (As per Oracle)

WebLogic JDBC – Multi-pool

• Multi-pool
This is a pool of connection Pools. The pools can be connected to different DBMS or specific setup like Oracle RAC.
You would need to choose the algorithm based on application requirements (Only one algorithm can be applied)
1)High Availability: All connection requests are served from first pool in the list. *Only* if the pool is not available, (connection fails and cannot be refreshed) the connection is routed to the next pool in the list.


Connection requests to the pool are roundrobined across the list of pools. However if a connection request to a connection poolwas not successful and cannot be recreated (such as when DB is down or pool is suspended) then the request is routed to next connection pool in the list.

Oracle RAC:

The multipool concept can be applied to Oracle RAC where each connection pool is connected to one of the oracle instance and we can choose the algorithm.There are quite a few limitations to multipool when global transactions are involved (XA).


Nagulu Polagani

"We are all apprentices in a craft where no one ever becomes a master."