I'm trying to run my web application using Wildfly Swarm and .war packaging.
How should i add my jdbc driver and data source definition?
javawildfly8
I'm trying to run my web application using Wildfly Swarm and .war packaging.
How should i add my jdbc driver and data source definition?
Best Answer
In the simple case where you can simply use the default data source in your persistence unit, you can just specify the connection details using the following Java system properties:
Setting these values configures the JTA data source, so you can have a very basic persistence.xml:
The datasource name doesn't seem to matter.
For (slightly) more information, see https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/content/configuration_properties.html