Details

      Description

      The JCA lazy initialization does not work in the following sceanrio

      *********************************************************************
      DataSource ds = ...
      Connection c = ds.getConnection();
      UserTransaction ut = ...
      ut.begin();
      // Do work
      c = ds.getConnection(); // This should be avoided and looks antipattern.
      ut.commit();
      ut.begin();
      *********************************************************************

      Getting the connection again in the TX context causes the issue, the subsequent
      ds.getConnection() leads to multiple enlistment of the local XAResources
      and thus causing this warning
      http://www.jboss.org/community/wiki/Multiple1pc

      The application developers should not follow the above coding pattern, however we should fix the issue cropping due to this coding practice as it could lead some misbehaviour in container, there are no evidences about the misbehaviour but it had been reported by our customers.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jesper.pedersen Jesper Pedersen
                  Reporter:
                  vickyk Vicky Kak
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: