Skip to content

[MEAR-282] Support data-source element #453

@jira-importer

Description

@jira-importer

Joeren Haag opened MEAR-282 and commented

Since Version 6 and up to the latest Version of Java/Jakarta EE the data-source element is defined in the Schema of the application.xml ([#1]). So it would be nice to support the data-source element also in the configuration of the maven-ear-plugin. Here is my actual workaround:

  1. enable the generation of application.xml
  2. move the generated application.xml to the source folder src/main/application
  3. disable the generation of application.xml
  4. add the data-source configuration to application.xm

Here is a "simple example" of the data-source element (the example is based on Version 8 of Java EE), like it's look in the application.xml:

<data-source>
  <description><!-- string, optional --></description>
  <name><!-- jndi-name, required --></name>
  <class-name><!-- fqn, optional --></class-name>
  <server-name><!-- string, optional --></server-name>
  <port-number><!-- int, optional --></port-number>
  <database-name><!-- string, optional --></database-name>
  <url><!-- JDBC-url, optional --></url>
  <user><!-- string, optional --></user>
  <password><!-- string, optional --></password>
  <property><!-- optional, multiple -->
    <name><!-- string --></name>
    <value><!-- value --></value>
  </property>
  <login-timeout><!-- integer, optional --></login-timeout>
  <transactional><!-- boolean, optional --></transactional>
  <isolation-level><!-- TRANSACTION_READ_UNCOMMITTED|TRANSACTION_READ_COMMITTED|TRANSACTION_REPEATABLE_READ|TRANSACTION_SERIALIZABLE, optional--></isolation-level>
  <initial-pool-size><!-- integer, optional --></initial-pool-size>
  <max-pool-size><!-- integer, optional --></max-pool-size>
  <min-pool-size><!-- integer, optional --></min-pool-size>
  <max-idle-time><!-- integer, optional --></max-idle-time>
  <max-statements><!-- integer, optional --></max-statements>
</data-source>


1 votes, 3 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions