All Examples 

package examples.jdbc.pool

Class Index

about this package

This example shows how to use a WebLogic pool driver to make a JDBC connection for use in an HTTP servlet. This server-side JDBC pool can use a few JDBC connections that are created when the WebLogic Server starts up to serve many clients displaying database data in an HTTP servlet. (The WebLogic Tour uses a single-user version of a Cloudscape database with a server-side connection pool.)

The servlet also uses a WebLogic Server, a dbKona DataSet, and htmlKona objects to generate the HTML page that displays the database results. You'll need a database with the "emp" table in it, like the DEMO database that comes with an Oracle installation. If you want to create the table yourself, the SQL for it is in the examples/applets directory in the "emp.sql" file.

how to use this package

To set up this example:

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

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

    $ javac -d %SERVLET_CLASSES%

  3. Register the servlet in your file by adding the following property:

  4. Register the connection pool "oraclePool" in your WebLogic Server's 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 connection properties in these lines so that they are appropriate for your database.

  5. Start your WebLogic Server.

  6. Call the servlet from a browser with a URL like


    Where WebLogicHost:port is the hostname and port number of your WebLogic Server.

there's more . . .

WebLogic JDBC Options

Read more about using server-side pools in the Developers Guides Using WebLogic HTTP Servlets and Using WebLogic JDBC.