All Examples  This Package

Class examples.jdbc.t3client.connectionpool

java.lang.Object
   |
   +----examples.jdbc.t3client.connectionpool

public class connectionpool
extends Object
This example illustrates the use of a JDBC connection from a connection pool. The example here uses the connection "oraclePool" that is included (commented out) in the weblogic.properties file that is shipped with the distribution.

To set up this example:

  1. Set up your development shell as described in Setting up your environment.

  2. Set up an appropriate connection pool in your weblogic.properties file by uncommenting the lines that refer to the connectionPool.oraclePool. Make sure to uncomment the ACLs for this connection pool as well. If you are not using an Oracle database, adjust the code inside the try block in this example to a test appropriate for your database.

  3. Modify the example so that the correct URL for your WebLogic Server is specified.

  4. Compile the example by executing the following command in your development shell:

    $ javac -d %CLIENT_CLASSES% connectionpool.java

  5. Start WebLogic Server in a separate shell.

  6. Run this example by executing the following command in your development shell:

    $ java examples.jdbc.t3client.connectionpool

Author:
Copyright (c) 1996 by BEA WebXpress, Inc. All Rights Reserved.

Constructor Index

 o connectionpool()

Method Index

 o main(String[])
In this main, the T3Client is created and connected.

Constructors

 o connectionpool
 public connectionpool()

Methods

 o main
 public static void main(String[] argv) throws Exception
In this main, the T3Client is created and connected. The code then illustrates the use of the connection pool "oraclePool" (commented out in the weblogic.properties file) that is shipped with the distribution. This example also illustrates the use of the refresh() method for a connection from the pool.


All Examples  This Package