How to Display Database Driver List in Wildfly Java Application Server

Posted on

This article which has the title of ‘How to Display Database Driver List in Wildfly Java Application Server’ specifically written just to show that the way for listing driver can be done by executing command from the command line. Actually, it is not only the database driver list but also the list of datasource available in the Wildfly which has been added. The execution itself must be done from the Wildfly Command Console. Below is the step taken in order to achieve the task specified in the title of this article :

1. The installation of the Wildfly Java Application Server. It exists in the article titled ‘Installing Wildfly Java Application Server’ in this link.

2. The second step is for the Wildfly’s service itself to be executed and to run properly. To be able to run the service properly, just read the article titled ‘How to Run Wildfly Java Application Server via Command Line’ in this link which is running the service via command in the command prompt.

3. And after that, after the service can be run properly, connect to the administration console. For connecting to the administration console, read the article titled ‘How to Connect to Wildfly Management Console via Command Line’ in this link.

  1. After successfully connected to the Wildfly Management Console, just execute the command for displaying the list of datasources available using the following command :
/subsystem=datasources:read-resource

The execution of the above command in the command prompt of Wildfly Management Console can be shown as follows :

[standalone@localhost:9990 /] /subsystem=datasources:read-resource
{
"outcome" => "success",
"result" => {
"data-source" => {
"ExampleDS" => undefined,
},
"jdbc-driver" => {
"h2" => undefined,
"mysql" => undefined
},
"xa-data-source" => undefined
}
}
[standalone@localhost:9990 /]

Actually the above command itself can be shown by directly accessing the Wildfly Management Console page located in http://localhost:9990. It can be seen in the image follows :

How to Display Database Driver List in Wildfly Java Application Server
How to Display Database Driver List in Wildfly Java Application Server

In this context, the list of the datasource only which is being presented. On the other hand, the database driver seems cannot be viewed through the Wildfly Java Applications Server’s management console accessed from the web. It seems,  it can only be shown from the management console’s command prompt by executing the above command.

2 thoughts on “How to Display Database Driver List in Wildfly Java Application Server

Leave a Reply