How To Configure Datasource in WildFly
How To Configure Datasource in WildFly
How To Configure Datasource in WildFly
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy withRecaptcha
it.
Privacy -
OK No Read more (https://cleanprogrammer.net/privacy-policy/)
protected
https://cleanprogrammer.net/how-to-configure-datasource-in-wildfly/ 1/6
2/5/2020 How to configure Datasource in WildFly
WildFly is a free, open source & cross platform application server (formely known as Jboss AS or Jboss). It is
written in java programming language & currently it is being maintained, developed by Redhat. The most
notable features of WildFly are:
Fast Startup,
Small Footprint,
Modular
We use cookies toDesign,
ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy withRecaptcha
it.
Privacy -
Unified Configuration and
OK Management
No Read more (https://cleanprogrammer.net/privacy-policy/)
protected
https://cleanprogrammer.net/how-to-configure-datasource-in-wildfly/ 2/6
2/5/2020 How to configure Datasource in WildFly
$ cd $JBOSS_HOME
$ ./bin/jboss-cli.sh --connect
Now we are connected to the running WildFly instance. To add a new datasource (oracle datasource in this
example) simply run:
This will add following xml in standalone.xml or standalone-full.xml whichever you are using.
https://cleanprogrammer.net/how-to-configure-datasource-in-wildfly/ 3/6
2/5/2020 How to configure Datasource in WildFly
<min-pool-size>20</min-pool-size>
<initial-pool-size>25</initial-pool-size>
<max-pool-size>50</max-pool-size>
</pool>
<security>
<user-name>user</user-name>
<password>pass</password>
</security>
</datasource>
This will add following xml in standalone.xml or standalone-full.xml whichever you are using.
https://cleanprogrammer.net/how-to-configure-datasource-in-wildfly/ 4/6
2/5/2020 How to configure Datasource in WildFly
<driver>oracle</driver>
<xa-pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<allow-multiple-users>false</allow-multiple-users>
<interleaving>false</interleaving>
<no-tx-separate-pools>false</no-tx-separate-pools>
<pad-xid>false</pad-xid>
<wrap-xa-resource>true</wrap-xa-resource>
</xa-pool>
<security>
<user-name>user</user-name>
<password>pass</password>
</security>
</xa-datasource>
Note that the data-source add and xa-data-source add examples above are not minimal in the sense of specifying
the required arguments only, they also include optional arguments you’ll most likely want to specify. For a list of
all the arguments run:
or,
[standalone@localhost:9990 /] /subsystem=datasources:read-resource
{
"outcome"
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy withRecaptcha
=> "success", it.
"result" => { Privacy -
OK No Read more (https://cleanprogrammer.net/privacy-policy/)
"data-source" => {"ExampleDS" => undefined},
protected
https://cleanprogrammer.net/how-to-configure-datasource-in-wildfly/ 5/6
2/5/2020 How to configure Datasource in WildFly
"jdbc-driver" => {
"h2" => undefined,
"oracle" => undefined
},
"xa-data-source" => {"testDS" => undefined}
}
}
Note that, if you want to add datasource manually by editing the configuration xml filestandalone.xml or
standalone-full.xml whichever you are using, add the xml above in the `<datasources></datasources>` section.
Related Posts
Making a GET request with request Improving the performance of WildFly Deploy applications to Oracle
body using Spring RestTemplate application server to handle concurrency Weblogic Server using weblogic
(https://cleanprogrammer.net/making- (https://cleanprogrammer.net/improving- maven plugin
get-request-with-body-using-spring- the-performance-of-wildfly-application- (https://cleanprogrammer.net/deploy-
resttemplate/) server-to-handle-concurrency/) applications-to-oracle-weblogic-
server-using-weblogic-maven-plugin/)
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy withRecaptcha
it.
Privacy -
OK No Read more (https://cleanprogrammer.net/privacy-policy/)
protected
https://cleanprogrammer.net/how-to-configure-datasource-in-wildfly/ 6/6