Reputation: 574
I would like to create a jdbc connection pool from the command line --- doing it through the browser all the time is driving me crazy as it is such a tedious process. I've used the command
asadmin create-jdbc-connection-pool
--datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource
--restype javax.sql.DataSource
--property user=root:password=test:DatabaseName=test:ServerName=localhost:port=3306
the-pool
with success. However, it creates a connection pool with only the properties that are specified in the command. When I use the administration console at localhost:4848 to create a connection pool, the default number of "additional parameters" seem to be in the region of 171 properties. I'm assuming that the console is enacting a default property flag. Does anyone know how I might modify the command to get a more comprehensive list of properties? I've consulted the Oracle docs for pool administration but have had no joy and my shoddy installation of glassfish rendered asadmin
's help pages defunct.
Upvotes: 0
Views: 1464
Reputation: 574
I've been using the command posted in the question successfully for the past few months. There appears to be no need to set any of the additional properties. However, I use com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
instead of MysqlDataSource for the sake of performance (see this answer).
Upon creation of the pool, the jdbc resource is created by
asadmin create-jdbc-resource --connectionpoolid the-pool jdbc/the-pool
Upvotes: 1