In this section, we examine how you can use WebLogic’s wrapper drivers to access preconfigured connection pools. Even though a data source is the recommended way for accessing a connection pool, you may need to use wrapper drivers for existing or legacy applications that are based on the JDBC 1.x API. WebLogic supports three kinds of wrapper drivers:
Client-side applications can use the RMI Driver to access server-side connection pools.
Server-side applications can use the Pool Driver to access the connection pools directly.
The JTS Driver is identical to the Pool Driver, except that the database connections also can participate in distributed transactions.
Each driver provides vendor-neutral access to connection pools already configured in WebLogic. The J2EE standard recommends that you use a data source to access the pool.
WebLogic’s RMI Driver is a Type 3 JDBC driver that enables client-side applications to access connection pools configured on WebLogic Server. The RMI Driver returns JDBC connections through the data source configured for the pool. The connection pool is configured as usual using a two-tier JDBC driver. As its name suggests, the RMI Driver provides RMI access to a server-side JDBC pool.
Let’s look at how a client application obtains a JDBC connection from a connection pool:
java.sql.Driver wlDriver = (java.sql.Driver) Class.forName("weblogic.jdbc.rmi.Driver").newInstance( ...