I have done necessary configurations by adding JDBC driver in modules, creating modules.xml and then adding necessary datasource configuration in standalone.xml file. I want know if it is done successfully. Is there any way to check that. Is there any way to test database connectivity. My jboss server is running on a linux system and postresql db server is running in another VM instance.
You can test database connectivity by the following steps:
JBOSS_HOME/bin folder and execute ./jboss-cli.sh. This opens the JBoss CLI.connect
/subsystem=datasources/data-source=name_of_your_datasource:test-connection-in-pool
The name_of_your_datasource is the name of the datasource in your standalone.XML.
You should see something like:
{"outcome" => "success","result" => [true]}
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