Sun GlassFish Enterprise Server v3 Prelude Administration Guide

ProcedureTo Create a JDBC Connection Pool

The remote create-jdbc-connection-pool command enables you to register a new JDBC connection pool with the specified JDBC connection pool name. A JDBC connection pool or a connector connection pool can be created with authentication. You can either use a command option to specify user, password, or other connection information using the asadmin utility, or specify the connection information in the XML descriptor file.

When you are building the connection pool, certain data specific to the JDBC driver and the database vendor will be required. You can find some of the following specifics inConfiguration Specifics for JDBC Drivers:

Creating a JDBC connection pool is a dynamic event and does not require server restart.

Before You Begin

Before creating the connection pool, you must first install and integrate the database and its associated JDBC driver. For instructions, see Setting Up the Database.

  1. Ensure that the server is running.

    Remote commands require a running server.

  2. Create the JDBC connection pool by using the create-jdbc-connection-pool(1) command.


Example 5–3 Creating a JDBC Connection Pool

The following example command creates a JDBC connection pool named sample_derby_pool on localhost:


asadmin create-jdbc-connection-pool 
--datasourceclassname org.apache.derby.jdbc.ClientDataSource 
--restype javax.sql.XADataSource 
--property portNumber=1527:password=APP:user=APP:serverName=
localhost:databaseName=sun-appserv-samples:connectionAttribut
es=\;create\\=true sample_derby_pool

Information similar to the following is displayed:


Command create-jdbc-connection-pool executed successfully.

See Also

To see the full syntax and options of the command, type asadmin create-jdbc-connection-pool --help at the command line.