[jboss-cvs] JBossAS SVN: r108121 - in projects/jboss-jca/trunk/common/src/main: java/org/jboss/jca/common/api/metadata/ds and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 13 05:16:32 EDT 2010


Author: maeste
Date: 2010-09-13 05:16:32 -0400 (Mon, 13 Sep 2010)
New Revision: 108121

Added:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java
Removed:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java
Modified:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/ConnectionDefinition.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/ConnectionDefinitionImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java
   projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd
   projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd
Log:
JBJCA-414 JBJCA-401 added support for xa-pool

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java (from rev 108098, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.common.api.metadata.common;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A XaPool.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface CommonXaPool extends CommonPool
+{
+
+   /**
+    * Get the isSameRmOverride.
+    *
+    * @return the isSameRmOverride.
+    */
+   public boolean isSameRmOverride();
+
+   /**
+    * Get the interleaving.
+    *
+    * @return the interleaving.
+    */
+   public boolean isInterleaving();
+
+   /**
+    * Get the padXid.
+    *
+    * @return the padXid.
+    */
+   public boolean isPadXid();
+
+   /**
+    * Get the wrapXaDataSource.
+    *
+    * @return the wrapXaDataSource.
+    */
+   public boolean isWrapXaDataSource();
+
+   /**
+    * Get the noTxSeparatePool.
+    *
+    * @return the noTxSeparatePool.
+    */
+   public boolean isNoTxSeparatePool();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+
+      /**
+      * maxPoolSize tag
+      */
+      MAXPOOLSIZE("max-pool-size"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+
+      /**
+       * use-strict-min tag
+       */
+      USE_STRICT_MIN("use-strict-min"),
+      /**
+       * isSameRmOverrideValue tag
+       */
+      ISSAMERMOVERRIDEVALUE("is-same-rm-override"),
+      /**
+      * interleaving tag
+      */
+      INTERLEAVING("interleaving"),
+      /**
+       * pad-xid tag
+       */
+      PAD_XID("pad-xid"),
+
+      /**
+       * wrap-xa-resource tag
+       */
+      WRAP_XA_RESOURCE("wrap-xa-resource"),
+
+      /**
+       * no-tx-separate-pools tag
+       */
+      NO_TX_SEPARATE_POOLS("no-tx-separate-pools");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+
+}

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/ConnectionDefinition.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/ConnectionDefinition.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/ConnectionDefinition.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -107,12 +107,12 @@
    public CommonSecurity getSecurity();
 
    /**
-    * Get the noTxSeparatePool.
+    * Return true if this connectionDefnition have defined an XaPool
     *
-    * @return the noTxSeparatePool.
+    * @return true if this connectionDefnition have defined an XaPool
     */
 
-   public boolean isNoTxSeparatePool();
+   public boolean isXa();
 
    /**
    *
@@ -133,9 +133,9 @@
        */
       CONFIG_PROPERTY("config-property"),
       /**
-       * no-tx-separate-pool tag
+       * pool tag
        */
-      NO_TX_SEPARATE_POOL("no-tx-separate-pool"),
+      XA_POOL("xa-pool"),
       /**
        * pool tag
        */

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -21,6 +21,8 @@
  */
 package org.jboss.jca.common.api.metadata.ds;
 
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -83,7 +85,7 @@
     *
     * @return the xaPool.
     */
-   public XaPool getXaPool();
+   public CommonXaPool getXaPool();
 
    /**
    *

Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -1,181 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jca.common.api.metadata.ds;
-
-import org.jboss.jca.common.api.metadata.common.CommonPool;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * A XaPool.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
-public interface XaPool extends CommonPool
-{
-
-   /**
-    * Get the isSameRmOverride.
-    *
-    * @return the isSameRmOverride.
-    */
-   public boolean isSameRmOverride();
-
-   /**
-    * Get the interleaving.
-    *
-    * @return the interleaving.
-    */
-   public boolean isInterleaving();
-
-   /**
-    * Get the padXid.
-    *
-    * @return the padXid.
-    */
-   public boolean isPadXid();
-
-   /**
-    * Get the wrapXaDataSource.
-    *
-    * @return the wrapXaDataSource.
-    */
-   public boolean isWrapXaDataSource();
-
-   /**
-    * Get the noTxSeparatePool.
-    *
-    * @return the noTxSeparatePool.
-    */
-   public boolean isNoTxSeparatePool();
-
-   /**
-   *
-   * A Tag.
-   *
-   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
-   *
-   */
-   public enum Tag
-   {
-      /** always first
-       *
-       */
-      UNKNOWN(null),
-
-      /**
-       * min-pool-size tag
-       */
-      MIN_POOL_SIZE("min-pool-size"),
-
-      /**
-      * maxPoolSize tag
-      */
-      MAXPOOLSIZE("max-pool-size"),
-      /**
-      * prefill tag
-      */
-      PREFILL("prefill"),
-
-      /**
-       * use-strict-min tag
-       */
-      USE_STRICT_MIN("use-strict-min"),
-      /**
-       * isSameRmOverrideValue tag
-       */
-      ISSAMERMOVERRIDEVALUE("is-same-rm-override"),
-      /**
-      * interleaving tag
-      */
-      INTERLEAVING("interleaving"),
-      /**
-       * pad-xid tag
-       */
-      PAD_XID("pad-xid"),
-
-      /**
-       * wrap-xa-resource tag
-       */
-      WRAP_XA_RESOURCE("wrap-xa-resource"),
-
-      /**
-       * no-tx-separate-pools tag
-       */
-      NO_TX_SEPARATE_POOLS("no-tx-separate-pools");
-
-      private final String name;
-
-      /**
-       *
-       * Create a new Tag.
-       *
-       * @param name a name
-       */
-      Tag(final String name)
-      {
-         this.name = name;
-      }
-
-      /**
-       * Get the local name of this element.
-       *
-       * @return the local name
-       */
-      public String getLocalName()
-      {
-         return name;
-      }
-
-      private static final Map<String, Tag> MAP;
-
-      static
-      {
-         final Map<String, Tag> map = new HashMap<String, Tag>();
-         for (Tag element : values())
-         {
-            final String name = element.getLocalName();
-            if (name != null)
-               map.put(name, element);
-         }
-         MAP = map;
-      }
-
-      /**
-      *
-      * Static method to get enum instance given localName XsdString
-      *
-      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
-      * @return the enum instance
-      */
-      public static Tag forName(String localName)
-      {
-         final Tag element = MAP.get(localName);
-         return element == null ? UNKNOWN : element;
-      }
-
-   }
-
-}

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -23,9 +23,12 @@
 
 import org.jboss.jca.common.api.metadata.common.CommonPool;
 import org.jboss.jca.common.api.metadata.common.CommonSecurity;
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
 import org.jboss.jca.common.api.metadata.ds.DataSource;
+import org.jboss.jca.common.api.metadata.ds.XaDataSource;
 import org.jboss.jca.common.metadata.common.CommonPoolImpl;
 import org.jboss.jca.common.metadata.common.CommonSecurityImpl;
+import org.jboss.jca.common.metadata.common.CommonXaPoolImpl;
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
@@ -269,4 +272,95 @@
       throw new ParserException("Reached end of xml document unexpectedly");
    }
 
+   /**
+   *
+   * parse a {@link CommonXaPool} object
+   *
+   * @param reader reader
+   * @return the parsed {@link CommonXaPool} object
+   * @throws XMLStreamException XMLStreamException
+   * @throws ParserException ParserException
+   */
+   protected CommonXaPool parseXaPool(XMLStreamReader reader) throws XMLStreamException, ParserException
+   {
+      Integer minPoolSize = null;
+      Integer maxPoolSize = null;
+      boolean prefill = false;
+      boolean interleaving = false;
+      boolean isSameRmOverrideValue = false;
+      boolean padXid = false;
+      boolean noTxSeparatePool = false;
+      boolean wrapXaDataSource = false;
+      boolean useStrictMin = false;
+
+      while (reader.hasNext())
+      {
+         switch (reader.nextTag())
+         {
+            case END_ELEMENT : {
+               if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.XA_POOL)
+               {
+
+                  return new CommonXaPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin, isSameRmOverrideValue,
+                                        interleaving, padXid, wrapXaDataSource, noTxSeparatePool);
+
+               }
+               else
+               {
+                  if (CommonXaPool.Tag.forName(reader.getLocalName()) == CommonXaPool.Tag.UNKNOWN)
+                  {
+                     throw new ParserException("unexpected end tag" + reader.getLocalName());
+                  }
+               }
+               break;
+            }
+            case START_ELEMENT : {
+               switch (CommonXaPool.Tag.forName(reader.getLocalName()))
+               {
+                  case MAXPOOLSIZE : {
+                     maxPoolSize = elementAsInteger(reader);
+                     break;
+                  }
+                  case MIN_POOL_SIZE : {
+                     minPoolSize = elementAsInteger(reader);
+                     break;
+                  }
+                  case INTERLEAVING : {
+                     interleaving = elementAsBoolean(reader);
+                     break;
+                  }
+                  case ISSAMERMOVERRIDEVALUE : {
+                     isSameRmOverrideValue = elementAsBoolean(reader);
+                     break;
+                  }
+                  case NO_TX_SEPARATE_POOLS : {
+                     noTxSeparatePool = elementAsBoolean(reader);
+                     break;
+                  }
+                  case PAD_XID : {
+                     padXid = elementAsBoolean(reader);
+                     break;
+                  }
+                  case WRAP_XA_RESOURCE : {
+                     wrapXaDataSource = elementAsBoolean(reader);
+                     break;
+                  }
+                  case PREFILL : {
+                     prefill = elementAsBoolean(reader);
+                     break;
+                  }
+                  case USE_STRICT_MIN : {
+                     useStrictMin = elementAsBoolean(reader);
+                     break;
+                  }
+                  default :
+                     throw new ParserException("Unexpected element:" + reader.getLocalName());
+               }
+               break;
+            }
+         }
+      }
+      throw new ParserException("Reached end of xml document unexpectedly");
+   }
+
 }

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -66,7 +66,6 @@
       CommonSecurity security = null;
       CommonTimeOut timeOut = null;
       CommonValidation validation = null;
-      boolean noTxSeparatePools = false;
       CommonPool pool = null;
 
       //attributes reading
@@ -115,8 +114,7 @@
                {
 
                   return new ConnectionDefinitionImpl(configProperties, className, jndiName, poolName, enabled,
-                                                      useJavaContext, pool, timeOut, validation, security,
-                                                      noTxSeparatePools);
+                                                      useJavaContext, pool, timeOut, validation, security);
                }
                else
                {
@@ -146,11 +144,17 @@
                      validation = parseValidation(reader);
                      break;
                   }
-                  case NO_TX_SEPARATE_POOL : {
-                     noTxSeparatePools = elementAsBoolean(reader);
+                  case XA_POOL : {
+                     if (pool != null)
+                        throw new ParserException("You cannot define more than one pool or xa-poll in same"
+                                                  + " connection-definition");
+                     pool = parseXaPool(reader);
                      break;
                   }
                   case POOL : {
+                     if (pool != null)
+                        throw new ParserException("You cannot define more than one pool or xa-poll in same"
+                                                  + " connection-definition");
                      pool = parsePool(reader);
                      break;
                   }

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java (from rev 108098, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -0,0 +1,178 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.common.metadata.common;
+
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+
+/**
+ *
+ * A XaPoolImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class CommonXaPoolImpl extends CommonPoolImpl implements CommonXaPool
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 3261597366235425250L;
+
+   private final boolean isSameRmOverride;
+
+   private final boolean interleaving;
+
+   private final boolean padXid;
+
+   private final boolean wrapXaDataSource;
+
+   private final boolean noTxSeparatePool;
+
+
+
+   /**
+    * Create a new XaPoolImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param useStrictMin useStrictMin
+    * @param isSameRmOverride isSameRmOverride
+    * @param interleaving interleaving
+    * @param padXid padXid
+    * @param wrapXaDataSource wrapXaDataSource
+    * @param noTxSeparatePool noTxSeparatePool
+    */
+   public CommonXaPoolImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, boolean useStrictMin,
+      boolean isSameRmOverride, boolean interleaving, boolean padXid, boolean wrapXaDataSource,
+      boolean noTxSeparatePool)
+   {
+      super(minPoolSize, maxPoolSize, prefill, useStrictMin);
+      this.isSameRmOverride = isSameRmOverride;
+      this.interleaving = interleaving;
+      this.padXid = padXid;
+      this.wrapXaDataSource = wrapXaDataSource;
+      this.noTxSeparatePool = noTxSeparatePool;
+   }
+
+   /**
+    * Get the isSameRmOverride.
+    *
+    * @return the isSameRmOverride.
+    */
+   @Override
+   public final boolean isSameRmOverride()
+   {
+      return isSameRmOverride;
+   }
+
+   /**
+    * Get the interleaving.
+    *
+    * @return the interleaving.
+    */
+   @Override
+   public final boolean isInterleaving()
+   {
+      return interleaving;
+   }
+
+   /**
+    * Get the padXid.
+    *
+    * @return the padXid.
+    */
+   @Override
+   public final boolean isPadXid()
+   {
+      return padXid;
+   }
+
+   /**
+    * Get the wrapXaDataSource.
+    *
+    * @return the wrapXaDataSource.
+    */
+   @Override
+   public final boolean isWrapXaDataSource()
+   {
+      return wrapXaDataSource;
+   }
+
+   /**
+    * Get the noTxSeparatePool.
+    *
+    * @return the noTxSeparatePool.
+    */
+   @Override
+   public final boolean isNoTxSeparatePool()
+   {
+      return noTxSeparatePool;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + (interleaving ? 1231 : 1237);
+      result = prime * result + (isSameRmOverride ? 1231 : 1237);
+      result = prime * result + (noTxSeparatePool ? 1231 : 1237);
+      result = prime * result + (padXid ? 1231 : 1237);
+      result = prime * result + (wrapXaDataSource ? 1231 : 1237);
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof CommonXaPoolImpl))
+         return false;
+      CommonXaPoolImpl other = (CommonXaPoolImpl) obj;
+      if (interleaving != other.interleaving)
+         return false;
+      if (isSameRmOverride != other.isSameRmOverride)
+         return false;
+      if (noTxSeparatePool != other.noTxSeparatePool)
+         return false;
+      if (padXid != other.padXid)
+         return false;
+      if (wrapXaDataSource != other.wrapXaDataSource)
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "XaPoolImpl [isSameRmOverride=" + isSameRmOverride + ", interleaving=" + interleaving + ", padXid=" +
+             padXid + ", wrapXaDataSource=" + wrapXaDataSource + ", noTxSeparatePool=" + noTxSeparatePool +
+             ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill +
+             ", useStrictMin=" + useStrictMin + "]";
+   }
+
+
+
+}
+

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/ConnectionDefinitionImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/ConnectionDefinitionImpl.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/ConnectionDefinitionImpl.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -25,6 +25,7 @@
 import org.jboss.jca.common.api.metadata.common.CommonSecurity;
 import org.jboss.jca.common.api.metadata.common.CommonTimeOut;
 import org.jboss.jca.common.api.metadata.common.CommonValidation;
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
 import org.jboss.jca.common.api.metadata.common.ConnectionDefinition;
 
 import java.util.Collections;
