Uploaded image for project: 'ShrinkWrap Descriptors'
  1. ShrinkWrap Descriptors
  2. SHRINKDESC-41

PersistenceUnitDefImpl does not remove non-jta-data-source when configuring jta-data-source (and visa versa)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 0.1.3
    • Fix Version/s: 1.1.0-alpha-5
    • Component/s: api
    • Labels:
      None

      Description

      Setting the value to empty is as good as it gets, but it's not good enough because this doesn't deploy.

      unit.nonJtaDataSource("jndi:blah").jtaDataSource("jndi:blah")

      Results in:

      <jta-data-source>jndi:blah</jta-data-source>
      <non-jta-data-source/>

      But should be simply:

      <jta-data-source>jndi:blah</jta-data-source>

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            lincolnthree Lincoln Baxter III added a comment -

            Fixed methods (depends on SHRINKDESC-39)

            @Override
            public PersistenceUnitDef nonJtaDataSource(String jndiName)
            {
            if (jndiName == null)

            { persistenceUnit.remove("non-jta-data-source"); }

            else

            { persistenceUnit.removeSingle("jta-data-source"); persistenceUnit.getOrCreate("non-jta-data-source").text(jndiName); }

            return this;
            }

            @Override
            public PersistenceUnitDef jtaDataSource(String jndiName)
            {
            if (jndiName == null)

            { persistenceUnit.remove("jta-data-source"); }

            else

            { persistenceUnit.removeSingle("non-jta-data-source"); persistenceUnit.getOrCreate("jta-data-source").text(jndiName); }

            return this;
            }

            Show
            lincolnthree Lincoln Baxter III added a comment - Fixed methods (depends on SHRINKDESC-39 ) @Override public PersistenceUnitDef nonJtaDataSource(String jndiName) { if (jndiName == null) { persistenceUnit.remove("non-jta-data-source"); } else { persistenceUnit.removeSingle("jta-data-source"); persistenceUnit.getOrCreate("non-jta-data-source").text(jndiName); } return this; } @Override public PersistenceUnitDef jtaDataSource(String jndiName) { if (jndiName == null) { persistenceUnit.remove("jta-data-source"); } else { persistenceUnit.removeSingle("non-jta-data-source"); persistenceUnit.getOrCreate("jta-data-source").text(jndiName); } return this; }
            Hide
            lincolnthree Lincoln Baxter III added a comment -

            Depends on 39

            Show
            lincolnthree Lincoln Baxter III added a comment - Depends on 39
            Hide
            alrubinger Andrew Rubinger added a comment -

            Lincoln: please verify the upstream satisfies this issue, then resolve.

            Show
            alrubinger Andrew Rubinger added a comment - Lincoln: please verify the upstream satisfies this issue, then resolve.
            Hide
            lincolnthree Lincoln Baxter III added a comment -

            This is verified. Sorry, didn't see this notice.

            Show
            lincolnthree Lincoln Baxter III added a comment - This is verified. Sorry, didn't see this notice.

              People

              • Assignee:
                lincolnthree Lincoln Baxter III
                Reporter:
                lincolnthree Lincoln Baxter III
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development