Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples do not contain case for platform independent datasource #228

Open
wisteso opened this issue Apr 9, 2021 · 4 comments
Open

Examples do not contain case for platform independent datasource #228

wisteso opened this issue Apr 9, 2021 · 4 comments
Labels
good first issue Good for newcomers

Comments

@wisteso
Copy link

wisteso commented Apr 9, 2021

Had to guess / experiment until I found a way that worked for bare-metal / non-openshift projects. The solution I found is posted as the answer to my own StackOverflow question

This also lets users have more than one datasource instead of a singleton-only approach like you see in the postgresql example

This might seem obvious to the development team, but it's is extremely unintuitive for someone that's new to WildFly or perhaps relied on the management console to define datasources previously.

@jamezp
Copy link
Collaborator

jamezp commented Apr 9, 2021

There is a layer you can use for this for this https://github.com/wildfly-extras/wildfly-datasources-galleon-pack. I believe in that example you can just remove the cloud layer.

@jfdenise
Copy link
Collaborator

jfdenise commented Apr 9, 2021

@wisteso , thank-you for your report. We definitely need to evolve the postgresql example with a non cloud example. We will add it.You can use the same environment variables on openshift and on bare-metal BTW.

As @jamezp mentioned, we have a wildfly-datasources-galleon-pack (for which we are going to release a v2 very soon with much more configuration capabilities, new env variables, ability to configure the datasource with System properties), that defines a postgresql-datasource layer that would allow you to create a datasource for postgresql. It also supports mysql and oracle (in v2 we are adding microsoft mssqlserver and mariadb).

@wisteso
Copy link
Author

wisteso commented Apr 9, 2021

@jfdenise That's great news on adding the additional example.

I could definitely use the env variable approach with wildfly-datasources-galleon-pack, but the 'data-source add' CLI command is also working great and lets me configure the JNDI name and have multiple datasources, if needed.

Sounds like v2 might address those issues too, so I'm looking forward to it. Though is there anything you see as an issue with the <script>datasource.cli<script> approach?

@jfdenise
Copy link
Collaborator

@wisteso , the CLI approach is correct, it is the way to add multiple datasources, the Galleon feature-pack allows to add only a single datasource.

@jfdenise jfdenise added the good first issue Good for newcomers label Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants