I have a datasource, how to check if its ok? maybe somehow using jmx-console?
If you want just check if data source is installed and some statistic information about it you can read that bean: jboss.jca:name=DefaultDS,service=ManagedConnectionPool
.
You can find such bean for each data source, just change DefaultDS
with the data source name.
With JBoss 7, you can use the jboss-admin command line tool to test the datasource. Run this line in jboss-admin (after adjusting the JNDI name of the datasource, and example assuming that it is an XA datasource):
/subsystem=datasources/xa-data-source=java\:jboss/datasources/XAOracleDS:test-connection-in-pool
More details can be found here: http://www.javalinux.it/wordpress/2011/07/14/how-to-create-an-manage-datasources-in-as7/
The above did not work for me, but this worked-
Run this line in jboss-cli:
/subsystem=datasources/xa-data-source=jdbc\/XAOracleDS:test-connection-in-pool
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With