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

Allow use EL in DataSourceDefinition #95

Open
hantsy opened this issue Nov 30, 2021 · 1 comment
Open

Allow use EL in DataSourceDefinition #95

hantsy opened this issue Nov 30, 2021 · 1 comment

Comments

@hantsy
Copy link

hantsy commented Nov 30, 2021

Currently Payara/GF and WildFLy add reading env variable support in DataSourceDefinition, but it is better to support standard EL in the DataSourceDefinition properties.

eg.
Read from Jakarta Config properties via System environment variables.

  @DataSourceDefinition(name="#{env.DS_JNDI}",// or #{env['DS_JNDI']}
      className="#{env.DS_CLASSNAME}",
      port="#{env.DS_PORT}",
      host="#{env.DS_HOST}",
      user="#{env.DS_USERNAME}",
      password="#{env.DS_PASSWORD}",
    )

Read from Jakarta Config properties.

  @DataSourceDefinition(name="#{datasource.jndi}",
      className="#{datasource.classname}",
      port="#{datasource.port}",
      host="#{datasource.host}",
      user="#{datasource.username}",
      password="#{datasource.password}",
    )
@hantsy
Copy link
Author

hantsy commented Nov 30, 2021

I am not sure why this annotation is not located in Jdbc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant