[jboss-cvs] JBossAS SVN: r57112 - trunk/connector/src/main/org/jboss/resource/connectionmanager/xa
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Sep 24 03:00:31 EDT 2006
Author: weston.price at jboss.com
Date: 2006-09-24 03:00:29 -0400 (Sun, 24 Sep 2006)
New Revision: 57112
Modified:
trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXid.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapper.java
Log:
[JBAS-3183] [JBAS-1405] [JBAS-397] Continued work on XAResourceWrapper and JcaXid. Moving
previous handling of Xid padding and isSameRM from XidFactory and
BaseWrapperManagedConnectionFactory respectively. Made XAResoruceWrapper
configurable option from XSLT.
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXid.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXid.java 2006-09-24 03:43:56 UTC (rev 57111)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/JcaXid.java 2006-09-24 07:00:29 UTC (rev 57112)
@@ -1,3 +1,24 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
package org.jboss.resource.connectionmanager.xa;
import java.io.Serializable;
@@ -40,6 +61,7 @@
branchQualifier = (pad) ? new byte[Xid.MAXBQUALSIZE] : new byte[xid.getBranchQualifier().length];
System.arraycopy(xid.getBranchQualifier(), 0, branchQualifier, 0, xid.getBranchQualifier().length);
+
this.globalTransactionId = xid.getGlobalTransactionId();
this.formatId = xid.getFormatId();
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapper.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapper.java 2006-09-24 03:43:56 UTC (rev 57111)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapper.java 2006-09-24 07:00:29 UTC (rev 57112)
@@ -1,3 +1,25 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
package org.jboss.resource.connectionmanager.xa;
import javax.transaction.xa.XAException;
@@ -21,25 +43,22 @@
private boolean pad;
- private boolean doRMOverride;
-
- private boolean rmOverrideValue;
+ private Boolean overrideRmValue;
-
public XAResourceWrapper(XAResource resource)
{
- this(false, false, resource);
+ this(Boolean.FALSE, false, resource);
}
public XAResourceWrapper(boolean pad, XAResource resource)
{
- this(false, pad, resource);
+ this(Boolean.FALSE, pad, resource);
}
- public XAResourceWrapper(boolean override, boolean pad, XAResource resource)
+ public XAResourceWrapper(Boolean override, boolean pad, XAResource resource)
{
- this.doRMOverride = override;
+ this.overrideRmValue = override;
this.pad = pad;
this.xaResource = resource;
@@ -72,15 +91,15 @@
public boolean isSameRM(XAResource resource) throws XAException
{
- if (doRMOverride)
+ if (overrideRmValue != null)
{
if(log.isTraceEnabled())
{
- log.trace("Executing isSameRM with override value" + rmOverrideValue + " for XAResourceWrapper" + this);
+ log.trace("Executing isSameRM with override value" + overrideRmValue + " for XAResourceWrapper" + this);
}
- return rmOverrideValue;
+ return overrideRmValue.booleanValue();
}
else
@@ -145,6 +164,11 @@
{
return xaResource;
}
+
+ public String toString()
+ {
+ // TODO Auto-generated method stub
+ return super.toString();
+ }
-
}
More information about the jboss-cvs-commits
mailing list