Click OK.
▼
Creating a JDBC Connection Pool and JDBC Resource Using the CLI
Use the
asadmin create-jdbc-connection-pool
command to create a JDBC connection pool.
Sample command to create a JDBC connection pool:
asadmin create-jdbc-connection-pool --datasourceclassname
oracle.jdbc.pool.OracleDataSource --restype javax.sql.DataSource --property
user=dbuser:password=dbpassword:url=
"
jdbc:oracle\:thin\:@localhost\:1521\:ORCL
"
myjdbc_oracle-pool
Use the
asadmin create-jdbc-resource
command to create a JDBC resource assicated with
this connection pool.
Sample command to create a JDBC resource:
asadmin create-jdbc-connection-pool --connectionpoolid myjdbc_oracle-pool
jdbc/oracle-resource
Test the connection settings are correct by pinging the connection pool using the
asadmin
ping-connection-pool
command.
asadmin ping-connection-pool myjdbc_oracle-pool
To edit JDBC connection pool properties, use the
asadmin list
,
get
, and
set
commands.
Sample list command to list a JDBC connection pool:
asadmin list myjdbc_oracle-pool
The sample output of this command:
domain.resources.jdbc-connection-pool.oracle-pool
Sample get command to list all properties of a JDBC connection pool:
asadmin list myjdbc_oracle-pool
Sample get command to get all properties of a JDBC connection pool:
asadmin get domain.resources.jdbc-connection-pool.myjdbc_oracle-pool
Sample get command to set a properties of a JDBC connection pool:
asadmin set
domain.resources.jdbc-connection-pool.myjdbc_oracle-pool.steady-pool-size=20
9
1
2
3
4
Working with JDBC Connection Pools
Chapter 3 • JDBC Resources
47
Содержание Sun GlassFish Enterprise Server 2.1
Страница 12: ...12 ...
Страница 13: ...Figures FIGURE 1 1 Enterprise Server Instance 29 FIGURE 9 1 RoleMapping 105 13 ...
Страница 14: ...14 ...
Страница 18: ...18 ...
Страница 38: ...38 ...
Страница 62: ...62 ...
Страница 96: ...96 ...
Страница 126: ...126 ...
Страница 160: ...160 ...
Страница 214: ...214 ...
Страница 218: ...218 ...
Страница 230: ...230 ...