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:
- Set up your development shell as described in Setting up your environment.
- 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.
- Modify the example so that the correct URL for your WebLogic Server is specified.
- Compile the example by executing the following command in your development shell:
$ javac -d %CLIENT_CLASSES% connectionpool.java
- Start WebLogic Server in a separate shell.
- 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.
-
connectionpool()
-
-
main(String[])
- In this main, the T3Client is created and connected.
connectionpool
public connectionpool()
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