ravthiru
ravthiru

Reputation: 9633

How to change default datasource name in wildfly-swarm

How to set default Data source name (say MyDS). Swarm is always taking "ExampleDS" as defaultDatasource.

with earlier versions it used to be something like this

container.fraction(new PostgreSQLJPAFraction()
        .inhibitDefaultDatasource()
        .defaultDatasource("jboss/datasources/MyDS")

Upvotes: 0

Views: 440

Answers (1)

Ken
Ken

Reputation: 835

You can set the datasource name to be used with swarm.ds.property variable via -D on command line or with a yaml configuration file.

Full details can be found here: https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/content/common/jpa.html

Upvotes: 2

Related Questions