[jboss-cvs] JBossAS SVN: r59870 - in branches/Branch_4_2/connector/src: main/org/jboss/resource/connectionmanager/xa and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 20 01:57:33 EST 2007


Author: weston.price at jboss.com
Date: 2007-01-20 01:57:33 -0500 (Sat, 20 Jan 2007)
New Revision: 59870

Modified:
   branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManager.java
   branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManagerMBean.java
   branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapper.java
   branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapperFactory.java
   branches/Branch_4_2/connector/src/resources/stylesheets/ConnectionFactoryTemplate.xsl
Log:
[JBAS-3183] XAResourceWrapper for foreign provider JMS integration. 

Modified: branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManager.java
===================================================================
--- branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManager.java	2007-01-20 06:06:39 UTC (rev 59869)
+++ branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManager.java	2007-01-20 06:57:33 UTC (rev 59870)
@@ -146,8 +146,6 @@
    
    private Boolean isSameRMOverrideValue;
    
-   private boolean pad;
-   
    protected static void rethrowAsSystemException(String context, Transaction tx, Throwable t)
       throws SystemException
    {
@@ -261,16 +259,6 @@
       this.isSameRMOverrideValue = isSameRMOverride;
    }
    
-   public boolean getPadXid()
-   {
-      return this.pad;
-      
-   }
-   public void setPadXid(boolean pad)
-   {
-      this.pad = pad;
-      
-   }
    public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws RollbackException
    {
       if (tm == null)
@@ -393,7 +381,7 @@
       }
       else
       {
-         xaResource = JcaXAResourceWrapperFactory.getResourceWrapper(mc.getXAResource(), pad, isSameRMOverrideValue);
+         xaResource = JcaXAResourceWrapperFactory.getResourceWrapper(mc.getXAResource(), isSameRMOverrideValue);
          
          if (xaResourceTimeout != 0)
          {

Modified: branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManagerMBean.java
===================================================================
--- branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManagerMBean.java	2007-01-20 06:06:39 UTC (rev 59869)
+++ branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManagerMBean.java	2007-01-20 06:57:33 UTC (rev 59870)
@@ -101,7 +101,4 @@
    
    void setIsSameRMOverrideValue(Boolean override);
 
-   boolean getPadXid();
-   
-   void setPadXid(boolean pad);
 }

Modified: branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapper.java
===================================================================
--- branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapper.java	2007-01-20 06:06:39 UTC (rev 59869)
+++ branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapper.java	2007-01-20 06:57:33 UTC (rev 59870)
@@ -42,32 +42,27 @@
    
    /** The serialVersionUID */
    private static final long serialVersionUID = -5041272057070910154L;
-   private final boolean pad;
    private final XAResource resource;
    private Boolean overrideSameRM;
   
-   public JcaXAResourceWrapper(final XAResource resource, final boolean pad, final Boolean overrideSameRM)
+   public JcaXAResourceWrapper(final XAResource resource, final Boolean overrideSameRM)
    {
       this.resource = resource;
-      this.pad = pad;
       this.overrideSameRM = overrideSameRM;
    }
    
    public void commit(Xid xid, boolean onePhase) throws XAException
    {
-      xid = convertXid(xid);
       resource.commit(xid, onePhase);
    }
 
    public void end(Xid xid, int flags) throws XAException
    {
-      xid = convertXid(xid);
       resource.end(xid, flags);
    }
 
    public void forget(Xid xid) throws XAException
    {
-      xid = convertXid(xid);
       resource.forget(xid);
    }
 
@@ -98,7 +93,6 @@
 
    public int prepare(Xid xid) throws XAException
    {
-      xid = convertXid(xid);
       return resource.prepare(xid);
    }
 
@@ -109,7 +103,6 @@
 
    public void rollback(Xid xid) throws XAException
    {
-      xid = convertXid(xid);
       resource.rollback(xid);
    }
 
@@ -120,28 +113,12 @@
 
    public void start(Xid xid, int flags) throws XAException
    {
-      xid = convertXid(xid);
       resource.start(xid, flags);
    }
    
-   private Xid convertXid(final Xid xid) throws XAException
-   {
-      
-      if (xid == null)
-      {
-         XAException e = new XAException("Null xid");
-         e.errorCode = XAException.XAER_NOTA;
-         throw e;
-      }
-      
-      return (xid instanceof JcaXid) ? xid : new JcaXid(xid, pad);
-   
-   }      
-   
    public XAResource getUnderlyingXAResource()
    {
       return this.resource;
    }
-   
-   
+      
 }

Modified: branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapperFactory.java
===================================================================
--- branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapperFactory.java	2007-01-20 06:06:39 UTC (rev 59869)
+++ branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXAResourceWrapperFactory.java	2007-01-20 06:57:33 UTC (rev 59870)
@@ -34,18 +34,14 @@
    
    public static JcaXAResourceWrapper getResourceWrapper(XAResource resource)
    {
-      return getResourceWrapper(resource, false, null);
+      return getResourceWrapper(resource, null);
       
    }
-   public static JcaXAResourceWrapper getResourceWrapper(XAResource resource, boolean padXid)
-   {
-      return getResourceWrapper(resource, padXid, null);      
-   }
 
-   public static JcaXAResourceWrapper getResourceWrapper(XAResource resource, boolean padXid, Boolean isSameRMOverrideValue)
+   public static JcaXAResourceWrapper getResourceWrapper(XAResource resource, Boolean isSameRMOverrideValue)
    {
     
-      JcaXAResourceWrapper wrapper = new JcaXAResourceWrapper(resource, padXid, isSameRMOverrideValue);
+      JcaXAResourceWrapper wrapper = new JcaXAResourceWrapper(resource, isSameRMOverrideValue);
       return wrapper;
       
    }

Modified: branches/Branch_4_2/connector/src/resources/stylesheets/ConnectionFactoryTemplate.xsl
===================================================================
--- branches/Branch_4_2/connector/src/resources/stylesheets/ConnectionFactoryTemplate.xsl	2007-01-20 06:06:39 UTC (rev 59869)
+++ branches/Branch_4_2/connector/src/resources/stylesheets/ConnectionFactoryTemplate.xsl	2007-01-20 06:57:33 UTC (rev 59870)
@@ -46,10 +46,6 @@
         <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
       </xsl:if>
       
-      <xsl:if test="pad-xid">
-        <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>        
-      </xsl:if>
-      
       <xsl:call-template name="pool">
         <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
       </xsl:call-template>
@@ -158,10 +154,6 @@
         <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
       </xsl:if>
       
-      <xsl:if test="pad-xid">
-        <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>        
-      </xsl:if>
-      
       <xsl:if test="xa-resource-timeout">
          <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
       </xsl:if>




More information about the jboss-cvs-commits mailing list