0

I can get some basic information from Glassfish v4 about the JDBC connection pool from the CLI with asadmin:

thufir@dur:~$ 
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin
Use "exit" to exit and "help" for online help.
asadmin> 
asadmin> list-jdbc-connection-pools
CLI031: Warning: Option "target" is obsolete and will be ignored.
CLI031: Warning: Option "target" is obsolete and will be ignored.
__TimerPool
DerbyPool
SamplePool
connectionPool
legacy_on_glassfish
Command list-jdbc-connection-pools executed successfully.
asadmin> 
asadmin> ping-connection-pool legacy_on_glassfish
Command ping-connection-pool executed successfully.
asadmin> 
asadmin> list-jdbc-resources
jdbc/sample
jdbc/__TimerPool
jdbc/__default
jdbc/local
jdbc/legacy_resource
Command list-jdbc-resources executed successfully.
asadmin> 
asadmin> exit
Command multimode executed successfully.
thufir@dur:~$ 

How do I get the full details, all the parameters of the connection, as through the web interface:

enter image description here

Also, where are the connection pool details stored?

see also:

https://glassfish.java.net/nonav/v3/admin/planning/j109/admin-cli.html#latestversion

https://glassfish.java.net/docs/4.0/administration-guide.pdf

2

You could use this here as well if you want a full blown set of information:

asadmin get domain.resources.jdbc-connection-pool.*
  • What?? Let me get you some rep! :) – Thufir Feb 25 '15 at 8:56
  • that was nice :-) – Nabi Feb 25 '15 at 9:00
0

this works:

asadmin> 
asadmin> get domain.resources.jdbc-connection-pool.legacy_on_glassfish
domain.resources.jdbc-connection-pool.legacy_on_glassfish.allow-non-component-callers=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.associate-with-thread=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.connection-creation-retry-attempts=0
domain.resources.jdbc-connection-pool.legacy_on_glassfish.connection-creation-retry-interval-in-seconds=10
domain.resources.jdbc-connection-pool.legacy_on_glassfish.connection-leak-reclaim=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.connection-leak-timeout-in-seconds=0
domain.resources.jdbc-connection-pool.legacy_on_glassfish.connection-validation-method=table
domain.resources.jdbc-connection-pool.legacy_on_glassfish.datasource-classname=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
domain.resources.jdbc-connection-pool.legacy_on_glassfish.deployment-order=100
domain.resources.jdbc-connection-pool.legacy_on_glassfish.fail-all-connections=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.idle-timeout-in-seconds=300
domain.resources.jdbc-connection-pool.legacy_on_glassfish.is-connection-validation-required=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.is-isolation-level-guaranteed=true
domain.resources.jdbc-connection-pool.legacy_on_glassfish.lazy-connection-association=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.lazy-connection-enlistment=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.match-connections=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.max-connection-usage-count=0
domain.resources.jdbc-connection-pool.legacy_on_glassfish.max-pool-size=32
domain.resources.jdbc-connection-pool.legacy_on_glassfish.max-wait-time-in-millis=60000
domain.resources.jdbc-connection-pool.legacy_on_glassfish.name=legacy_on_glassfish
domain.resources.jdbc-connection-pool.legacy_on_glassfish.non-transactional-connections=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.object-type=user
domain.resources.jdbc-connection-pool.legacy_on_glassfish.ping=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.pool-resize-quantity=2
domain.resources.jdbc-connection-pool.legacy_on_glassfish.pooling=true
domain.resources.jdbc-connection-pool.legacy_on_glassfish.res-type=javax.sql.ConnectionPoolDataSource
domain.resources.jdbc-connection-pool.legacy_on_glassfish.statement-cache-size=0
domain.resources.jdbc-connection-pool.legacy_on_glassfish.statement-cache-type=
domain.resources.jdbc-connection-pool.legacy_on_glassfish.statement-leak-reclaim=false
domain.resources.jdbc-connection-pool.legacy_on_glassfish.statement-leak-timeout-in-seconds=0
domain.resources.jdbc-connection-pool.legacy_on_glassfish.statement-timeout-in-seconds=-1
domain.resources.jdbc-connection-pool.legacy_on_glassfish.steady-pool-size=8
domain.resources.jdbc-connection-pool.legacy_on_glassfish.validate-atmost-once-period-in-seconds=0
domain.resources.jdbc-connection-pool.legacy_on_glassfish.wrap-jdbc-objects=true
Command get executed successfully.
asadmin> 

as per:

https://serverfault.com/a/637457/132080

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.