@@ -63,7 +64,6 @@
 
    private final CommonSecurity security;
 
-   private final boolean noTxSeparatePool;
 
    /**
     * Create a new ConnectionDefinition.
@@ -78,11 +78,10 @@
     * @param timeOut timeOut
     * @param validation validation
     * @param security security
-    * @param noTxSeparatePool noTxSeparatePool
     */
    public ConnectionDefinitionImpl(Map<String, String> configProperties, String className, String jndiName,
       String poolName, boolean enabled, boolean useJavaContext, CommonPool pool, CommonTimeOut timeOut,
-      CommonValidation validation, CommonSecurity security, boolean noTxSeparatePool)
+      CommonValidation validation, CommonSecurity security)
    {
       super();
       if (configProperties != null)
@@ -103,7 +102,7 @@
       this.timeOut = timeOut;
       this.validation = validation;
       this.security = security;
-      this.noTxSeparatePool = noTxSeparatePool;
+
    }
 
    /**
@@ -216,15 +215,11 @@
       return security;
    }
 
-   /**
-    * Get the noTxSeparatePool.
-    *
-    * @return the noTxSeparatePool.
-    */
+
    @Override
-   public final boolean isNoTxSeparatePool()
+   public final boolean isXa()
    {
-      return noTxSeparatePool;
+      return (pool instanceof CommonXaPool);
    }
 
    @Override
@@ -236,7 +231,6 @@
       result = prime * result + ((configProperties == null) ? 0 : configProperties.hashCode());
       result = prime * result + (enabled ? 1231 : 1237);
       result = prime * result + ((jndiName == null) ? 0 : jndiName.hashCode());
-      result = prime * result + (noTxSeparatePool ? 1231 : 1237);
       result = prime * result + ((pool == null) ? 0 : pool.hashCode());
       result = prime * result + ((poolName == null) ? 0 : poolName.hashCode());
       result = prime * result + ((security == null) ? 0 : security.hashCode());
@@ -279,8 +273,6 @@
       }
       else if (!jndiName.equals(other.jndiName))
          return false;
-      if (noTxSeparatePool != other.noTxSeparatePool)
-         return false;
       if (pool == null)
       {
          if (other.pool != null)
@@ -327,7 +319,7 @@
       return "ConnectionDefinitionImpl [configProperties=" + configProperties + ", className=" + className +
              ", jndiName=" + jndiName + ", poolName=" + poolName + ", enabled=" + enabled + ", useJavaContext=" +
              useJavaContext + ", pool=" + pool + ", timeOut=" + timeOut + ", validation=" + validation +
-             ", security=" + security + ", noTxSeparatePool=" + noTxSeparatePool + "]";
+             ", security=" + security + "]";
    }
 
 }

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -23,6 +23,7 @@
 
 import org.jboss.jca.common.api.metadata.common.CommonPool;
 import org.jboss.jca.common.api.metadata.common.CommonSecurity;
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
 import org.jboss.jca.common.api.metadata.ds.DataSource;
 import org.jboss.jca.common.api.metadata.ds.DataSources;
 import org.jboss.jca.common.api.metadata.ds.Statement;
@@ -32,7 +33,6 @@
 import org.jboss.jca.common.api.metadata.ds.Validation;
 import org.jboss.jca.common.api.metadata.ds.XaDataSource;
 import org.jboss.jca.common.api.metadata.ds.XaDataSource.Attribute;
-import org.jboss.jca.common.api.metadata.ds.XaPool;
 import org.jboss.jca.common.metadata.AbstractParser;
 import org.jboss.jca.common.metadata.MetadataParser;
 import org.jboss.jca.common.metadata.ParserException;
@@ -171,7 +171,7 @@
       String urlDelimiter = null;
       String urlSelectorStrategyClassName = null;
       String newConnectionSql = null;
-      XaPool xaPool = null;
+      CommonXaPool xaPool = null;
 
       String xaDataSourceClass = null;
 
@@ -422,88 +422,6 @@
       throw new ParserException("Reached end of xml document unexpectedly");
    }
 
-   private XaPool parseXaPool(XMLStreamReader reader) throws XMLStreamException, ParserException
-   {
-      Integer minPoolSize = null;
-      Integer maxPoolSize = null;
-      boolean prefill = false;
-      boolean interleaving = false;
-      boolean isSameRmOverrideValue = false;
-      boolean padXid = false;
-      boolean noTxSeparatePool = false;
-      boolean wrapXaDataSource = false;
-      boolean useStrictMin = false;
-
-      while (reader.hasNext())
-      {
-         switch (reader.nextTag())
-         {
-            case END_ELEMENT : {
-               if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.XA_POOL)
-               {
-
-                  return new XaPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin, isSameRmOverrideValue,
-                                        interleaving, padXid, wrapXaDataSource, noTxSeparatePool);
-
-               }
-               else
-               {
-                  if (XaPool.Tag.forName(reader.getLocalName()) == XaPool.Tag.UNKNOWN)
-                  {
-                     throw new ParserException("unexpected end tag" + reader.getLocalName());
-                  }
-               }
-               break;
-            }
-            case START_ELEMENT : {
-               switch (XaPool.Tag.forName(reader.getLocalName()))
-               {
-                  case MAXPOOLSIZE : {
-                     maxPoolSize = elementAsInteger(reader);
-                     break;
-                  }
-                  case MIN_POOL_SIZE : {
-                     minPoolSize = elementAsInteger(reader);
-                     break;
-                  }
-                  case INTERLEAVING : {
-                     interleaving = elementAsBoolean(reader);
-                     break;
-                  }
-                  case ISSAMERMOVERRIDEVALUE : {
-                     isSameRmOverrideValue = elementAsBoolean(reader);
-                     break;
-                  }
-                  case NO_TX_SEPARATE_POOLS : {
-                     noTxSeparatePool = elementAsBoolean(reader);
-                     break;
-                  }
-                  case PAD_XID : {
-                     padXid = elementAsBoolean(reader);
-                     break;
-                  }
-                  case WRAP_XA_RESOURCE : {
-                     wrapXaDataSource = elementAsBoolean(reader);
-                     break;
-                  }
-                  case PREFILL : {
-                     prefill = elementAsBoolean(reader);
-                     break;
-                  }
-                  case USE_STRICT_MIN : {
-                     useStrictMin = elementAsBoolean(reader);
-                     break;
-                  }
-                  default :
-                     throw new ParserException("Unexpected element:" + reader.getLocalName());
-               }
-               break;
-            }
-         }
-      }
-      throw new ParserException("Reached end of xml document unexpectedly");
-   }
-
    private Validation parseValidationSetting(XMLStreamReader reader) throws XMLStreamException, ParserException
    {
       boolean validateOnMatch = false;

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -22,12 +22,12 @@
 package org.jboss.jca.common.metadata.ds;
 
 import org.jboss.jca.common.api.metadata.common.CommonSecurity;
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
 import org.jboss.jca.common.api.metadata.ds.Statement;
 import org.jboss.jca.common.api.metadata.ds.TimeOut;
 import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
 import org.jboss.jca.common.api.metadata.ds.Validation;
 import org.jboss.jca.common.api.metadata.ds.XaDataSource;
-import org.jboss.jca.common.api.metadata.ds.XaPool;
 
 import java.util.Collections;
 import java.util.HashMap;
@@ -51,7 +51,7 @@
 
    private final String newConnectionSql;
 
-   private final XaPool xaPool;
+   private final CommonXaPool xaPool;
 
    /**
     * Create a new XADataSourceImpl.
@@ -76,7 +76,7 @@
       Statement statement, Validation validation, String urlDelimiter, String urlSelectorStrategyClassName,
       boolean useJavaContext, String poolName, boolean enabled, String jndiName,
       Map<String, String> xaDataSourceProperty, String xaDataSourceClass, String newConnectionSql,
-      XaPool xaPool)
+      CommonXaPool xaPool)
    {
       super(transactionIsolation, timeOut, security, statement, validation, urlDelimiter,
             urlSelectorStrategyClassName, useJavaContext, poolName, enabled, jndiName);
@@ -231,7 +231,7 @@
     * @return the xaPool.
     */
    @Override
-   public final XaPool getXaPool()
+   public final CommonXaPool getXaPool()
    {
       return xaPool;
    }

Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java	2010-09-13 09:16:32 UTC (rev 108121)
@@ -1,179 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jca.common.metadata.ds;
-
-import org.jboss.jca.common.api.metadata.ds.XaPool;
-import org.jboss.jca.common.metadata.common.CommonPoolImpl;
-
-/**
- *
- * A XaPoolImpl.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
-public class XaPoolImpl extends CommonPoolImpl implements XaPool
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 3261597366235425250L;
-
-   private final boolean isSameRmOverride;
-
-   private final boolean interleaving;
-
-   private final boolean padXid;
-
-   private final boolean wrapXaDataSource;
-
-   private final boolean noTxSeparatePool;
-
-
-
-   /**
-    * Create a new XaPoolImpl.
-    *
-    * @param minPoolSize minPoolSize
-    * @param maxPoolSize maxPoolSize
-    * @param prefill prefill
-    * @param useStrictMin useStrictMin
-    * @param isSameRmOverride isSameRmOverride
-    * @param interleaving interleaving
-    * @param padXid padXid
-    * @param wrapXaDataSource wrapXaDataSource
-    * @param noTxSeparatePool noTxSeparatePool
-    */
-   public XaPoolImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, boolean useStrictMin,
-      boolean isSameRmOverride, boolean interleaving, boolean padXid, boolean wrapXaDataSource,
-      boolean noTxSeparatePool)
-   {
-      super(minPoolSize, maxPoolSize, prefill, useStrictMin);
-      this.isSameRmOverride = isSameRmOverride;
-      this.interleaving = interleaving;
-      this.padXid = padXid;
-      this.wrapXaDataSource = wrapXaDataSource;
-      this.noTxSeparatePool = noTxSeparatePool;
-   }
-
-   /**
-    * Get the isSameRmOverride.
-    *
-    * @return the isSameRmOverride.
-    */
-   @Override
-   public final boolean isSameRmOverride()
-   {
-      return isSameRmOverride;
-   }
-
-   /**
-    * Get the interleaving.
-    *
-    * @return the interleaving.
-    */
-   @Override
-   public final boolean isInterleaving()
-   {
-      return interleaving;
-   }
-
-   /**
-    * Get the padXid.
-    *
-    * @return the padXid.
-    */
-   @Override
-   public final boolean isPadXid()
-   {
-      return padXid;
-   }
-
-   /**
-    * Get the wrapXaDataSource.
-    *
-    * @return the wrapXaDataSource.
-    */
-   @Override
-   public final boolean isWrapXaDataSource()
-   {
-      return wrapXaDataSource;
-   }
-
-   /**
-    * Get the noTxSeparatePool.
-    *
-    * @return the noTxSeparatePool.
-    */
-   @Override
-   public final boolean isNoTxSeparatePool()
-   {
-      return noTxSeparatePool;
-   }
-
-   @Override
-   public int hashCode()
-   {
-      final int prime = 31;
-      int result = 1;
-      result = prime * result + (interleaving ? 1231 : 1237);
-      result = prime * result + (isSameRmOverride ? 1231 : 1237);
-      result = prime * result + (noTxSeparatePool ? 1231 : 1237);
-      result = prime * result + (padXid ? 1231 : 1237);
-      result = prime * result + (wrapXaDataSource ? 1231 : 1237);
-      return result;
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj)
-         return true;
-      if (obj == null)
-         return false;
-      if (!(obj instanceof XaPoolImpl))
-         return false;
-      XaPoolImpl other = (XaPoolImpl) obj;
-      if (interleaving != other.interleaving)
-         return false;
-      if (isSameRmOverride != other.isSameRmOverride)
-         return false;
-      if (noTxSeparatePool != other.noTxSeparatePool)
-         return false;
-      if (padXid != other.padXid)
-         return false;
-      if (wrapXaDataSource != other.wrapXaDataSource)
-         return false;
-      return true;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "XaPoolImpl [isSameRmOverride=" + isSameRmOverride + ", interleaving=" + interleaving + ", padXid=" +
-             padXid + ", wrapXaDataSource=" + wrapXaDataSource + ", noTxSeparatePool=" + noTxSeparatePool +
-             ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill +
-             ", useStrictMin=" + useStrictMin + "]";
-   }
-
-
-
-}
-

Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd	2010-09-13 09:16:32 UTC (rev 108121)
@@ -288,25 +288,26 @@
           </xs:documentation>
         </xs:annotation>
       </xs:element>
-      <xs:element name="no-tx-separate-pools" type="boolean-presenceType" minOccurs="0" maxOccurs="1">
-        <xs:annotation>
-          <xs:documentation>
-            <![CDATA[[
-              Whether to use separete pools for connection retrieved in a transaction 
-              and those retieved outside a transaction e.g. <no-tx-separate-pools/>  
-             ]]>
-          </xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1">
-        <xs:annotation>
-          <xs:documentation>
-            <![CDATA[[
-              Specifies pooling settings
-             ]]>
-          </xs:documentation>
-        </xs:annotation>
-      </xs:element>
+      <xs:choice>
+        <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1">
+          <xs:annotation>
+            <xs:documentation>
+                <![CDATA[[
+                  Specifies pooling settings
+                 ]]>
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="xa-pool" type="xa-poolType" minOccurs="0" maxOccurs="1">
+          <xs:annotation>
+            <xs:documentation>
+                <![CDATA[[
+                  Specifies xa-pooling settings
+                 ]]>
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
       <xs:element name="security" type="securityType" minOccurs="0" maxOccurs="1">
         <xs:annotation>
           <xs:documentation>
@@ -384,6 +385,69 @@
       </xs:element>
     </xs:sequence>
   </xs:complexType>
+  
+  <xs:complexType name="xa-poolType">
+    <xs:complexContent>
+      <xs:extension base="poolType">
+        <xs:sequence>
+          <xs:element name="is-same-rm-override" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                  The is-same-rm-override element allows one to unconditionally 
+                  set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns 
+                  true or false. Ex: <is-same-rm-override>true</is-same-rm-override>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="interleaving" type="boolean-presenceType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                  An element to enable interleaving for XA connection factories 
+                  Ex: <interleaving/>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="no-tx-separate-pools" type="boolean-presenceType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                  Oracle does not like XA connections getting used both inside and outside a JTA transaction. 
+                  To workaround the problem you can create separate sub-pools for the different contexts
+                  using <no-tx-separate-pools/>
+                  Ex: <no-tx-separate-pools/>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="pad-xid" type="xs:boolean" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                   Should the Xid be padded
+                   Ex: <pad-xid>true</pad-xid>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="wrap-xa-resource" type="xs:boolean" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                   Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper
+                   instance
+                   Ex: <wrap-xa-resource>true</wrap-xa-resource>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
 
   <xs:complexType name="securityType">
     <xs:sequence>

Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd	2010-09-13 08:39:52 UTC (rev 108120)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd	2010-09-13 09:16:32 UTC (rev 108121)
@@ -313,34 +313,35 @@
 
   <xs:complexType name="connection-defintionType">
     <xs:sequence>
-     <xs:element name="config-property" type="config-propertyType" minOccurs="0" maxOccurs="unbounded">
-       <xs:annotation>
-         <xs:documentation>
-           <![CDATA[[
-             The config-property specifies managed connection factory configuration properties.
-            ]]>
-         </xs:documentation>
-       </xs:annotation>
-     </xs:element>
-      <xs:element name="no-tx-separate-pools" type="boolean-presenceType" minOccurs="0" maxOccurs="1">
+      <xs:element name="config-property" type="config-propertyType" minOccurs="0" maxOccurs="unbounded">
         <xs:annotation>
           <xs:documentation>
             <![CDATA[[
-              Whether to use separete pools for connection retrieved in a transaction 
-              and those retieved outside a transaction e.g. <no-tx-separate-pools/>  
-             ]]>
+             The config-property specifies managed connection factory configuration properties.
+            ]]>
           </xs:documentation>
         </xs:annotation>
       </xs:element>
-      <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1">
-        <xs:annotation>
-          <xs:documentation>
-            <![CDATA[[
-              Specifies pooling settings
-             ]]>
-          </xs:documentation>
-        </xs:annotation>
-      </xs:element>
+      <xs:choice>
+        <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1">
+          <xs:annotation>
+            <xs:documentation>
+                <![CDATA[[
+                  Specifies pooling settings
+                 ]]>
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="xa-pool" type="xa-poolType" minOccurs="0" maxOccurs="1">
+          <xs:annotation>
+            <xs:documentation>
+                <![CDATA[[
+                  Specifies xa-pooling settings
+                 ]]>
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
       <xs:element name="security" type="securityType" minOccurs="0" maxOccurs="1">
         <xs:annotation>
           <xs:documentation>
@@ -417,6 +418,69 @@
         </xs:annotation></xs:element>
     </xs:sequence>
   </xs:complexType>
+  
+  <xs:complexType name="xa-poolType">
+    <xs:complexContent>
+      <xs:extension base="poolType">
+        <xs:sequence>
+          <xs:element name="is-same-rm-override" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                  The is-same-rm-override element allows one to unconditionally 
+                  set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns 
+                  true or false. Ex: <is-same-rm-override>true</is-same-rm-override>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="interleaving" type="boolean-presenceType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                  An element to enable interleaving for XA connection factories 
+                  Ex: <interleaving/>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="no-tx-separate-pools" type="boolean-presenceType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                  Oracle does not like XA connections getting used both inside and outside a JTA transaction. 
+                  To workaround the problem you can create separate sub-pools for the different contexts
+                  using <no-tx-separate-pools/>
+                  Ex: <no-tx-separate-pools/>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="pad-xid" type="xs:boolean" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                   Should the Xid be padded
+                   Ex: <pad-xid>true</pad-xid>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="wrap-xa-resource" type="xs:boolean" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>
+                <![CDATA[[
+                   Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper
+                   instance
+                   Ex: <wrap-xa-resource>true</wrap-xa-resource>
+                 ]]>
+              </xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
 
   <xs:complexType name="securityType">
     <xs:sequence>



More information about the jboss-cvs-commits mailing list