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

Add the application name to the data sources matching heuristics

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.1.3
    • None
    • None
    • Linux, amd64, java 6u13

    Description

      When the data source is not specified in the persistence.xml file, there is an heuristic to resolve it.
      The application name (i.e. ear) should be used in this match, as a fallback, when the current algorithm can't find the data source.
      As suggested by David Blevins at http://mail-archives.apache.org/mod_mbox/openejb-users/200905.mbox/%3CBCA79B46-275F-41D4-898E-35D26973E766@visi.com%3E , the algorithm should be:
      1. the name set in <jta-data-source> or <non-jta-data-source>
      2. the name of the persistence-unit
      3. the name of the module name (i.e. war, ejb-jar, etc.)
      4. the name of the app name (i.e. ear)

      Attachments

        1. AutoConfig.java
          78 kB
          Luis Fernando Planella Gonzalez
        2. AutoConfig.java
          75 kB
          Luis Fernando Planella Gonzalez
        3. AutoConfigPersistenceUnitsTest.java
          53 kB
          Luis Fernando Planella Gonzalez
        4. AutoConfigPersistenceUnitsTest.java
          41 kB
          Luis Fernando Planella Gonzalez
        5. dataSourceFromModules.patch
          20 kB
          Luis Fernando Planella Gonzalez
        6. dataSourceFromWebAppContext.patch
          8 kB
          Luis Fernando Planella Gonzalez
        7. dataSourceUpdated.patch
          18 kB
          Luis Fernando Planella Gonzalez

        Activity

          People

            jlmonteiro Jean-Louis Monteiro
            luisfpg Luis Fernando Planella Gonzalez
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: