How to Test DataSource connections using CLI in JBoss EAP
Issue
- How to test the jdbc datasource that is configured in the standalone.xml file through the JBoss CLI command.
- Is there a CLI command available which can be used to Test the DataSource Connections ?
- How to test JDBC connection in domain mode using CLI command ?
- How can one verify that datasource is available for application usage?
- Getting following ERROR while testing datasource connection in EAP 6:
$ ./jboss/bin/jboss-cli.sh --connect /host="test-host"/server="test_server"/subsystem=datasources/data-source="Test_DataSource":test-connection-in-pool
{
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS014807: Management resource '[(\"subsystem\" => \"datasources\")]' not found",
"rolled-back" => true
}
- Getting following ERROR while testing datasource connection in JBoss EAP domain mode:
[domain@localhost:9999 /] /profile=full/subsystem=datasources/data-source=ExampleDS:test-connection-in-pool()
{
"outcome" => "failed",
"failure-description" => "JBAS014884: No operation named 'test-connection-in-pool' exists at address [
(\"profile\" => \"full\"),
(\"subsystem\" => \"datasources\"),
(\"data-source\" => \"ExampleDS\")
]",
"rolled-back" => true
}
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6
- 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
