Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-161

LocalXAResourceInsertionInterceptor could use XAResource implementation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • core
    • None

    Description

      LocalXAResourceInsertionInterceptor could use XAResource from ManagedConnection instead of always build a wrapper to a XAResource delegating to LocalTransaction.

      Follows the patch.

      Index: LocalXAResourceInsertionInterceptor.java
      ===================================================================
      RCS file: /home/cvspublic/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/outbound/LocalXAResourceInsertionInterceptor.java,v
      retrieving revision 1.3
      diff -u -r1.3 LocalXAResourceInsertionInterceptor.java
      — LocalXAResourceInsertionInterceptor.java 10 Mar 2004 09:58:32 -0000 1.3
      +++ LocalXAResourceInsertionInterceptor.java 6 Apr 2004 15:33:54 -0000
      @@ -18,6 +18,7 @@
      package org.apache.geronimo.connector.outbound;

      import javax.resource.ResourceException;
      +import javax.transaction.xa.XAResource;

      /**

      • LocalXAResourceInsertionInterceptor.java
        @@ -37,7 +38,20 @@

      public void getConnection(ConnectionInfo connectionInfo) throws ResourceException {
      next.getConnection(connectionInfo);
      +
      +
      ManagedConnectionInfo mci = connectionInfo.getManagedConnectionInfo();
      +
      + try
      +

      { + XAResource resource = mci.getManagedConnection().getXAResource(); + mci.setXAResource( resource ); + return; + }

      + catch(Exception ignores)
      +

      { + }

      +
      mci.setXAResource(
      new LocalXAResource(
      mci.getManagedConnection().getLocalTransaction()));

      Attachments

        1. LocalXAResourceInsertionInterceptor.patch
          1 kB
          Hamilton Verissimo DeOliveira

        Activity

          People

            djencks David Jencks
            hammett Hamilton Verissimo DeOliveira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: