How to test a DataSource connection in a JBoss EAP 6.2 managed domain

I am trying to port an application from WebLogic to JBoss EAP 6.2.

When starting a standalone server in JBoss, there is a button in the admin console and a command line option in the CLI to test the data source connection.

/subsystem=datasources/data-source=myds:test-connection-in-pool

      

These options do not appear anywhere when the domain server starts. Am I missing something? Are there any other tweaks I have to do to enable this? I tried a method that is sometimes analogous on a domain server and it doesn't work here.

/profile=full/subsystem=datasources/data-source=myds:test-connection-in-pool

      

JBoss docs are much weaker for the "domain" model than for the "stand-alone" ones.

+3


source to share


1 answer


You are absolutely correct that when starting a standalone server in JBoss, there is a button in the admin console and a command line option in the CLI to test the connection to the data source, but these parameters do not seem to exist in or when starting the domain server.

You can still use the jboss-eap-6.x command line to test the configured datasource connection on the domain server. You need to go to $ JBOSS_HOME / bin / and execute the script: jboss-cli.sh

Connect to a domain server controller with: connect: PORT_NO and run the following commands:

For XA-DataSource:



/ host = $ Host_Controller_Name / server = $ Server_Name / subsystem = data sources / source XA data = DataSource_JNDI_Name: pool test connection

For Non-XA-DataSource:

/ host = $ Host_Controller_Name / server = $ Server_Name / subsystem = data sources / source data = DataSource_JNDI_Name: pool test connection

+1


source







All Articles