Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1028

Better templating to reduce redundant openejb.xml config data

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 3.1.x
    • configuration
    • None

    Description

      The idea is that instead of doing this as we currently do:

      <Resource id="My DataSource" type="DataSource">
      JdbcDriver org.hsqldb.jdbcDriver
      JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
      UserName sa
      Password
      JtaManaged true
      </Resource>

      <Resource id="My Unmanaged DataSource" type="DataSource">
      JdbcDriver org.hsqldb.jdbcDriver
      JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
      UserName sa
      Password
      JtaManaged false
      </Resource>

      You can instead utilize the already existing 'provider' attribute to point to things in the openejb.xml file just as you can already use it to point to things declared in a service-jar.xml file.

      <Resource id="My DataSource" type="DataSource">
      JdbcDriver org.hsqldb.jdbcDriver
      JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
      UserName sa
      Password
      JtaManaged true
      </Resource>

      <Resource id="My Unmanaged DataSource" provider="My DataSource">
      JtaManaged false
      </Resource>

      Attachments

        1. ServiceProviderInheritance.txt
          10 kB
          David Blevins

        Activity

          People

            dblevins David Blevins
            dblevins David Blevins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: