[jboss-cvs] JBossAS SVN: r112342 - in projects/jboss-jca/trunk/as: src and 12 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 13 04:37:26 EDT 2011


Author: jeff.zhang
Date: 2011-10-13 04:37:25 -0400 (Thu, 13 Oct 2011)
New Revision: 112342

Added:
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/AbstractParser.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/CommonXa.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ConnectionFactory.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSource.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSourceConverter.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSources.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DatasourcesImpl.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyDsParser.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyTxDataSourceImpl.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyXaDataSourceImp.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LocalTxDataSource.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/Main.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxConnectionFactory.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxDataSource.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NotSupportedException.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ParserException.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/TxConnectionFactory.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/UnknownTagException.java
   projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/XaDataSource.java
   projects/jboss-jca/trunk/as/src/main/resources/converter.bat
   projects/jboss-jca/trunk/as/src/main/resources/converter.sh
   projects/jboss-jca/trunk/as/src/test/
   projects/jboss-jca/trunk/as/src/test/java/
   projects/jboss-jca/trunk/as/src/test/java/org/
   projects/jboss-jca/trunk/as/src/test/java/org/jboss/
   projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/
   projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/as/
   projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/as/converters/
   projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/as/converters/ParserTestCase.java
   projects/jboss-jca/trunk/as/src/test/resources/
   projects/jboss-jca/trunk/as/src/test/resources/ds/
   projects/jboss-jca/trunk/as/src/test/resources/ds/asapxcess-jb3.2-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/cicsr9s-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/db2-400-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/db2-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/db2-jcc-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/db2-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/derby-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/derby-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/facets-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/fastobjects-jboss32-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/firebird-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/hajndi-jms-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-encrypted-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/informix-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/informix-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/jdatastore-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/jms-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/jsql-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/lido-versant-service.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/msaccess-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-xa-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/progress-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/sapdb-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/sapr3-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/solid-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-ds.xml
   projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-xa-ds.xml
Modified:
   projects/jboss-jca/trunk/as/.classpath
   projects/jboss-jca/trunk/as/build.xml
Log:
[JBJCA-679] converter tool, init commit, support datasource convert

Modified: projects/jboss-jca/trunk/as/.classpath
===================================================================
--- projects/jboss-jca/trunk/as/.classpath	2011-10-13 00:05:18 UTC (rev 112341)
+++ projects/jboss-jca/trunk/as/.classpath	2011-10-13 08:37:25 UTC (rev 112342)
@@ -2,6 +2,8 @@
 <classpath>
 	<classpathentry kind="src" path="src/main/java"/>
 	<classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
+	<classpathentry kind="src" output="eclipse-target/tests-classes" path="src/test/java"/>
+	<classpathentry excluding="**/*.java" kind="src" output="eclipse-target/tests-classes" path="src/test/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/ironjacamar-api"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/ironjacamar-common"/>

Modified: projects/jboss-jca/trunk/as/build.xml
===================================================================
--- projects/jboss-jca/trunk/as/build.xml	2011-10-13 00:05:18 UTC (rev 112341)
+++ projects/jboss-jca/trunk/as/build.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -94,7 +94,126 @@
     </copy>
   </target>
 
+
   <!-- ================================= 
+       Target: test
+       ================================= -->
+  <target name="test" depends="jars, prepare-test">
+    <mkdir dir="${reports.dir}"/>
+    <mkdir dir="${reports.dir}/as"/>
+
+    <junit dir="src/test"
+           printsummary="${junit.printsummary}"
+           haltonerror="${junit.haltonerror}"
+           haltonfailure="${junit.haltonfailure}"
+           fork="${junit.fork}"
+           timeout="${junit.timeout}">
+      
+      <jvmarg line="${junit.jvm.options}"/>
+      <sysproperty key="archives.dir" value="${build.as.dir}"/>
+      <sysproperty key="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
+      <sysproperty key="log4j.defaultInitOverride" value="true"/>
+      <sysproperty key="org.jboss.logging.Logger.pluginClass" value="org.jboss.logging.logmanager.LoggerPluginImpl"/>
+      <sysproperty key="test.dir" value="${test.dir}"/>
+      <sysproperty key="xb.builder.useUnorderedSequence" value="true"/>
+      <sysproperty key="javax.xml.stream.XMLInputFactory" value="com.sun.xml.internal.stream.XMLInputFactoryImpl"/>
+      
+      <classpath>
+        <pathelement location="${build.as.dir}/test"/>
+        <fileset dir="${target.dir}" includes="*.jar"/>
+        <fileset dir="${lib.dir}/common" includes="*.jar" />
+        <fileset dir="${lib.dir}/embedded" includes="*.jar" />
+        <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
+        <fileset dir="${lib.dir}/sjc" includes="*.jar" />
+        <fileset dir="${lib.dir}/test" includes="*.jar" />
+      </classpath>
+      
+      <formatter type="plain"/>
+      <formatter type="xml"/>
+      
+      <batchtest todir="${reports.dir}/as"
+                 haltonerror="${junit.batchtest.haltonerror}"
+                 haltonfailure="${junit.batchtest.haltonfailure}"
+                 fork="${junit.batchtest.fork}">
+        
+        <fileset dir="${build.as.dir}/test">
+          <include name="**/*TestCase.class"/>
+        </fileset>
+      </batchtest>
+
+    </junit>
+    
+  </target>
+
+
+  <!-- ================================= 
+       Target: one-test
+       ================================= -->
+  <target name="one-test" depends="jars, prepare-test">
+    <mkdir dir="${reports.dir}"/>
+    <mkdir dir="${reports.dir}/as"/>
+
+    <junit dir="src/test"
+           printsummary="${junit.printsummary}"
+           haltonerror="${junit.haltonerror}"
+           haltonfailure="${junit.haltonfailure}"
+           fork="${junit.fork}"
+           timeout="${junit.timeout}">
+      
+      <jvmarg line="${junit.jvm.options}"/>
+      <sysproperty key="archives.dir" value="${build.as.dir}"/>
+      <sysproperty key="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
+      <sysproperty key="log4j.defaultInitOverride" value="true"/>
+      <sysproperty key="org.jboss.logging.Logger.pluginClass" value="org.jboss.logging.logmanager.LoggerPluginImpl"/>
+      <sysproperty key="test.dir" value="${test.dir}"/>
+      <sysproperty key="xb.builder.useUnorderedSequence" value="true"/>
+      <sysproperty key="javax.xml.stream.XMLInputFactory" value="com.sun.xml.internal.stream.XMLInputFactoryImpl"/>
+      
+      <classpath>
+        <pathelement location="${build.as.dir}/test"/>
+        <fileset dir="${target.dir}" includes="*.jar"/>
+        <fileset dir="${lib.dir}/common" includes="*.jar" />
+        <fileset dir="${lib.dir}/embedded" includes="*.jar" />
+        <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
+        <fileset dir="${lib.dir}/sjc" includes="*.jar" />
+        <fileset dir="${lib.dir}/test" includes="*.jar" />
+      </classpath>
+      
+      <formatter type="plain"/>
+      <formatter type="xml"/>
+      
+      <test todir="${reports.dir}/as" name="${test}"
+                 haltonerror="${junit.batchtest.haltonerror}"
+                 haltonfailure="${junit.batchtest.haltonfailure}"
+                 fork="${junit.batchtest.fork}"/>
+    </junit>
+  </target>
+
+  <!-- ================================= 
+       Target: prepare-test
+       ================================= -->
+  <target name="prepare-test">
+    <mkdir dir="${build.as.dir}" />
+    <mkdir dir="${build.as.dir}/test" />
+
+    <javac srcdir="src/test"
+           destdir="${build.as.dir}/test"
+           classpathref="test.lib.path.id"
+           debug="${javac.debug}"
+           deprecation="${javac.deprecation}"
+           optimize="${javac.optimize}"
+           includeAntRuntime="false">
+      <compilerarg value="-Xlint"/>
+    </javac> 
+
+    <copy todir="${build.as.dir}/test">
+      <fileset dir="src/test/resources"/>
+    </copy>
+
+
+  </target>
+
+  <!-- ================================= 
        Target: artifacts
        ================================= -->
   <target name="artifacts" depends="jars">

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/AbstractParser.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/AbstractParser.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/AbstractParser.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,320 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.io.File;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+/**
+ *
+ * A AbstractParser.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ * @author Jeff Zhang
+ */
+public abstract class AbstractParser
+{
+   /**
+    * convert an xml element in boolean value. Empty elements results with true (tag presence is sufficient condition)
+    *
+    * @param reader the StAX reader
+    * @return the boolean representing element
+    * @throws XMLStreamException StAX exception
+    * @throws ParserException in case of non valid boolean for given element value
+    */
+   protected Boolean elementAsBoolean(XMLStreamReader reader) throws XMLStreamException, ParserException
+   {
+      String elementtext = rawElementText(reader);
+      String stringValue = getSubstitutionValue(elementtext);
+      if (stringValue == null || stringValue.length() == 0 || stringValue.trim().equalsIgnoreCase("true") ||
+          stringValue.trim().equalsIgnoreCase("false"))
+      {
+
+         return stringValue == null || stringValue.length() == 0 ? true : Boolean.valueOf(stringValue.trim());
+      }
+      else
+      {
+         throw new ParserException(reader.getLocalName());
+      }
+   }
+
+   /**
+    * convert an xml attribute in boolean value. Empty elements results with false
+    *
+    * @param reader the StAX reader
+    * @param attributeName the name of the attribute
+    * @param defaultValue  defaultValue
+    * @return the boolean representing element
+    * @throws XMLStreamException StAX exception
+    * @throws ParserException in case of not valid boolena for given attribute
+    */
+   protected Boolean attributeAsBoolean(XMLStreamReader reader, String attributeName, Boolean defaultValue)
+      throws XMLStreamException, ParserException
+   {
+      String attributeString = rawAttributeText(reader, attributeName);
+      String stringValue = getSubstitutionValue(attributeString);
+      if (stringValue == null || stringValue.length() == 0 || stringValue.trim().equalsIgnoreCase("true") ||
+          stringValue.trim().equalsIgnoreCase("false"))
+      {
+
+         return attributeString == null
+            ? defaultValue :
+            Boolean.valueOf(reader.getAttributeValue("", attributeName).trim());
+      }
+      else
+      {
+         throw new ParserException(reader.getLocalName());
+      }
+   }
+
+   /**
+    * convert an xml element in String value
+    *
+    * @param reader the StAX reader
+    * @return the string representing element
+    * @throws XMLStreamException StAX exception
+    */
+   protected String elementAsString(XMLStreamReader reader) throws XMLStreamException
+   {
+      String elementtext = rawElementText(reader);
+      //return elementtext;
+      return getSubstitutionValue(elementtext);
+   }
+
+   /**
+    * FIXME Comment this
+    *
+    * @param reader
+    * @return the string representing the raw eleemnt text
+    * @throws XMLStreamException
+    */
+   private String rawElementText(XMLStreamReader reader) throws XMLStreamException
+   {
+      String elementtext = reader.getElementText();
+      elementtext = elementtext == null ? null : elementtext.trim();
+      return elementtext;
+   }
+
+   /**
+    * convert an xml element in String value
+    *
+    * @param reader the StAX reader
+    * @param attributeName the name of the attribute
+    * @return the string representing element
+    * @throws XMLStreamException StAX exception
+    */
+   protected String attributeAsString(XMLStreamReader reader, String attributeName) throws XMLStreamException
+   {
+      String attributeString = rawAttributeText(reader, attributeName);
+      return getSubstitutionValue(attributeString);
+   }
+
+   /**
+    * convert an xml element in String value
+    *
+    * @param reader the StAX reader
+    * @param attributeName the name of the attribute
+    * @return the string representing element
+    * @throws XMLStreamException StAX exception
+    */
+   protected Integer attributeAsInt(XMLStreamReader reader, String attributeName) throws XMLStreamException
+   {
+      String attributeString = getSubstitutionValue(rawAttributeText(reader, attributeName));
+      return attributeString != null ? Integer.valueOf(getSubstitutionValue(attributeString)) : null;
+   }
+
+   /**
+    * FIXME Comment this
+    *
+    * @param reader
+    * @param attributeName
+    * @return the string representing raw attribute textx
+    */
+   private String rawAttributeText(XMLStreamReader reader, String attributeName)
+   {
+      String attributeString = reader.getAttributeValue("", attributeName) == null ? null : reader.getAttributeValue(
+         "", attributeName)
+            .trim();
+      return attributeString;
+   }
+
+   /**
+    * convert an xml element in Integer value
+    *
+    * @param reader the StAX reader
+    * @return the integer representing element
+    * @throws XMLStreamException StAX exception
+    * @throws ParserException in case it isn't a number
+    */
+   protected Integer elementAsInteger(XMLStreamReader reader) throws XMLStreamException, ParserException
+   {
+      Integer integerValue;
+      integerValue = null;
+      String elementtext = rawElementText(reader);
+      try
+      {
+         integerValue = Integer.valueOf(getSubstitutionValue(elementtext));
+      }
+      catch (NumberFormatException nfe)
+      {
+         throw new ParserException(reader.getLocalName());
+      }
+      return integerValue;
+   }
+
+   /**
+    * convert an xml element in Long value
+    *
+    * @param reader the StAX reader
+    * @return the long representing element
+    * @throws XMLStreamException StAX exception
+    * @throws ParserException in case it isn't a number
+    */
+   protected Long elementAsLong(XMLStreamReader reader) throws XMLStreamException, ParserException
+   {
+      Long longValue;
+      longValue = null;
+      String elementtext = rawElementText(reader);
+
+      try
+      {
+         longValue = Long.valueOf(getSubstitutionValue(elementtext));
+      }
+      catch (NumberFormatException nfe)
+      {
+         throw new ParserException(reader.getLocalName());
+      }
+
+      return longValue;
+   }
+
+   /**
+    * System property substitution
+    * @param input The input string
+    * @return The output
+    */
+   private String getSubstitutionValue(String input) throws XMLStreamException
+   {
+      if (input == null || input.trim().equals(""))
+         return input;
+      while ((input.indexOf("${")) != -1)
+      {
+         int from = input.indexOf("${");
+         int to = input.indexOf("}");
+         int dv = input.indexOf(":", from + 2);
+
+         if (dv != -1)
+         {
+            if (dv > to)
+               dv = -1;
+         }
+
+         String systemProperty = "";
+         String defaultValue = "";
+         String s = input.substring(from + 2, to);
+         if (dv == -1)
+         {
+            if ("/".equals(s))
+            {
+               systemProperty = File.separator;
+            }
+            else if (":".equals(s))
+            {
+               systemProperty = File.pathSeparator;
+            }
+            else
+            {
+               systemProperty = SecurityActions.getSystemProperty(s);
+            }
+         }
+         else
+         {
+            s = input.substring(from + 2, dv);
+            systemProperty = SecurityActions.getSystemProperty(s);
+            defaultValue = input.substring(dv + 1, to);
+         }
+         String prefix = "";
+         String postfix = "";
+
+         if (from != 0)
+         {
+            prefix = input.substring(0, from);
+         }
+
+         if (to + 1 < input.length() - 1)
+         {
+            postfix = input.substring(to + 1);
+         }
+
+         if (systemProperty != null && !systemProperty.trim().equals(""))
+         {
+            input = prefix + systemProperty + postfix;
+         }
+         else if (defaultValue != null && !defaultValue.trim().equals(""))
+         {
+            input = prefix + defaultValue + postfix;
+         }
+         else
+         {
+            input = prefix + postfix;
+         }
+      }
+      return input;
+   }
+
+   private static class SecurityActions
+   {
+      /**
+       * Constructor
+       */
+      private SecurityActions()
+      {
+      }
+
+      /**
+       * Get a system property
+       * @param name The property name
+       * @return The property value
+       */
+      static String getSystemProperty(final String name)
+      {
+         if (System.getSecurityManager() == null)
+         {
+            return System.getProperty(name);
+         }
+         else
+         {
+            return (String) AccessController.doPrivileged(new PrivilegedAction<Object>()
+            {
+               public Object run()
+               {
+                  return System.getProperty(name);
+               }
+            });
+         }
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/CommonXa.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/CommonXa.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/CommonXa.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A CommonXa.
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface CommonXa
+{
+   /**
+    * Get the TrackConnectionByTx.
+    *
+    * @return the TrackConnectionByTx.
+    */
+   public Boolean isTrackConnectionByTx();
+
+   /**
+    * Get the noTxSeparatePools.
+    *
+    * @return the noTxSeparatePools.
+    */
+   public Boolean isNoTxSeparatePools();
+   
+   /**
+    * Get the xaResourceTimeout.
+    *
+    * @return the xaResourceTimeout.
+    */
+   public Integer getXaResourceTimeout();
+   
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag
+   {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+
+      /**
+      * xaDatasourceProperty tag
+      */
+      TRACK_CONNECTION_BY_TX("track_connection-by_tx"),
+      /**
+      * xaDatasourceClass tag
+      */
+      NO_TX_SEPARATE_POOLS("no-tx-separate-pools"),
+      /**
+      * XaResourceTimeout tag
+      */
+      XA_RESOURCE_TIMEOUT("xa-resource-timeout");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ConnectionFactory.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,236 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Common ConnectionFactory
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface ConnectionFactory
+{
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   public String getJndiName();
+
+   /**
+    *
+    * get the security domain for pure security-domain security management
+    *
+    * @return the security-domain to use
+    */
+   public String getSecurityDomain();
+
+   /**
+    * Get the minPoolSize.
+    *
+    * @return the minPoolSize.
+    */
+   public Integer getMinPoolSize();
+
+   /**
+    * Get the maxPoolSize.
+    *
+    * @return the maxPoolSize.
+    */
+   public Integer getMaxPoolSize();
+
+   /**
+    * Get the blockingTimeoutMillis.
+    *
+    * @return the blockingTimeoutMillis.
+    */
+   public Long getBlockingTimeoutMillis();
+
+   /**
+    * Get the backgroundValidation.
+    *
+    * @return the backgroundValidation.
+    */
+   public Boolean isBackgroundValidation();
+
+   /**
+    * Get the backgroundValidationMillis.
+    *
+    * @return the backgroundValidationMillis.
+    */
+   public Long getBackgroundValidationMillis();
+
+   /**
+    * Get the idleTimeoutMinutes.
+    *
+    * @return the idleTimeoutMinutes.
+    */
+   public Long getIdleTimeoutMinutes();
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   public Integer getAllocationRetry();
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   public Long getAllocationRetryWaitMillis();
+
+   /**
+    * Get the prefill.
+    *
+    * @return the prefill.
+    */
+   public Boolean isPrefill();
+
+   /**
+    * Get the useFastFail.
+    *
+    * @return the useFastFail.
+    */
+   public Boolean isUseFastFail();
+
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSource.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSource.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSource.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,426 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import org.jboss.jca.common.api.metadata.common.Extension;
+import org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Common DataSource
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface DataSource
+{
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   public String getJndiName();
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   public Boolean isUseJavaContext();
+
+   /**
+    * Get the urlDelimiter.
+    *
+    * @return the urlDelimiter.
+    */
+   public String getUrlDelimiter();
+
+   /**
+    * Get the urlSelectorStrategyClassName.
+    *
+    * @return the urlSelectorStrategyClassName.
+    */
+   public String getUrlSelectorStrategyClassName();
+
+   /**
+    * Get the userName.
+    *
+    * @return the userName.
+    */
+   public String getUserName();
+
+   /**
+    * Get the password.
+    *
+    * @return the password.
+    */
+   public String getPassword();
+
+   /**
+    *
+    * get the security domain for pure security-domain security management
+    *
+    * @return the security-domain to use
+    */
+   public String getSecurityDomain();
+
+   /**
+    * Get the minPoolSize.
+    *
+    * @return the minPoolSize.
+    */
+   public Integer getMinPoolSize();
+
+   /**
+    * Get the maxPoolSize.
+    *
+    * @return the maxPoolSize.
+    */
+   public Integer getMaxPoolSize();
+
+   /**
+    * Get the blockingTimeoutMillis.
+    *
+    * @return the blockingTimeoutMillis.
+    */
+   public Long getBlockingTimeoutMillis();
+
+   /**
+    * Get the backgroundValidation.
+    *
+    * @return the backgroundValidation.
+    */
+   public Boolean isBackgroundValidation();
+
+   /**
+    * Get the backgroundValidationMillis.
+    *
+    * @return the backgroundValidationMillis.
+    */
+   public Long getBackgroundValidationMillis();
+
+   /**
+    * Get the idleTimeoutMinutes.
+    *
+    * @return the idleTimeoutMinutes.
+    */
+   public Long getIdleTimeoutMinutes();
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   public Integer getAllocationRetry();
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   public Long getAllocationRetryWaitMillis();
+
+   /**
+    * Get the validateOnMatch.
+    *
+    * @return the validateOnMatch.
+    */
+   public Boolean isValidateOnMatch();
+
+   /**
+    * Get the newConnectionSql.
+    *
+    * @return the newConnectionSql.
+    */
+   public String getNewConnectionSql();
+
+   /**
+    * Get the checkValidConnectionSql.
+    *
+    * @return the checkValidConnectionSql.
+    */
+   public String getCheckValidConnectionSql();
+
+   /**
+    * Get the validConnectionChecker
+    *
+    * @return the validConnectionChecker
+    */
+   public Extension getValidConnectionChecker();
+
+   /**
+    * Get the exceptionSorter
+    *
+    * @return the exceptionSorter
+    */
+   public Extension getExceptionSorter();
+
+   /**
+    * Get the staleConnectionChecker
+    *
+    * @return the staleConnectionChecker
+    */
+   public Extension getStaleConnectionChecker();
+
+   /**
+    * Get the trackStatements.
+    *
+    * @return the trackStatements.
+    */
+   public TrackStatementsEnum getTrackStatements();
+
+   /**
+    * Get the prefill.
+    *
+    * @return the prefill.
+    */
+   public Boolean isPrefill();
+
+   /**
+    * Get the useFastFail.
+    *
+    * @return the useFastFail.
+    */
+   public Boolean isUseFastFail();
+
+   /**
+    * Get the preparedStatementsCacheSize.
+    *
+    * @return the preparedStatementsCacheSize.
+    */
+   public Long getPreparedStatementsCacheSize();
+
+   /**
+    * Get the sharePreparedStatements.
+    *
+    * @return the sharePreparedStatements.
+    */
+   public Boolean isSharePreparedStatements();
+
+   /**
+    * Get the setTxQuertTimeout.
+    *
+    * @return the setTxQuertTimeout.
+    */
+   public Boolean isSetTxQueryTimeout();
+
+   /**
+    * Get the queryTimeout.
+    *
+    * @return the queryTimeout.
+    */
+   public Long getQueryTimeout();
+
+   /**
+    * Get the useTryLock.
+    *
+    * @return the useTryLock.
+    */
+   public Long getUseTryLock();
+
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+       * use-java-context tag
+      */
+      USE_JAVA_CONTEXT("use-java-context"),
+      /**
+       * urlDelimiter tag
+       */
+      URL_DELIMITER("url-delimiter"),
+      /**
+       * urlSelectorStrategyClassName tag
+       */
+      URL_SELECTOR_STRATEGY_CLASS_NAME("url-selector-strategy-class-name"),
+      /**
+       * userName tag
+       */
+      USER_NAME("user-name"),
+      /**
+      * password tag
+      */
+      PASSWORD("password"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+       * validateOnMatch tag
+       */
+      VALIDATE_ON_MATCH("validate-on-match"),
+      /**
+       * newConnectionSql tag
+       */
+      NEW_CONNECTION_SQL("new-connection-sql"),
+      /**
+       * checkValidConnectionSql tag
+       */
+      CHECK_VALID_CONNECTION_SQL("check-valid-connection-sql"),
+      /**
+       * validConnectionCheckerClassName tag
+       */
+      VALID_CONNECTION_CHECKER("valid-connection-checker"),
+      /**
+       * exceptionSorterClassName tag
+       */
+      EXCEPTION_SORTER("exception-sorter"),
+      /**
+       * staleConnectionCheckerClassName tag
+       */
+      STALE_CONNECTION_CHECKER("stale-connection-checker"),
+      /**
+       * trackStatements tag
+       */
+      TRACK_STATEMENTS("track-statements"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail"),
+      /**
+       * preparedStatementCacheSize tag
+       */
+      PREPARED_STATEMENT_CACHE_SIZE("prepared-statement-cache-size"),
+      /**
+      * sharePreparedStatements tag
+      */
+      SHARE_PREPARED_STATEMENTS("share-prepared-statements"),
+      /**
+       * setTxQueryTimeout tag
+       */
+      SET_TX_QUERY_TIMEOUT("set-tx-query-timeout"),
+      /**
+       * queryTimeout tag
+       */
+      QUERY_TIMEOUT("query-timeout"),
+      /**
+      * useTryLock tag
+      */
+      USE_TRY_LOCK("use-try-lock");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSourceConverter.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSourceConverter.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSourceConverter.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+/**
+ * DataSourceConverter
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class DataSourceConverter
+{
+   private DataSources dss;
+   public DataSourceConverter(DataSources dss)
+   {
+      this.dss = dss;
+   }
+   
+   public String convert()
+   {
+      return dss.toString();
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSources.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSources.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DataSources.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * DataSources
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface DataSources
+{
+   /**
+    * Get the local tx datasource.
+    *
+    * @return the local tx datasource.
+    */
+   public List<LocalTxDataSource> getLocalTxDataSource();
+
+   /**
+    * Get the No Tx datasource.
+    *
+    * @return the NoTx datasource.
+    */
+   public List<NoTxDataSource> getNoTxDataSource();
+
+   /**
+    * Get the xaDataSource.
+    *
+    * @return the xaDataSource.
+    */
+   public List<XaDataSource> getXaDataSource();
+
+   /**
+    * Get the TxConnectionFactory
+    *
+    * @return the list of TxConnectionFactory
+    */
+   public List<TxConnectionFactory> getTxConnectionFactory();
+
+   /**
+    * Get the NoTxConnectionFactory
+    *
+    * @return the list of NoTxConnectionFactory
+    */
+   public List<NoTxConnectionFactory> getNoTxConnectionFactory();
+
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+       * no-tx-datasource tag
+       */
+      NO_TX_DATASOURCE("no-tx-datasource"),
+
+      /**
+       * no-tx-datasource tag
+       */
+      LOCAL_TX_DATASOURCE("local-tx-datasource"),
+      
+      /**
+       * xa-datasource tag
+       */
+      XA_DATASOURCE("xa-datasource"),
+
+      /**
+       * tx-connection-factory tag
+       */
+      TX_CONNECTION_FACTORY("tx-connection-factory"),
+
+      /**
+       * no-tx-connection-factory tag
+       */
+      NO_TX_CONNECTION_FACTORY("no-tx-connection-factory");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DatasourcesImpl.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DatasourcesImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/DatasourcesImpl.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.List;
+
+/**
+ * A XaDataSource impl.
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class DatasourcesImpl implements DataSources
+{
+   
+   List<NoTxDataSource> noTxDatasource;
+   List<LocalTxDataSource> localTxDatasource;
+   List<XaDataSource> xaDataSource;
+
+   public DatasourcesImpl(
+         List<NoTxDataSource> noTxDatasource,
+         List<LocalTxDataSource> localTxDatasource,
+         List<XaDataSource> xaDataSource)
+   {
+      this.noTxDatasource = noTxDatasource;
+      this.localTxDatasource = localTxDatasource;
+      this.xaDataSource = xaDataSource;
+   }
+   
+   @Override
+   public String toString()
+   {
+      StringBuilder out = new StringBuilder();
+      out.append("<datasources>\n");
+      for (DataSource ds : noTxDatasource)
+      {
+         
+         out.append(ds.toString());
+      }
+      for (DataSource ds : localTxDatasource)
+      {
+         out.append(ds.toString());
+      }
+      for (DataSource ds : xaDataSource)
+      {
+         out.append(ds.toString());
+      }
+      out.append("\n</datasources>\n");
+      return out.toString();
+   }
+
+   @Override
+   public List<LocalTxDataSource> getLocalTxDataSource()
+   {
+      return localTxDatasource;
+   }
+
+   @Override
+   public List<NoTxDataSource> getNoTxDataSource()
+   {
+      return noTxDatasource;
+   }
+
+   @Override
+   public List<XaDataSource> getXaDataSource()
+   {
+      return xaDataSource;
+   }
+
+   @Override
+   public List<TxConnectionFactory> getTxConnectionFactory()
+   {
+      return null;
+   }
+
+   @Override
+   public List<NoTxConnectionFactory> getNoTxConnectionFactory()
+   {
+      return null;
+   }
+
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyDsParser.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyDsParser.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyDsParser.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,710 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import org.jboss.jca.common.api.metadata.Defaults;
+import org.jboss.jca.common.api.metadata.common.Extension;
+import org.jboss.jca.common.api.metadata.common.FlushStrategy;
+import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
+import org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum;
+
+import static javax.xml.stream.XMLStreamConstants.CHARACTERS;
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Parser for legacy ds.xml
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class LegacyDsParser extends AbstractParser
+{
+   private static Logger log = Logger.getLogger(LegacyDsParser.class);
+   
+   public DataSources parse(InputStream xmlInputStream) throws Exception
+   {
+      XMLStreamReader reader = null;
+
+      XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+      reader = inputFactory.createXMLStreamReader(xmlInputStream);
+      try
+      {
+         return parse(reader);
+      }
+      finally
+      {
+         if (reader != null)
+            reader.close();
+      }
+   }
+
+   private void skipParse(XMLStreamReader reader) throws Exception
+   {
+      int level = 1;
+      while (reader.hasNext() && level > 0)
+      {
+         switch (reader.next()) {
+            case END_ELEMENT : {
+               level--;
+               break;
+            }
+            case START_ELEMENT : {
+               level++;
+               break;
+            }
+         }
+      }
+      log.info("Skip parse " + reader.getLocalName());
+   }
+   
+
+   private void notSupport(XMLStreamReader reader) throws Exception
+   {
+      log.info("So far not support " + reader.getLocalName());
+   }
+
+   private DataSources parse(XMLStreamReader reader) throws Exception
+   {
+
+      DataSources dataSources = null;
+
+      //iterate over tags
+      int iterate;
+      try
+      {
+         iterate = reader.nextTag();
+      }
+      catch (XMLStreamException e)
+      {
+         //founding a non tag..go on. Normally non-tag found at beginning are comments or DTD declaration
+         iterate = reader.nextTag();
+      }
+      switch (iterate)
+      {
+         case END_ELEMENT : {
+            // should mean we're done, so ignore it.
+            break;
+         }
+         case START_ELEMENT : {
+
+            switch (Tag.forName(reader.getLocalName()))
+            {
+               case DATASOURCES : {
+                  dataSources = parseDataSources(reader);
+                  break;
+               }
+               case CONNECTION_FACTORIES : {
+                  //throw new NotSupportedException();
+                  notSupport(reader);
+                  return null;
+               }
+               default :
+                  throw new UnknownTagException(reader.getLocalName());
+            }
+            break;
+         }
+         default :
+            throw new IllegalStateException();
+      }
+
+      return dataSources;
+
+   }
+
+   private DataSources parseDataSources(XMLStreamReader reader) throws Exception
+   {
+      ArrayList<NoTxDataSource> noTxDatasource = new ArrayList<NoTxDataSource>();
+      ArrayList<LocalTxDataSource> localTxDatasource = new ArrayList<LocalTxDataSource>();
+      ArrayList<XaDataSource> xaDataSource = new ArrayList<XaDataSource>();
+
+      while (reader.hasNext())
+      {
+         switch (reader.nextTag())
+         {
+            case END_ELEMENT : {
+               if (Tag.forName(reader.getLocalName()) == Tag.DATASOURCES)
+               {
+                  return new DatasourcesImpl(noTxDatasource, localTxDatasource, xaDataSource);
+               }
+               else
+               {
+                  if (DataSources.Tag.forName(reader.getLocalName()) == DataSources.Tag.UNKNOWN)
+                  {
+                     throw new UnknownTagException(reader.getLocalName());
+                  }
+               }
+               break;
+            }
+            case START_ELEMENT : {
+               switch (DataSources.Tag.forName(reader.getLocalName()))
+               {
+                  case NO_TX_DATASOURCE : {
+                     noTxDatasource.add(parseLocalTxDataSource(reader));
+                     break;
+                  }
+                  case LOCAL_TX_DATASOURCE : {
+                     localTxDatasource.add(parseLocalTxDataSource(reader));
+                     break;
+                  }
+                  case XA_DATASOURCE : {
+                     xaDataSource.add(parseXADataSource(reader));
+                     break;
+                  }
+                  default :
+                     skipParse(reader);
+               }
+               break;
+            }
+         }
+      }
+      throw new ParserException(reader.getLocalName());
+   }
+
+   private XaDataSource parseXADataSource(XMLStreamReader reader) throws Exception
+   {
+      Map<String, String> xaDataSourceProperty = new HashMap<String, String>();
+
+      String urlDelimiter = null;
+      String urlSelectorStrategyClassName = null;
+      String newConnectionSql = null;
+      
+      //String driverClass = null;
+      String driver = null;
+      
+      String xaDataSourceClass = null;
+
+      Boolean useJavaContext = Defaults.USE_JAVA_CONTEXT;
+      String poolName = null;
+      Boolean enabled = Defaults.ENABLED;
+      String jndiName = null;
+      Boolean spy = Defaults.SPY;
+      Boolean useCcm = Defaults.USE_CCM;
+      
+      Boolean jta = Defaults.JTA;
+      String userName = null;
+      String password = null;
+      
+      Integer minPoolSize = null;
+      Integer maxPoolSize = null;
+      Boolean prefill = Defaults.PREFILL;
+      
+      Long blockingTimeoutMillis = null;
+      Long idleTimeoutMinutes = null;
+      Boolean setTxQueryTimeout = Defaults.SET_TX_QUERY_TIMEOUT;
+      Long queryTimeout = null;
+      Integer allocationRetry = null;
+      Long allocationRetryWaitMillis = null;
+      Long useTryLock = null;
+      Integer xaResourceTimeout = null;
+      
+      Long preparedStatementsCacheSize = null;
+      Boolean sharePreparedStatements = Defaults.SHARE_PREPARED_STATEMENTS;
+      TrackStatementsEnum trackStatements = TrackStatementsEnum.FALSE;
+      
+      TransactionIsolation transactionIsolation = TransactionIsolation.TRANSACTION_NONE;
+      String securityDomain = ""; //TODO
+      Extension reauthPlugin = null;
+      
+      Boolean backgroundValidation = Defaults.BACKGROUND_VALIDATION;
+      Long backgroundValidationMillis = null;
+      Boolean useFastFail = Defaults.USE_FAST_FAIL;
+      Extension validConnectionChecker = null;
+      String checkValidConnectionSql = null;
+      Boolean validateOnMatch = Defaults.VALIDATE_ON_MATCH;
+      Extension staleConnectionChecker = null;
+      Extension exceptionSorter = null;
+      
+      Boolean useStrictMin = Defaults.USE_STRICT_MIN;
+      FlushStrategy flushStrategy = Defaults.FLUSH_STRATEGY;
+      
+      //elements reading
+      while (reader.hasNext())
+      {
+         switch (reader.nextTag())
+         {
+            case END_ELEMENT : {
+               if (DataSources.Tag.forName(reader.getLocalName()) == DataSources.Tag.XA_DATASOURCE)
+               {
+                  LegacyXaDataSourceImp xaDsImpl = new LegacyXaDataSourceImp(xaDataSourceClass,
+                        driver, transactionIsolation, xaDataSourceProperty);
+                  xaDsImpl.buildTimeOut(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry, 
+                        allocationRetryWaitMillis, xaResourceTimeout, setTxQueryTimeout, queryTimeout, useTryLock);
+                  xaDsImpl.buildDsSecurity(userName, password, securityDomain, reauthPlugin);
+                  xaDsImpl.buildStatement(sharePreparedStatements, preparedStatementsCacheSize, trackStatements);
+                  xaDsImpl.buildValidation(backgroundValidation, backgroundValidationMillis, useFastFail, 
+                        validConnectionChecker, checkValidConnectionSql, validateOnMatch, staleConnectionChecker, 
+                        exceptionSorter);
+                  xaDsImpl.buildCommonPool(minPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy);
+                  xaDsImpl.buildOther(urlDelimiter, urlSelectorStrategyClassName, newConnectionSql, useJavaContext, 
+                        poolName, enabled, jndiName, spy, useCcm, jta);
+                  xaDsImpl.buildXaDataSourceImpl();
+                  return xaDsImpl;
+               }
+               else
+               {
+                  if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.UNKNOWN)
+                  {
+                     throw new UnknownTagException(reader.getLocalName());
+                  }
+               }
+               break;
+            }
+            case START_ELEMENT : {
+               switch (XaDataSource.Tag.forName(reader.getLocalName()))
+               {
+                  case XA_DATASOURCE_PROPERTY : {
+                     xaDataSourceProperty.put(attributeAsString(reader, "name"), elementAsString(reader));
+                     break;
+                  }
+                  case XA_DATASOURCE_CLASS : {
+                     xaDataSourceClass = elementAsString(reader);
+                     break;
+                  }
+                  case NEW_CONNECTION_SQL : {
+                     newConnectionSql = elementAsString(reader);
+                     break;
+                  }
+                  case URL_DELIMITER : {
+                     urlDelimiter = elementAsString(reader);
+                     break;
+                  }
+                  case URL_SELECTOR_STRATEGY_CLASS_NAME : {
+                     urlSelectorStrategyClassName = elementAsString(reader);
+                     break;
+                  }
+                  case TRANSACTION_ISOLATION : {
+                     transactionIsolation = TransactionIsolation.valueOf(elementAsString(reader));
+                     break;
+                  }
+
+                  case JNDI_NAME : {
+                     jndiName = elementAsString(reader);
+                     poolName = jndiName;
+                     break;
+                  }
+                  case USE_JAVA_CONTEXT : {
+                     useJavaContext = elementAsBoolean(reader);
+                     break;
+                  }
+                  case PASSWORD : {
+                     password = elementAsString(reader);
+                     break;
+                  }
+                  case USER_NAME : {
+                     userName = elementAsString(reader);
+                     break;
+                  }
+                  case MAX_POOL_SIZE : {
+                     maxPoolSize = elementAsInteger(reader);
+                     break;
+                  }
+                  case MIN_POOL_SIZE : {
+                     minPoolSize = elementAsInteger(reader);
+                     break;
+                  }
+                  case PREFILL : {
+                     prefill = elementAsBoolean(reader);
+                     break;
+                  }
+                  case ALLOCATION_RETRY : {
+                     allocationRetry = elementAsInteger(reader);
+                     break;
+                  }
+                  case ALLOCATION_RETRY_WAIT_MILLIS : {
+                     allocationRetryWaitMillis = elementAsLong(reader);
+                     break;
+                  }
+                  case BLOCKING_TIMEOUT_MILLIS : {
+                     blockingTimeoutMillis = elementAsLong(reader);
+                     break;
+                  }
+                  case IDLE_TIMEOUT_MINUTES : {
+                     idleTimeoutMinutes = elementAsLong(reader);
+                     break;
+                  }
+                  case QUERY_TIMEOUT : {
+                     queryTimeout = elementAsLong(reader);
+                     break;
+                  }
+                  case SET_TX_QUERY_TIMEOUT : {
+                     setTxQueryTimeout = elementAsBoolean(reader);
+                     break;
+                  }
+                  case USE_TRY_LOCK : {
+                     useTryLock = elementAsLong(reader);
+                     break;
+                  }
+                  case XA_RESOURCE_TIMEOUT : {
+                     xaResourceTimeout = elementAsInteger(reader);
+                     break;
+                  }
+                  case PREPARED_STATEMENT_CACHE_SIZE : {
+                     preparedStatementsCacheSize = elementAsLong(reader);
+                     break;
+                  }
+                  case TRACK_STATEMENTS : {
+                     trackStatements = TrackStatementsEnum.TRUE;
+                     break;
+                  }
+                  case SHARE_PREPARED_STATEMENTS : {
+                     sharePreparedStatements = elementAsBoolean(reader);
+                     break;
+                  }
+                  case BACKGROUND_VALIDATION : {
+                     backgroundValidation = elementAsBoolean(reader);
+                     break;
+                  }
+                  case BACKGROUND_VALIDATION_MILLIS : {
+                     backgroundValidationMillis = elementAsLong(reader);
+                     break;
+                  }
+                  case CHECK_VALID_CONNECTION_SQL : {
+                     checkValidConnectionSql = elementAsString(reader);
+                     break;
+                  }
+                  case USE_FAST_FAIL : {
+                     useFastFail = elementAsBoolean(reader);
+                     break;
+                  }
+                  case VALIDATE_ON_MATCH : {
+                     validateOnMatch = elementAsBoolean(reader);
+                     break;
+                  }
+                  default :
+                     skipParse(reader);
+
+               }
+               break;
+            }
+            case CHARACTERS : {
+               break;
+            }
+         }
+      }
+      throw new ParserException();
+   }
+
+   private LocalTxDataSource parseLocalTxDataSource(XMLStreamReader reader) throws Exception
+   {
+      String connectionUrl = null;
+      String driverClass = null;
+      String dataSourceClass = null;
+      String driver = null;
+      //TransactionIsolation transactionIsolation = null;
+      Map<String, String> connectionProperties = new HashMap<String, String>();
+
+      String urlDelimiter = null;
+      String urlSelectorStrategyClassName = null;
+      String newConnectionSql = null;
+      //CommonPool pool = null;
+
+      //attributes reading
+      Boolean useJavaContext = Defaults.USE_JAVA_CONTEXT;
+      String poolName = null;
+      Boolean enabled = Defaults.ENABLED;
+      String jndiName = null;
+      Boolean spy = Defaults.SPY;
+      Boolean useCcm = Defaults.USE_CCM;
+      Boolean jta = Defaults.JTA;
+      String userName = null;
+      String password = null;
+      
+      Integer minPoolSize = null;
+      Integer maxPoolSize = null;
+      Boolean prefill = Defaults.PREFILL;
+      
+      Long blockingTimeoutMillis = null;
+      Long idleTimeoutMinutes = null;
+      Long queryTimeout = null;
+      Integer allocationRetry = null;
+      Long allocationRetryWaitMillis = null;
+      Long useTryLock = null;
+      Integer xaResourceTimeout = null;
+      
+      Long preparedStatementsCacheSize = null;
+      Boolean sharePreparedStatements = Defaults.SHARE_PREPARED_STATEMENTS;
+      TrackStatementsEnum trackStatements = TrackStatementsEnum.FALSE;
+      Boolean setTxQueryTimeout = Defaults.SET_TX_QUERY_TIMEOUT;
+      
+      TransactionIsolation transactionIsolation = TransactionIsolation.TRANSACTION_NONE;
+      String securityDomain = ""; //TODO
+      Extension reauthPlugin = null;
+      
+      Boolean backgroundValidation = Defaults.BACKGROUND_VALIDATION;
+      Long backgroundValidationMillis = null;
+      Boolean useFastFail = Defaults.USE_FAST_FAIL;
+      Extension validConnectionChecker = null;
+      String checkValidConnectionSql = null;
+      Boolean validateOnMatch = Defaults.VALIDATE_ON_MATCH;
+      Extension staleConnectionChecker = null;
+      Extension exceptionSorter = null;
+      
+      Boolean useStrictMin = Defaults.USE_STRICT_MIN;
+      FlushStrategy flushStrategy = Defaults.FLUSH_STRATEGY;
+      
+      //elements reading
+      while (reader.hasNext())
+      {
+         switch (reader.nextTag())
+         {
+            case END_ELEMENT : {
+               if (DataSources.Tag.forName(reader.getLocalName()) == DataSources.Tag.LOCAL_TX_DATASOURCE)
+               {
+                  LegacyTxDataSourceImpl txDsImpl = new LegacyTxDataSourceImpl(connectionUrl, 
+                        driverClass, dataSourceClass, driver, transactionIsolation, connectionProperties);
+                  txDsImpl.buildTimeOut(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry, 
+                        allocationRetryWaitMillis, xaResourceTimeout, setTxQueryTimeout, queryTimeout, useTryLock);
+                  txDsImpl.buildDsSecurity(userName, password, securityDomain, reauthPlugin);
+                  txDsImpl.buildStatement(sharePreparedStatements, preparedStatementsCacheSize, trackStatements);
+                  txDsImpl.buildValidation(backgroundValidation, backgroundValidationMillis, useFastFail, 
+                        validConnectionChecker, checkValidConnectionSql, validateOnMatch, staleConnectionChecker, 
+                        exceptionSorter);
+                  txDsImpl.buildCommonPool(minPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy);
+                  txDsImpl.buildOther(urlDelimiter, urlSelectorStrategyClassName, newConnectionSql, useJavaContext, 
+                        poolName, enabled, jndiName, spy, useCcm, jta);
+                  txDsImpl.buildDataSourceImpl();
+                  return txDsImpl;
+               }
+               else
+               {
+                  if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.UNKNOWN)
+                  {
+                     throw new UnknownTagException(reader.getLocalName());
+                  }
+               }
+               break;
+            }
+            case START_ELEMENT : {
+               switch (LocalTxDataSource.Tag.forName(reader.getLocalName()))
+               {
+                  case CONNECTION_PROPERTY : {
+                     connectionProperties.put(attributeAsString(reader, "name"), elementAsString(reader));
+                     break;
+                  }
+                  case CONNECTION_URL : {
+                     connectionUrl = elementAsString(reader);
+                     break;
+                  }
+                  case DRIVER_CLASS : {
+                     driverClass = elementAsString(reader);
+                     break;
+                  }
+                  case NEW_CONNECTION_SQL : {
+                     newConnectionSql = elementAsString(reader);
+                     break;
+                  }
+                  case URL_DELIMITER : {
+                     urlDelimiter = elementAsString(reader);
+                     break;
+                  }
+                  case URL_SELECTOR_STRATEGY_CLASS_NAME : {
+                     urlSelectorStrategyClassName = elementAsString(reader);
+                     break;
+                  }
+                  case TRANSACTION_ISOLATION : {
+                     transactionIsolation = TransactionIsolation.valueOf(elementAsString(reader));
+                     break;
+                  }
+                  case JNDI_NAME : {
+                     jndiName = elementAsString(reader);
+                     poolName = jndiName;
+                     break;
+                  }
+                  case USE_JAVA_CONTEXT : {
+                     useJavaContext = elementAsBoolean(reader);
+                     break;
+                  }
+                  case PASSWORD : {
+                     password = elementAsString(reader);
+                     break;
+                  }
+                  case USER_NAME : {
+                     userName = elementAsString(reader);
+                     break;
+                  }
+                  case MAX_POOL_SIZE : {
+                     maxPoolSize = elementAsInteger(reader);
+                     break;
+                  }
+                  case MIN_POOL_SIZE : {
+                     minPoolSize = elementAsInteger(reader);
+                     break;
+                  }
+                  case PREFILL : {
+                     prefill = elementAsBoolean(reader);
+                     break;
+                  }
+                  case ALLOCATION_RETRY : {
+                     allocationRetry = elementAsInteger(reader);
+                     break;
+                  }
+                  case ALLOCATION_RETRY_WAIT_MILLIS : {
+                     allocationRetryWaitMillis = elementAsLong(reader);
+                     break;
+                  }
+                  case BLOCKING_TIMEOUT_MILLIS : {
+                     blockingTimeoutMillis = elementAsLong(reader);
+                     break;
+                  }
+                  case IDLE_TIMEOUT_MINUTES : {
+                     idleTimeoutMinutes = elementAsLong(reader);
+                     break;
+                  }
+                  case QUERY_TIMEOUT : {
+                     queryTimeout = elementAsLong(reader);
+                     break;
+                  }
+                  case SET_TX_QUERY_TIMEOUT : {
+                     setTxQueryTimeout = elementAsBoolean(reader);
+                     break;
+                  }
+                  case USE_TRY_LOCK : {
+                     useTryLock = elementAsLong(reader);
+                     break;
+                  }
+                  case PREPARED_STATEMENT_CACHE_SIZE : {
+                     preparedStatementsCacheSize = elementAsLong(reader);
+                     break;
+                  }
+                  case TRACK_STATEMENTS : {
+                     trackStatements = TrackStatementsEnum.TRUE;
+                     break;
+                  }
+                  case SHARE_PREPARED_STATEMENTS : {
+                     sharePreparedStatements = elementAsBoolean(reader);
+                     break;
+                  }
+                  case BACKGROUND_VALIDATION : {
+                     backgroundValidation = elementAsBoolean(reader);
+                     break;
+                  }
+                  case BACKGROUND_VALIDATION_MILLIS : {
+                     backgroundValidationMillis = elementAsLong(reader);
+                     break;
+                  }
+                  case CHECK_VALID_CONNECTION_SQL : {
+                     checkValidConnectionSql = elementAsString(reader);
+                     break;
+                  }
+                  case USE_FAST_FAIL : {
+                     useFastFail = elementAsBoolean(reader);
+                     break;
+                  }
+                  case VALIDATE_ON_MATCH : {
+                     validateOnMatch = elementAsBoolean(reader);
+                     break;
+                  }
+                  default :
+                     skipParse(reader);
+               }
+               break;
+            }
+         }
+      }
+      throw new ParserException();
+   }
+
+
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+
+      /**
+       * datasources tag
+       */
+      DATASOURCES("datasources"),
+
+      /**
+       * datasources tag
+       */
+      CONNECTION_FACTORIES("connection-factories");
+
+      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 string
+      *
+      * @param localName a string 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;
+      }
+
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyTxDataSourceImpl.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyTxDataSourceImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyTxDataSourceImpl.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,403 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import org.jboss.jca.common.api.metadata.common.CommonPool;
+import org.jboss.jca.common.api.metadata.common.Extension;
+import org.jboss.jca.common.api.metadata.common.FlushStrategy;
+import org.jboss.jca.common.api.metadata.ds.DsSecurity;
+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.Statement.TrackStatementsEnum;
+import org.jboss.jca.common.metadata.common.CommonPoolImpl;
+import org.jboss.jca.common.metadata.ds.DataSourceImpl;
+import org.jboss.jca.common.metadata.ds.DsSecurityImpl;
+import org.jboss.jca.common.metadata.ds.StatementImpl;
+import org.jboss.jca.common.metadata.ds.TimeOutImpl;
+import org.jboss.jca.common.metadata.ds.ValidationImpl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A XaDataSource impl.
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class LegacyTxDataSourceImpl implements LocalTxDataSource
+{
+
+   private DataSourceImpl dsImpl = null;
+   
+   private final String connectionUrl;
+
+   private String driverClass;
+
+   private String dataSourceClass;
+
+   private final String driver;
+
+   private final HashMap<String, String> connectionProperties;
+
+   protected final TransactionIsolation transactionIsolation;
+
+   protected TimeOut timeOut;
+
+   protected DsSecurity security;
+
+   protected Statement statement;
+
+   protected Validation validation;
+
+   private CommonPool pool;
+
+   protected String urlDelimiter;
+
+   protected String urlSelectorStrategyClassName;
+   
+   private String newConnectionSql;
+
+   protected Boolean useJavaContext;
+
+   protected String poolName;
+
+   protected Boolean enabled;
+
+   protected String jndiName;
+
+   protected Boolean spy;
+
+   protected Boolean useCcm;
+   
+   protected Boolean jta;
+   
+   /*
+   (String connectionUrl, String driverClass, String dataSourceClass, String driver,
+         TransactionIsolation transactionIsolation, Map<String, String> connectionProperties, 
+         TimeOut timeOut, DsSecurity security, Statement statement, Validation validation, 
+         String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql, 
+         Boolean useJavaContext, String poolName, Boolean enabled, String jndiName, 
+         Boolean spy, Boolean useccm, Boolean jta, CommonPool pool)
+         */
+   
+   public LegacyTxDataSourceImpl(String connectionUrl, String driverClass, String dataSourceClass, String driver,
+         TransactionIsolation transactionIsolation, Map<String, String> connectionProperties)
+   {
+      this.connectionUrl = connectionUrl;
+      this.driverClass = driverClass;
+      this.dataSourceClass = dataSourceClass;
+      this.driver = driver;
+      if (connectionProperties != null)
+      {
+         this.connectionProperties = new HashMap<String, String>(connectionProperties.size());
+         this.connectionProperties.putAll(connectionProperties);
+      }
+      else
+      {
+         this.connectionProperties = new HashMap<String, String>(0);
+      }
+      this.transactionIsolation = transactionIsolation;
+   }
+   
+   public void buildDataSourceImpl()  throws Exception
+   {
+      dsImpl = new DataSourceImpl(connectionUrl, driverClass, dataSourceClass, driver, transactionIsolation,
+            connectionProperties, timeOut, security,
+            statement, validation, urlDelimiter,
+            urlSelectorStrategyClassName, newConnectionSql, useJavaContext, poolName,
+            enabled, jndiName, spy, useCcm, jta, pool);
+   }
+   
+   @Override
+   public String toString()
+   {
+      String out = dsImpl.toString();
+      return out;
+   }
+   
+   public LegacyTxDataSourceImpl buildTimeOut(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Integer allocationRetry,
+         Long allocationRetryWaitMillis, Integer xaResourceTimeout, Boolean setTxQueryTimeout, Long queryTimeout,
+         Long useTryLock) throws Exception
+   {
+      timeOut = new TimeOutImpl(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry,allocationRetryWaitMillis, xaResourceTimeout, setTxQueryTimeout,
+            queryTimeout, useTryLock);
+      return this;
+   }
+   
+   public LegacyTxDataSourceImpl buildDsSecurity(String userName, String password, String securityDomain, Extension reauthPlugin)
+   throws Exception
+   {
+      security = new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
+      return this;
+   }
+   
+   public LegacyTxDataSourceImpl buildStatement(Boolean sharePreparedStatements, Long preparedStatementsCacheSize,
+         TrackStatementsEnum trackStatements) throws Exception
+   {
+      statement = new StatementImpl(sharePreparedStatements, preparedStatementsCacheSize, trackStatements);
+      return this;
+   }
+   
+   public LegacyTxDataSourceImpl buildValidation(Boolean backgroundValidation, Long backgroundValidationMillis, Boolean useFastFail,
+         Extension validConnectionChecker, String checkValidConnectionSql, Boolean validateOnMatch,
+         Extension staleConnectionChecker, Extension exceptionSorter) throws Exception
+   {
+      validation = new ValidationImpl(backgroundValidation, backgroundValidationMillis, useFastFail,
+            validConnectionChecker, checkValidConnectionSql, validateOnMatch,
+            staleConnectionChecker, exceptionSorter);
+      return this;
+   }
+   
+   public LegacyTxDataSourceImpl buildCommonPool(Integer minPoolSize, Integer maxPoolSize, 
+         Boolean prefill, Boolean useStrictMin,
+         FlushStrategy flushStrategy) throws Exception
+   {
+      pool = new CommonPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy);
+      return this;
+   }
+   
+   public LegacyTxDataSourceImpl buildOther(String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql, 
+         Boolean useJavaContext, String poolName, Boolean enabled, String jndiName, 
+         Boolean spy, Boolean useCcm, Boolean jta)
+   {
+      this.urlDelimiter = urlDelimiter;
+      this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
+      this.newConnectionSql = newConnectionSql;
+      this.useJavaContext = useJavaContext;
+      this.poolName = poolName;
+      this.enabled = enabled;
+      this.jndiName = jndiName;
+      this.spy = spy;
+      this.useCcm = useCcm;
+      this.jta = jta;
+      return this;
+   }
+
+   @Override
+   public String getConnectionUrl()
+   {
+      return this.connectionUrl;
+   }
+
+   @Override
+   public String getDriverClass()
+   {
+      return this.driverClass;
+   }
+
+   @Override
+   public Map<String, String> getConnectionProperties()
+   {
+      return this.connectionProperties;
+   }
+
+   @Override
+   public String getJndiName()
+   {
+      return this.jndiName;
+   }
+
+   @Override
+   public Boolean isUseJavaContext()
+   {
+      return this.useJavaContext;
+   }
+
+   @Override
+   public String getUrlDelimiter()
+   {
+      return this.urlDelimiter;
+   }
+
+   @Override
+   public String getUrlSelectorStrategyClassName()
+   {
+      return this.urlSelectorStrategyClassName;
+   }
+
+   @Override
+   public String getUserName()
+   {
+      return this.security.getUserName();
+   }
+
+   @Override
+   public String getPassword()
+   {
+      return this.security.getPassword();
+   }
+
+   @Override
+   public String getSecurityDomain()
+   {
+      return null;
+   }
+
+   @Override
+   public Integer getMinPoolSize()
+   {
+      return this.pool.getMinPoolSize();
+   }
+
+   @Override
+   public Integer getMaxPoolSize()
+   {
+      return this.pool.getMaxPoolSize();
+   }
+
+   @Override
+   public Long getBlockingTimeoutMillis()
+   {
+      return this.timeOut.getBlockingTimeoutMillis();
+   }
+
+   @Override
+   public Boolean isBackgroundValidation()
+   {
+      return this.validation.isBackgroundValidation();
+   }
+
+   @Override
+   public Long getBackgroundValidationMillis()
+   {
+      return this.validation.getBackgroundValidationMillis();
+   }
+
+   @Override
+   public Long getIdleTimeoutMinutes()
+   {
+      return this.timeOut.getIdleTimeoutMinutes();
+   }
+
+   @Override
+   public Integer getAllocationRetry()
+   {
+      return this.getAllocationRetry();
+   }
+
+   @Override
+   public Long getAllocationRetryWaitMillis()
+   {
+      return this.getAllocationRetryWaitMillis();
+   }
+
+   @Override
+   public Boolean isValidateOnMatch()
+   {
+      return this.validation.isValidateOnMatch();
+   }
+
+   @Override
+   public String getNewConnectionSql()
+   {
+      return this.getNewConnectionSql();
+   }
+
+   @Override
+   public String getCheckValidConnectionSql()
+   {
+      return this.validation.getCheckValidConnectionSql();
+   }
+
+   @Override
+   public Extension getValidConnectionChecker()
+   {
+      return this.validation.getValidConnectionChecker();
+   }
+
+   @Override
+   public Extension getExceptionSorter()
+   {
+      return null;
+   }
+
+   @Override
+   public Extension getStaleConnectionChecker()
+   {
+      return null;
+   }
+
+   @Override
+   public TrackStatementsEnum getTrackStatements()
+   {
+
+      return this.getTrackStatements();
+   }
+
+   @Override
+   public Boolean isPrefill()
+   {
+      return this.isPrefill();
+   }
+
+   @Override
+   public Boolean isUseFastFail()
+   {
+      return this.validation.isUseFastFail();
+   }
+
+   @Override
+   public Long getPreparedStatementsCacheSize()
+   {
+      return this.getPreparedStatementsCacheSize();
+   }
+
+   @Override
+   public Boolean isSharePreparedStatements()
+   {
+      return this.isSharePreparedStatements();
+   }
+
+   @Override
+   public Boolean isSetTxQueryTimeout()
+   {
+      return this.timeOut.isSetTxQueryTimeout();
+   }
+
+   @Override
+   public Long getQueryTimeout()
+   {
+      return this.timeOut.getQueryTimeout();
+   }
+
+   @Override
+   public Long getUseTryLock()
+   {
+      return this.getUseTryLock();
+   }
+
+   @Override
+   public TransactionIsolation getTransactionIsolation()
+   {
+      return this.getTransactionIsolation();
+   }
+
+   @Override
+   public boolean isNoTxSeparatePools()
+   {
+      return this.isNoTxSeparatePools();
+   }
+
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyXaDataSourceImp.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyXaDataSourceImp.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LegacyXaDataSourceImp.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,448 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+import org.jboss.jca.common.api.metadata.common.Extension;
+import org.jboss.jca.common.api.metadata.common.FlushStrategy;
+import org.jboss.jca.common.api.metadata.common.Recovery;
+import org.jboss.jca.common.api.metadata.ds.DsSecurity;
+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.Statement.TrackStatementsEnum;
+import org.jboss.jca.common.metadata.common.CommonXaPoolImpl;
+import org.jboss.jca.common.metadata.ds.DsSecurityImpl;
+import org.jboss.jca.common.metadata.ds.StatementImpl;
+import org.jboss.jca.common.metadata.ds.TimeOutImpl;
+import org.jboss.jca.common.metadata.ds.ValidationImpl;
+import org.jboss.jca.common.metadata.ds.XADataSourceImpl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A XaDataSource impl.
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class LegacyXaDataSourceImp implements XaDataSource
+{
+
+   private XADataSourceImpl dsImpl = null;
+   
+   //private String driverClass;
+
+   private String xaDataSourceClass;
+
+   private final String driver;
+
+   private final HashMap<String, String> xaDataSourceProperty;
+
+   protected final TransactionIsolation transactionIsolation;
+
+   protected TimeOut timeOut;
+
+   protected DsSecurity security;
+
+   protected Statement statement;
+
+   protected Validation validation;
+
+   private CommonXaPool xaPool;
+
+   protected String urlDelimiter;
+
+   protected String urlSelectorStrategyClassName;
+   
+   private String newConnectionSql;
+
+   protected Boolean useJavaContext;
+
+   protected String poolName;
+
+   protected Boolean enabled;
+
+   protected String jndiName;
+
+   protected Boolean spy;
+
+   protected Boolean useCcm;
+   
+   protected Boolean jta;
+   
+   Recovery recovery;
+   
+   Boolean isSameRmOverride;
+
+   Boolean interleaving;
+
+   Boolean padXid;
+
+   Boolean wrapXaDataSource;
+
+   Boolean noTxSeparatePool;
+   
+   /*
+    * TransactionIsolation transactionIsolation, TimeOut timeOut, DsSecurity security,
+      Statement statement, Validation validation, String urlDelimiter, String urlSelectorStrategyClassName,
+      Boolean useJavaContext, String poolName, Boolean enabled, String jndiName, Boolean spy, Boolean useCcm,
+      Map<String, String> xaDataSourceProperty, String xaDataSourceClass, String driver, String newConnectionSql,
+      CommonXaPool xaPool, Recovery recovery
+         */
+   
+   public LegacyXaDataSourceImp(String xaDataSourceClass, String driver,
+         TransactionIsolation transactionIsolation, Map<String, String> xaDataSourceProperty)
+   {
+      //this.connectionUrl = connectionUrl;
+      //this.driverClass = driverClass;
+      this.xaDataSourceClass = xaDataSourceClass;
+      this.driver = driver;
+      if (xaDataSourceProperty != null)
+      {
+         this.xaDataSourceProperty = new HashMap<String, String>(xaDataSourceProperty.size());
+         this.xaDataSourceProperty.putAll(xaDataSourceProperty);
+      }
+      else
+      {
+         this.xaDataSourceProperty = new HashMap<String, String>(0);
+      }
+      this.transactionIsolation = transactionIsolation;
+   }
+   
+   public void buildXaDataSourceImpl()  throws Exception
+   {
+      dsImpl = new XADataSourceImpl(transactionIsolation, timeOut, security,
+            statement, validation, urlDelimiter, urlSelectorStrategyClassName, 
+            useJavaContext, poolName, enabled, jndiName, spy, useCcm, 
+            xaDataSourceProperty, xaDataSourceClass, driver, newConnectionSql, 
+            xaPool, recovery);
+   }
+   
+   @Override
+   public String toString()
+   {
+      String out = dsImpl.toString();
+      return out;
+   }
+   
+   public LegacyXaDataSourceImp buildTimeOut(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Integer allocationRetry,
+         Long allocationRetryWaitMillis, Integer xaResourceTimeout, Boolean setTxQueryTimeout, Long queryTimeout,
+         Long useTryLock) throws Exception
+   {
+      timeOut = new TimeOutImpl(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry,allocationRetryWaitMillis, xaResourceTimeout, setTxQueryTimeout,
+            queryTimeout, useTryLock);
+      return this;
+   }
+   
+   public LegacyXaDataSourceImp buildDsSecurity(String userName, String password, String securityDomain, Extension reauthPlugin)
+   throws Exception
+   {
+      security = new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
+      return this;
+   }
+   
+   public LegacyXaDataSourceImp buildStatement(Boolean sharePreparedStatements, Long preparedStatementsCacheSize,
+         TrackStatementsEnum trackStatements) throws Exception
+   {
+      statement = new StatementImpl(sharePreparedStatements, preparedStatementsCacheSize, trackStatements);
+      return this;
+   }
+   
+   public LegacyXaDataSourceImp buildValidation(Boolean backgroundValidation, Long backgroundValidationMillis, Boolean useFastFail,
+         Extension validConnectionChecker, String checkValidConnectionSql, Boolean validateOnMatch,
+         Extension staleConnectionChecker, Extension exceptionSorter) throws Exception
+   {
+      validation = new ValidationImpl(backgroundValidation, backgroundValidationMillis, useFastFail,
+            validConnectionChecker, checkValidConnectionSql, validateOnMatch,
+            staleConnectionChecker, exceptionSorter);
+      return this;
+   }
+   
+   public LegacyXaDataSourceImp buildCommonPool(Integer minPoolSize, Integer maxPoolSize, 
+         Boolean prefill, Boolean useStrictMin,
+         FlushStrategy flushStrategy) throws Exception
+   {
+      xaPool = new CommonXaPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy,
+            isSameRmOverride, interleaving, padXid,
+            wrapXaDataSource, noTxSeparatePool);
+      return this;
+   }
+   
+   public LegacyXaDataSourceImp buildOther(String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql, 
+         Boolean useJavaContext, String poolName, Boolean enabled, String jndiName, 
+         Boolean spy, Boolean useCcm, Boolean jta)
+   {
+      this.urlDelimiter = urlDelimiter;
+      this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
+      this.newConnectionSql = newConnectionSql;
+      this.useJavaContext = useJavaContext;
+      this.poolName = poolName;
+      this.enabled = enabled;
+      this.jndiName = jndiName;
+      this.spy = spy;
+      this.useCcm = useCcm;
+      this.jta = jta;
+      return this;
+   }
+   
+
+   @Override
+   public String getJndiName()
+   {
+      return this.jndiName;
+   }
+
+   @Override
+   public Boolean isUseJavaContext()
+   {
+      return this.useJavaContext;
+   }
+
+   @Override
+   public String getUrlDelimiter()
+   {
+      return this.urlDelimiter;
+   }
+
+   @Override
+   public String getUrlSelectorStrategyClassName()
+   {
+      return this.urlSelectorStrategyClassName;
+   }
+
+   @Override
+   public String getUserName()
+   {
+      return this.security.getUserName();
+   }
+
+   @Override
+   public String getPassword()
+   {
+      return this.security.getPassword();
+   }
+
+   @Override
+   public String getSecurityDomain()
+   {
+      return null;
+   }
+
+   @Override
+   public Integer getMinPoolSize()
+   {
+      return this.xaPool.getMinPoolSize();
+   }
+
+   @Override
+   public Integer getMaxPoolSize()
+   {
+      return this.xaPool.getMaxPoolSize();
+   }
+
+   @Override
+   public Long getBlockingTimeoutMillis()
+   {
+      return this.timeOut.getBlockingTimeoutMillis();
+   }
+
+   @Override
+   public Boolean isBackgroundValidation()
+   {
+      return this.validation.isBackgroundValidation();
+   }
+
+   @Override
+   public Long getBackgroundValidationMillis()
+   {
+      return this.validation.getBackgroundValidationMillis();
+   }
+
+   @Override
+   public Long getIdleTimeoutMinutes()
+   {
+      return this.timeOut.getIdleTimeoutMinutes();
+   }
+
+   @Override
+   public Integer getAllocationRetry()
+   {
+      return this.getAllocationRetry();
+   }
+
+   @Override
+   public Long getAllocationRetryWaitMillis()
+   {
+      return this.getAllocationRetryWaitMillis();
+   }
+
+   @Override
+   public Boolean isValidateOnMatch()
+   {
+      return this.validation.isValidateOnMatch();
+   }
+
+   @Override
+   public String getNewConnectionSql()
+   {
+      return this.getNewConnectionSql();
+   }
+
+   @Override
+   public String getCheckValidConnectionSql()
+   {
+      return this.validation.getCheckValidConnectionSql();
+   }
+
+   @Override
+   public Extension getValidConnectionChecker()
+   {
+      return this.validation.getValidConnectionChecker();
+   }
+
+   @Override
+   public Extension getExceptionSorter()
+   {
+      return null;
+   }
+
+   @Override
+   public Extension getStaleConnectionChecker()
+   {
+      return null;
+   }
+
+   @Override
+   public TrackStatementsEnum getTrackStatements()
+   {
+
+      return this.getTrackStatements();
+   }
+
+   @Override
+   public Boolean isPrefill()
+   {
+      return this.isPrefill();
+   }
+
+   @Override
+   public Boolean isUseFastFail()
+   {
+      return this.validation.isUseFastFail();
+   }
+
+   @Override
+   public Long getPreparedStatementsCacheSize()
+   {
+      return this.getPreparedStatementsCacheSize();
+   }
+
+   @Override
+   public Boolean isSharePreparedStatements()
+   {
+      return this.isSharePreparedStatements();
+   }
+
+   @Override
+   public Boolean isSetTxQueryTimeout()
+   {
+      return this.timeOut.isSetTxQueryTimeout();
+   }
+
+   @Override
+   public Long getQueryTimeout()
+   {
+      return this.timeOut.getQueryTimeout();
+   }
+
+   @Override
+   public Long getUseTryLock()
+   {
+      return this.getUseTryLock();
+   }
+
+   @Override
+   public Boolean isNoTxSeparatePools()
+   {
+      return this.isNoTxSeparatePools();
+   }
+
+   
+   @Override
+   public Boolean isTrackConnectionByTx()
+   {
+      return this.isTrackConnectionByTx();
+   }
+
+   @Override
+   public Integer getXaResourceTimeout()
+   {
+      return this.getXaResourceTimeout();
+   }
+
+   @Override
+   public String getXaDataSourceClass()
+   {
+
+      return this.getXaDataSourceClass();
+   }
+
+   @Override
+   public Map<String, String> getXaDataSourceProperty()
+   {
+      return this.getXaDataSourceProperty();
+   }
+
+   @Override
+   public Boolean isSameRmOverride()
+   {
+      return this.isSameRmOverride;
+   }
+
+   @Override
+   public Boolean isInterleaving()
+   {
+      return this.isInterleaving();
+   }
+
+   @Override
+   public Boolean isPadXid()
+   {
+      return this.isPadXid();
+   }
+
+   @Override
+   public Boolean isWrapXaResource()
+   {
+      return this.isWrapXaResource();
+   }
+
+   @Override
+   public Boolean isNoTxSeparatePool()
+   {
+      return this.isNoTxSeparatePool();
+   }
+
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LocalTxDataSource.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LocalTxDataSource.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/LocalTxDataSource.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Common DataSource
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface LocalTxDataSource extends NoTxDataSource
+{
+   /**
+    * Get the transactionIsolation.
+    *
+    * @return the transactionIsolation.
+    */
+   public TransactionIsolation getTransactionIsolation();
+
+   public boolean isNoTxSeparatePools();
+   
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+
+      // more by NoTxDataSource
+      /**
+       * transactionIsolation tag
+       */
+      TRANSACTION_ISOLATION("transaction-isolation"),
+      
+      NO_TX_SEPARATE_POOLS("no-tx-separate-pools"),
+      
+      /**
+       * connection-url tag
+       */
+      CONNECTION_URL("connection-url"),
+      /**
+      * driverClass tag
+      */
+      DRIVER_CLASS("driver-class"),
+      /**
+      * connectionProperty tag
+      */
+      CONNECTION_PROPERTY("connection-property"),
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+      * use-java-context tag
+      */
+      USE_JAVA_CONTEXT("use-java-context"),
+      /**
+       * urlDelimiter tag
+       */
+      URL_DELIMITER("url-delimiter"),
+      /**
+       * urlSelectorStrategyClassName tag
+       */
+      URL_SELECTOR_STRATEGY_CLASS_NAME("url-selector-strategy-class-name"),
+      /**
+       * userName tag
+       */
+      USER_NAME("user-name"),
+      /**
+      * password tag
+      */
+      PASSWORD("password"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+       * validateOnMatch tag
+       */
+      VALIDATE_ON_MATCH("validate-on-match"),
+      /**
+       * newConnectionSql tag
+       */
+      NEW_CONNECTION_SQL("new-connection-sql"),
+      /**
+       * checkValidConnectionSql tag
+       */
+      CHECK_VALID_CONNECTION_SQL("check-valid-connection-sql"),
+      /**
+       * validConnectionCheckerClassName tag
+       */
+      VALID_CONNECTION_CHECKER("valid-connection-checker"),
+      /**
+       * exceptionSorterClassName tag
+       */
+      EXCEPTION_SORTER("exception-sorter"),
+      /**
+       * staleConnectionCheckerClassName tag
+       */
+      STALE_CONNECTION_CHECKER("stale-connection-checker"),
+      /**
+       * trackStatements tag
+       */
+      TRACK_STATEMENTS("track-statements"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail"),
+      /**
+       * preparedStatementCacheSize tag
+       */
+      PREPARED_STATEMENT_CACHE_SIZE("prepared-statement-cache-size"),
+      /**
+      * sharePreparedStatements tag
+      */
+      SHARE_PREPARED_STATEMENTS("share-prepared-statements"),
+      /**
+       * setTxQueryTimeout tag
+       */
+      SET_TX_QUERY_TIMEOUT("set-tx-query-timeout"),
+      /**
+       * queryTimeout tag
+       */
+      QUERY_TIMEOUT("query-timeout"),
+      /**
+      * useTryLock tag
+      */
+      USE_TRY_LOCK("use-try-lock");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/Main.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/Main.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/Main.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+
+import java.nio.charset.Charset;
+
+/**
+ * converter main class
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class Main
+{
+   private static final int SUCCESS = 0;
+   private static final int ERROR = 1;
+   private static final int OTHER = 2;
+   
+   /**
+    * Main
+    * @param args
+    */
+   public static void main(String[] args) throws Exception
+   {
+      
+      if (args.length < 3)
+      {
+         usage();
+         System.exit(OTHER);
+      }
+      String option = args[0];
+      String oldDsFilename = args[1];
+      String newFilename = args[2];
+      
+      if (!(option.equals("-ra") || option.equals("-ds")) ||
+            !oldDsFilename.endsWith("-ds.xml") ||
+            !newFilename.endsWith(".xml"))
+      {
+         usage();
+         System.exit(OTHER);
+      }
+      FileInputStream in = null;
+      FileOutputStream out = null;
+      if (option.equals("-ds"))
+      {
+         in = new FileInputStream(oldDsFilename);
+         LegacyDsParser parser = new LegacyDsParser();
+         DataSources ds = parser.parse(in);
+         String dsxml = ds.toString();
+         
+         out = new FileOutputStream(newFilename);
+         out.write(dsxml.getBytes(Charset.forName("UTF-8")));
+      }
+      
+      if (in != null)
+         in.close();
+      if (out != null)
+         out.close();
+
+      System.out.println("\nConvert successfully!");
+      System.exit(SUCCESS);
+   }
+
+   /**
+    * Tool usage
+    */
+   private static void usage()
+   {
+      System.out.println("Usage: ./as-converter.sh -{ds|ra} old-ds.xml mydeployment-{ds|ra}.xml");
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxConnectionFactory.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * No Tx ConnectionFactory
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface NoTxConnectionFactory extends ConnectionFactory
+{
+   /**
+    * Get the rarName.
+    *
+    * @return the rarName.
+    */
+   public String getRarName();
+
+   /**
+    *
+    * get the ConnectionDefinition
+    *
+    * @return the ConnectionDefinition
+    */
+   public String getConnectionDefinition();
+
+
+   /**
+    * Get the configProperties.
+    *
+    * @return the configProperties.
+    */
+   public Map<String, String> getConfigProperties();
+   
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+      
+      //more by ConnectionFactory
+      RAR_NAME("rar-name"),
+      CONNECTION_DEFINITION("connection-definition"),
+      CONFIG_PROPERTY("config-property"),
+      
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxDataSource.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxDataSource.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NoTxDataSource.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,255 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * No Tx DataSource
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface NoTxDataSource extends DataSource
+{
+   /**
+    * Get the connectionUrl.
+    *
+    * @return the connectionUrl.
+    */
+   public String getConnectionUrl();
+
+   /**
+    * Get the driverClass.
+    *
+    * @return the driverClass.
+    */
+   public String getDriverClass();
+
+   /**
+    * Get the connectionProperties.
+    *
+    * @return the connectionProperties.
+    */
+   public Map<String, String> getConnectionProperties();
+   
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+
+      // more by DataSource
+      /**
+       * connection-url tag
+       */
+      CONNECTION_URL("connection-url"),
+      /**
+      * driverClass tag
+      */
+      DRIVER_CLASS("driver-class"),
+      /**
+      * connectionProperty tag
+      */
+      CONNECTION_PROPERTY("connection-property"),
+      
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+      * use-java-context tag
+      */
+      USE_JAVA_CONTEXT("use-java-context"),
+      /**
+       * urlDelimiter tag
+       */
+      URL_DELIMITER("url-delimiter"),
+      /**
+       * urlSelectorStrategyClassName tag
+       */
+      URL_SELECTOR_STRATEGY_CLASS_NAME("url-selector-strategy-class-name"),
+      /**
+       * userName tag
+       */
+      USER_NAME("user-name"),
+      /**
+      * password tag
+      */
+      PASSWORD("password"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+       * validateOnMatch tag
+       */
+      VALIDATE_ON_MATCH("validate-on-match"),
+      /**
+       * newConnectionSql tag
+       */
+      NEW_CONNECTION_SQL("new-connection-sql"),
+      /**
+       * checkValidConnectionSql tag
+       */
+      CHECK_VALID_CONNECTION_SQL("check-valid-connection-sql"),
+      /**
+       * validConnectionCheckerClassName tag
+       */
+      VALID_CONNECTION_CHECKER("valid-connection-checker"),
+      /**
+       * exceptionSorterClassName tag
+       */
+      EXCEPTION_SORTER("exception-sorter"),
+      /**
+       * staleConnectionCheckerClassName tag
+       */
+      STALE_CONNECTION_CHECKER("stale-connection-checker"),
+      /**
+       * trackStatements tag
+       */
+      TRACK_STATEMENTS("track-statements"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail"),
+      /**
+       * preparedStatementCacheSize tag
+       */
+      PREPARED_STATEMENT_CACHE_SIZE("prepared-statement-cache-size"),
+      /**
+      * sharePreparedStatements tag
+      */
+      SHARE_PREPARED_STATEMENTS("share-prepared-statements"),
+      /**
+       * setTxQueryTimeout tag
+       */
+      SET_TX_QUERY_TIMEOUT("set-tx-query-timeout"),
+      /**
+       * queryTimeout tag
+       */
+      QUERY_TIMEOUT("query-timeout"),
+      /**
+      * useTryLock tag
+      */
+      USE_TRY_LOCK("use-try-lock");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NotSupportedException.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NotSupportedException.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/NotSupportedException.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+/**
+ * NotSupportException
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class NotSupportedException extends Exception
+{
+   private static final long serialVersionUID = 1L;
+   
+   /**
+    * Constructs a new instance with null as its detail message.
+    */
+   public NotSupportedException() 
+   { 
+      super(); 
+   }
+   
+   /**
+    * Constructs a new instance with the specified detail message.
+    *
+    * @param message the detail message.
+    */
+   public NotSupportedException(String message) 
+   {
+      super(message);
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ParserException.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ParserException.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/ParserException.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+/**
+ * NotSupportException
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class ParserException extends Exception
+{
+   private static final long serialVersionUID = 1L;
+   
+   /**
+    * Constructs a new instance with null as its detail message.
+    */
+   public ParserException() 
+   { 
+      super(); 
+   }
+   
+   /**
+    * Constructs a new instance with the specified detail message.
+    *
+    * @param message the detail message.
+    */
+   public ParserException(String message) 
+   {
+      super(message);
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/TxConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/TxConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/TxConnectionFactory.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,179 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * No Tx ConnectionFactory
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface TxConnectionFactory extends NoTxConnectionFactory, CommonXa
+{
+   /**
+    *
+    * get the getTransactionSupport
+    *
+    * @return the getTransactionSupport
+    */
+   public TransactionSupportEnum getTransactionSupport();
+
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+
+      //more by NoConnectionFactory
+
+      /**
+       * xaDatasourceProperty tag
+       */
+      TRACK_CONNECTION_BY_TX("track_connection-by_tx"),
+      /**
+      * xaDatasourceClass tag
+      */
+      NO_TX_SEPARATE_POOLS("no-tx-separate-pools"),
+      /**
+      * XaResourceTimeout tag
+      */
+      XA_RESOURCE_TIMEOUT("xa-resource-timeout"),
+
+      RAR_NAME("rar-name"), CONNECTION_DEFINITION("connection-definition"), CONFIG_PROPERTY("config-property"),
+
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/UnknownTagException.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/UnknownTagException.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/UnknownTagException.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+/**
+ * NotSupportException
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class UnknownTagException extends Exception
+{
+   private static final long serialVersionUID = 1L;
+   
+   /**
+    * Constructs a new instance with null as its detail message.
+    */
+   public UnknownTagException() 
+   { 
+      super(); 
+   }
+   
+   /**
+    * Constructs a new instance with the specified detail message.
+    *
+    * @param message the detail message.
+    */
+   public UnknownTagException(String message) 
+   {
+      super(message);
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/XaDataSource.java
===================================================================
--- projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/XaDataSource.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/java/org/jboss/jca/as/converters/XaDataSource.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,305 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.as.converters;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A XaDataSource.
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public interface XaDataSource extends DataSource, CommonXa
+{
+   /**
+    * Get the xaDataSourceClass.
+    *
+    * @return the xaDataSourceClass.
+    */
+   public String getXaDataSourceClass();
+
+   /**
+    * Get the xaDataSourceProperty.
+    *
+    * @return the xaDataSourceProperty.
+    */
+   public Map<String, String> getXaDataSourceProperty();
+
+   /**
+    * 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 wrapXaResource.
+    *
+    * @return the wrapXaResource.
+    */
+   public Boolean isWrapXaResource();
+
+   /**
+    * Get the noTxSeparatePool.
+    *
+    * @return the noTxSeparatePool.
+    */
+   public Boolean isNoTxSeparatePool();
+
+   /**
+   *
+   * A Tag.
+   */
+   public enum Tag {
+      /**
+       * always first
+       */
+      UNKNOWN(null),
+
+      /**
+      * xaDatasourceProperty tag
+      */
+      XA_DATASOURCE_PROPERTY("xa-datasource-property"),
+      /**
+      * xaDatasourceClass tag
+      */
+      XA_DATASOURCE_CLASS("xa-datasource-class"),
+      /**
+      * transactionIsolation tag
+      */
+      TRANSACTION_ISOLATION("transaction-isolation"),
+      /**
+       * isSameRmOverrideValue tag
+       */
+      IS_SAME_RM_OVERRIDE("is-same-rm-override"),
+      /**
+      * interleaving tag
+      */
+      INTERLEAVING("interleaving"),
+
+      /**
+       * xaDatasourceProperty tag
+       */
+      TRACK_CONNECTION_BY_TX("track_connection-by_tx"),
+      /**
+      * xaDatasourceClass tag
+      */
+      NO_TX_SEPARATE_POOLS("no-tx-separate-pools"),
+      /**
+      * XaResourceTimeout tag
+      */
+      XA_RESOURCE_TIMEOUT("xa-resource-timeout"),
+
+      /**
+       * jndiName tag
+       */
+      JNDI_NAME("jndi-name"),
+      /**
+       * use-java-context tag
+      */
+      USE_JAVA_CONTEXT("use-java-context"),
+      /**
+       * urlDelimiter tag
+       */
+      URL_DELIMITER("url-delimiter"),
+      /**
+       * urlSelectorStrategyClassName tag
+       */
+      URL_SELECTOR_STRATEGY_CLASS_NAME("url-selector-strategy-class-name"),
+      /**
+       * userName tag
+       */
+      USER_NAME("user-name"),
+      /**
+      * password tag
+      */
+      PASSWORD("password"),
+      /**
+       * security-domain tag
+       */
+      SECURITY_DOMAIN("security-domain"),
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+      /**
+      * maxPoolSize tag
+      */
+      MAX_POOL_SIZE("max-pool-size"),
+      /**
+       * blockingTimeoutMillis tag
+       */
+      BLOCKING_TIMEOUT_MILLIS("blocking-timeout-millis"),
+      /**
+       * backgroundValidation tag
+       */
+      BACKGROUND_VALIDATION("background-validation"),
+      /**
+      * backgroundValidationMillis tag
+      */
+      BACKGROUND_VALIDATION_MILLIS("background-validation-millis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLE_TIMEOUT_MINUTES("idle-timeout-minutes"),
+      /**
+       * allocationRetry tag
+       */
+      ALLOCATION_RETRY("allocation-retry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATION_RETRY_WAIT_MILLIS("allocation-retry-wait-millis"),
+      /**
+       * validateOnMatch tag
+       */
+      VALIDATE_ON_MATCH("validate-on-match"),
+      /**
+       * newConnectionSql tag
+       */
+      NEW_CONNECTION_SQL("new-connection-sql"),
+      /**
+       * checkValidConnectionSql tag
+       */
+      CHECK_VALID_CONNECTION_SQL("check-valid-connection-sql"),
+      /**
+       * validConnectionCheckerClassName tag
+       */
+      VALID_CONNECTION_CHECKER("valid-connection-checker"),
+      /**
+       * exceptionSorterClassName tag
+       */
+      EXCEPTION_SORTER("exception-sorter"),
+      /**
+       * staleConnectionCheckerClassName tag
+       */
+      STALE_CONNECTION_CHECKER("stale-connection-checker"),
+      /**
+       * trackStatements tag
+       */
+      TRACK_STATEMENTS("track-statements"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+       * useFastFail tag
+       */
+      USE_FAST_FAIL("use-fast-fail"),
+      /**
+       * preparedStatementCacheSize tag
+       */
+      PREPARED_STATEMENT_CACHE_SIZE("prepared-statement-cache-size"),
+      /**
+      * sharePreparedStatements tag
+      */
+      SHARE_PREPARED_STATEMENTS("share-prepared-statements"),
+      /**
+       * setTxQueryTimeout tag
+       */
+      SET_TX_QUERY_TIMEOUT("set-tx-query-timeout"),
+      /**
+       * queryTimeout tag
+       */
+      QUERY_TIMEOUT("query-timeout"),
+      /**
+      * useTryLock tag
+      */
+      USE_TRY_LOCK("use-try-lock");
+
+      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;
+      }
+
+      /**
+       * {@inheritDoc}
+       */
+      public String toString()
+      {
+         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;
+      }
+
+   }
+}

Added: projects/jboss-jca/trunk/as/src/main/resources/converter.bat
===================================================================
--- projects/jboss-jca/trunk/as/src/main/resources/converter.bat	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/resources/converter.bat	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1 @@
+java -classpath ironjacamar-as.jar;..\..\lib\ironjacamar-common-spi.jar;..\..\lib\jboss-logging.jar;..\..\lib\jboss-common-core.jar;..\..\lib\ironjacamar-spec-api.jar;..\..\lib\papaki-core.jar;..\..\lib\javassist.jar;..\..\lib\ironjacamar-common-impl.jar;..\..\lib\ironjacamar-common-impl-papaki.jar;..\..\lib\ironjacamar-common-api.jar org.jboss.jca.as.converters.Main %*

Added: projects/jboss-jca/trunk/as/src/main/resources/converter.sh
===================================================================
--- projects/jboss-jca/trunk/as/src/main/resources/converter.sh	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/main/resources/converter.sh	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,2 @@
+#!/bin/sh
+java -classpath ./ironjacamar-as.jar:../../lib/jboss-logging.jar:../../lib/jboss-common-core.jar:../../lib/ironjacamar-spec-api.jar:../../lib/papaki-core.jar:../../lib/javassist.jar:../../lib/ironjacamar-common-impl.jar:../../lib/ironjacamar-common-impl-papaki.jar:../../lib/ironjacamar-common-api.jar:../../lib/ironjacamar-common-spi.jar org.jboss.jca.as.converters.Main $*


Property changes on: projects/jboss-jca/trunk/as/src/main/resources/converter.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/as/converters/ParserTestCase.java
===================================================================
--- projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/as/converters/ParserTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/java/org/jboss/jca/as/converters/ParserTestCase.java	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, 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.as.converters;
+
+import java.io.InputStream;
+
+import org.jboss.logging.Logger;
+
+import org.junit.Test;
+import org.junit.Ignore;
+import static org.junit.Assert.*;
+
+/**
+ * A JCA16AnnoProfile test case.
+ * 
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class ParserTestCase
+{
+   private static Logger log = Logger.getLogger(ParserTestCase.class);
+   
+   String[] xaFilesName = {
+         "db2-jcc-xa-ds.xml",
+         "informix-xa-ds.xml",
+         "mysql-xa-ds.xml",
+         "postgres-xa-ds.xml",
+         "db2-xa-ds.xml",
+         "mimer-xa-ds.xml",
+         "oracle-xa-ds.xml",
+         "sybase-xa-ds.xml",
+         "derby-xa-ds.xml",
+         "mssql-xa-ds.xml",
+         "pointbase-xa-ds.xml"
+         };
+   
+   String[] dsFilesName = {
+         "asapxcess-jb3.2-ds.xml",
+         "hsqldb-ds.xml",
+         "cicsr9s-ds.xml",
+         "hsqldb-encrypted-ds.xml",
+         "oracle-ds.xml",
+         "db2-400-ds.xml",
+         "informix-ds.xml",
+         "db2-ds.xml",
+         "pointbase-ds.xml",
+         "jdatastore-ds.xml",
+         "jms-ds.xml",
+         "postgres-ds.xml",
+         "derby-ds.xml",
+         "jsql-ds.xml",
+         "mimer-ds.xml",
+         "progress-ds.xml",
+         "facets-ds.xml",
+         "sapdb-ds.xml",
+         "fastobjects-jboss32-ds.xml",
+         "msaccess-ds.xml",
+         "sapr3-ds.xml",
+         "firebird-ds.xml",
+         "mssql-ds.xml",
+         "solid-ds.xml",
+         "sybase-ds.xml",
+         "hajndi-jms-ds.xml",
+         "mysql-ds.xml"
+   };
+
+   /**
+    * test xa ds parser
+    * @throws Throwable throwable exception 
+    */
+   @Test
+   public void testXaDsParser() throws Throwable
+   {
+      LegacyDsParser parser = new LegacyDsParser();
+      
+      for (String xaFileName : xaFilesName)
+      {
+         System.out.println("\nStart parse... " + xaFileName);
+         InputStream in = ParserTestCase.class.getClassLoader().getResourceAsStream("ds/" + xaFileName);
+         DataSources ds = parser.parse(in);
+   
+         if (ds != null)
+            System.out.println(ds.toString());
+      }
+   }
+   
+   /**
+    * test local tx ds parser
+    * @throws Throwable throwable exception 
+    */
+   @Test
+   public void testLocalTxDsParser() throws Throwable
+   {
+      LegacyDsParser parser = new LegacyDsParser();
+      
+      for (String dsFileName : dsFilesName)
+      {
+         System.out.println("\nStart parse... " + dsFileName);
+         InputStream in = ParserTestCase.class.getClassLoader().getResourceAsStream("ds/" + dsFileName);
+         DataSources ds = parser.parse(in);
+         
+         if (ds != null)
+            System.out.println(ds.toString());
+      }
+   }
+}

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/asapxcess-jb3.2-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/asapxcess-jb3.2-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/asapxcess-jb3.2-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- configuration for aSAPXcess SAP adapter for jboss 3.2 -->
+<!-- ==================================================================== -->
+<!-- aSAPXcess adapter configuration for SAP R3                           -->
+<!-- Contact: aif_support at asapsolutions.com                               -->
+<!--                                                                      -->
+<!-- ==================================================================== -->
+<connection-factories>
+    <!-- mbean for adding license in the classpath. Add absolute path for the folder containing the aSAPXcessLicense.txt file 
+         i.e. file:D:/aSAPXCess_Jboss3.2/properties/ for windows    
+          i.e. file:/usr/home/aSAPXCess_Jboss3.2/properties/ for linux/solaris  
+    -->
+    <mbean code="org.jboss.deployment.ClasspathExtension" name="jboss.aSAPXcess:service=license">
+        <attribute name="MetadataURL">file:<add_properties_folder_path_here/></attribute>
+    </mbean>
+
+    <tx-connection-factory>
+        <depends>jboss.aSAPXcess:service=license</depends>    
+        <jndi-name>aSAPXcess</jndi-name>
+        <local-transaction/>
+        <adapter-display-name>aSAPXcess</adapter-display-name>
+        <config-property name="LogConfigFile" type="java.lang.String">ASAP_SAP_1_0.xml</config-property>
+        <config-property name="RootLogContext" type="java.lang.String">ASAP_SAP_1_0</config-property>
+        <config-property name="LogLevel" type="java.lang.String">WARN</config-property>
+        <config-property name="MessageBundleBase" type="java.lang.String">ASAP_SAP_1_0</config-property>
+        <config-property name="LanguageCode" type="java.lang.String">en</config-property>
+        <config-property name="CountryCode" type="java.lang.String">US</config-property>
+        <config-property name="UserName" type="java.lang.String"></config-property>
+        <config-property name="Password" type="java.lang.String"></config-property>
+        <config-property name="ClientNumber" type="java.lang.String"></config-property>
+        <config-property name="ServerName" type="java.lang.String"></config-property>
+        <config-property name="SystemNumber" type="java.lang.String"></config-property>
+        <config-property name="GatewayServerName" type="java.lang.String"></config-property>
+        <config-property name="GatewayServiceNumber" type="java.lang.String"></config-property>
+        <config-property name="SystemName" type="java.lang.String"></config-property>
+        <config-property name="MessageServerName" type="java.lang.String"></config-property>
+        <config-property name="GroupName" type="java.lang.String"></config-property>
+        <config-property name="ConnectionURL" type="java.lang.String"></config-property>
+
+        <min-pool-size>0</min-pool-size>
+        <max-pool-size>64</max-pool-size>
+            
+        <blocking-timeout-millis>5000</blocking-timeout-millis>
+        <idle-timeout-minutes>15</idle-timeout-minutes>
+
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+        <!-- pooling criteria.  USE AT MOST ONE-->
+        <!--  If you don't use JAAS login modules or explicit login 
+         getConnection(usr,pw) but rely on user/pw specified above, 
+         don't specify anything here -->
+
+        <!-- If you supply the usr/pw from a JAAS login module 
+        <security-domain>MySecurityDomain</security-domain>
+        -->
+        <!-- if your app supplies the usr/pw explicitly getConnection(usr, pw) 
+        <application-managed-security/>
+        -->
+    </tx-connection-factory>
+</connection-factories>
+

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/cicsr9s-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/cicsr9s-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/cicsr9s-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!--  CICSR9S provided by chen_comp in the forums                          -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: cicsr9s-ds.xml 22595 2004-08-02 19:24:08Z ejort $ -->
+
+<connection-factories> 
+
+   <tx-connection-factory> 
+
+      <jndi-name>ra/cicsr9s</jndi-name> 
+
+      <rar-name>cicsr9s.rar</rar-name> 
+      <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition> 
+
+      <config-property name="ConnectionURL" type="java.lang.String">tcp://arno</config-property> 
+      <config-property name="PortNumber" type="java.lang.String">2006</config-property> 
+      <config-property name="ServerName" type="java.lang.String">CICSR9S</config-property> 
+      <config-property name="UserName" type="java.lang.String">CICSUSER</config-property> 
+
+      <max-pool-size>50</max-pool-size> 
+
+   </tx-connection-factory> 
+
+</connection-factories> 

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/db2-400-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/db2-400-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/db2-400-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: db2-400-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+<!-- You need the jt400.jar that is delivered with IBM iSeries Access or the
+     OpenSource Project jtopen.
+
+     [systemname] Hostame of the iSeries
+     [schema]     Default schema is needed so jboss could use metadat to test if the tables exists
+
+     See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource
+  -->
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>DB2-400</jndi-name>
+    <connection-url>jdbc:as400://[systemname]/[schema];extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</connection-url>
+    <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
+    <user-name>[username]</user-name>
+    <password>[password]</password>
+    <min-pool-size>0</min-pool-size>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>DB2/400</type-mapping>
+      </metadata>
+
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/db2-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/db2-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/db2-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: db2-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>DB2DS</jndi-name>
+    <connection-url>jdbc:db2:yourdatabase</connection-url>
+    
+    <!-- DB2 Universal Driver Note connection URL is in form of
+         jdbc:db2://host:port:dbname
+         
+         Default port for Type 4 driver is 50000
+         
+         Note, host and port must be specified if using Type 4 driver. And be forewarned, no native
+         XA support is provided with Type 4; you must set a DB property calling for Type 2 to get XA
+         
+      <driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
+      <connection-url>jdbc:db2://[hostname]:[port]/databasename"</connection-url>
+      
+      Please see http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0512kokkat/
+      or the DB2 JDBC application developers manual.
+    -->  
+    
+    <driver-class>COM.ibm.db2.jdbc.app.DB2Driver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+    <min-pool-size>0</min-pool-size>
+    
+    <!-- New org.jboss.resource.adapter.jdbc.vendor.DB2ExceptionSorter
+    
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DB2ExceptionSorter</exception-sorter-class-name>
+    
+    --> 
+    
+    <!-- sql to call when connection is created
+    <new-connection-sql>some arbitrary sql</new-connection-sql>
+    -->
+
+    <!-- sql to call on an existing pooled connection when it is obtained from pool 
+    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+    -->
+
+  <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ 
+     
+      <metadata>
+         <type-mapping>DB2</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/db2-jcc-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/db2-jcc-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/db2-jcc-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<datasources>
+    <!--
+        IBM DB2 XA driver
+        db2jcc.jar
+    -->
+    
+    <xa-datasource>
+        <jndi-name>DB2XADS</jndi-name>
+       
+        <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
+        
+        <xa-datasource-property name="DatabaseName">your_database_name</xa-datasource-property>
+        <xa-datasource-property name="User">your_user</xa-datasource-property>
+        <xa-datasource-property name="Password">your_password</xa-datasource-property>
+        
+        <!-- If driverType 4 is used, the following tags are needed -->
+        <xa-datasource-property name="ServerName">your_server_name</xa-datasource-property>
+        <xa-datasource-property name="DriverType">4</xa-datasource-property>
+        <track-connection-by-tx></track-connection-by-tx>
+
+        <!-- Note, as opposed to the Type2 driver, DB2 Type 4 requires the PortNumber. By default this is 50000-->
+        <xa-datasource-property name="PortNumber">your_port_number</xa-datasource-property>
+        
+	<!-- Must be set if using multiple DB2 XA resources in same transaction -->
+        <isSameRM-override-value>false</isSameRM-override-value>    
+        
+        <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
+        <metadata>
+            <type-mapping>DB2</type-mapping>
+        </metadata>
+    
+    </xa-datasource>
+    
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/db2-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/db2-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/db2-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--    -->
+<!--  JBoss Server Configuration    -->
+<!-- Thanks to Horia Muntean <horia at bvb.ro>   -->
+<!-- ===================================================================== -->
+
+<!-- $Id: db2-xa-ds.xml 77479 2008-08-26 10:33:09Z alex.loubyansky at jboss.com $ -->
+
+
+<datasources>
+   <!--
+       XADatasource for DB2 V8.1 (app driver)
+       copy $db2_install_dir/java/db2java.zip into $jboss_install_dir/server/default/lib
+   -->
+
+   <xa-datasource>
+     <jndi-name>DB2XADS</jndi-name>
+     <!-- uncomment to enable interleaving <interleaving/> -->
+     <isSameRM-override-value>false</isSameRM-override-value>
+
+     <xa-datasource-class>COM.ibm.db2.jdbc.DB2XADataSource</xa-datasource-class>
+     <xa-datasource-property name="DatabaseName">yout_database_name</xa-datasource-property>
+     <xa-datasource-property name="User">your_user</xa-datasource-property>
+     <xa-datasource-property name="Password">your_password</xa-datasource-property>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>DB2</type-mapping>
+      </metadata>
+   </xa-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/derby-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/derby-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/derby-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Derby embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: derby-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DerbyDS</jndi-name>
+
+      <!-- for in-process persistent db, saved when jboss stops. The
+      org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db shutdown -->
+      <connection-url>jdbc:derby:${jboss.server.data.dir}${/}derby${/}localDB;create=true</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.apache.derby.jdbc.EmbeddedDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <idle-timeout-minutes>5</idle-timeout-minutes>
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- This mbean can be used when using in process persistent derby -->
+      <depends>jboss:service=Derby</depends>
+   </local-tx-datasource>
+
+   <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/derby-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/derby-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/derby-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss DataSource Configuration                                       -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: derby-xa-ds.xml 77479 2008-08-26 10:33:09Z alex.loubyansky at jboss.com $ -->
+
+<datasources>
+   <xa-datasource>
+      <jndi-name>XADerbyDS</jndi-name>
+
+      <!-- uncomment to enable interleaving <interleaving/> -->
+
+      <isSameRM-override-value>false</isSameRM-override-value>
+      <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
+
+      <!-- path to the database. (${jboss.server.data.dir}${/}derby${/}default didn't work on win) -->
+      <xa-datasource-property name="DatabaseName">derby/default</xa-datasource-property>
+      <xa-datasource-property name="User">sa</xa-datasource-property>
+      <xa-datasource-property name="Password"></xa-datasource-property>
+      <xa-datasource-property name="CreateDatabase">create</xa-datasource-property>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Derby</type-mapping>
+      </metadata>
+   </xa-datasource>
+
+<!--
+   An example used for HA XA tests
+
+   <ha-xa-datasource>
+      <jndi-name>XADerbyDS</jndi-name>
+      <interleaving/>
+      <isSameRM-override-value>false</isSameRM-override-value>
+
+      <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
+      <xa-datasource-property name="DatabaseName">derby/hatest1|derby/hatest2</xa-datasource-property>
+      <xa-datasource-property name="User">sa</xa-datasource-property>
+      <xa-datasource-property name="Password"></xa-datasource-property>
+      <xa-datasource-property name="CreateDatabase">create</xa-datasource-property>
+
+      <url-property>DatabaseName</url-property>
+      <url-delimeter>|</url-delimeter>
+
+      <check-valid-connection-sql>VALUES CURRENT TIMESTAMP</check-valid-connection-sql>
+
+      <metadata>
+         <type-mapping>Derby</type-mapping>
+      </metadata>
+   </ha-xa-datasource>
+-->
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/facets-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/facets-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/facets-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <!-- ====================================================================
+       Facets service description for JBoss 3.0
+       
+       This file and the lib/facetsAdapter.rar archive should be copied to
+       the "deploy" directory of your JBoss server.
+       
+       Configurable sections are
+            <config-property> elements
+            ManagedConnectionPool attributes
+            <authentication> element
+       ==================================================================== -->
+
+<connection-factories>
+
+  <tx-connection-factory>
+
+    <jndi-name>Facets</jndi-name>
+
+    <xa-transaction/>
+    <!-- uncomment to enable interleaving <interleaving/> -->
+
+    <attribute name="JndiName">Facets</attribute>
+
+    <adapter-display-name>GemStone_Facets</adapter-display-name>
+
+    <!--
+    <config-property name="DefaultUser" type="java.lang.String">so-and-so</config-property>
+    -->
+
+    <!--
+    <config-property name="DefaultPassword" type="java.lang.String">secret</config-property>
+    -->
+
+    <!--
+    <config-property name="SessionConfigFile" type="java.lang.String"></config-property>
+    -->
+
+    <config-property name="Verbose" type="java.lang.String"></config-property>
+
+    <config-property name="Debug" type="java.lang.String"></config-property>
+
+  </tx-connection-factory>
+
+</connection-factories>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/fastobjects-jboss32-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/fastobjects-jboss32-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/fastobjects-jboss32-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+	this file contains the configuration for using
+	the FastObjects t7 resource adapter with JBoss 3.2.1,
+	note, that the MBean name for JaasSecurityManager differs between JBoss 3.0.0 and 3.0.4
+	
+	make sure, that the FastObjects native libraries can be loaded (Windows:
+	runtime/bin of your FastObjects-Installation must be contained in PATH)
+	and that jdo.jar is copied into the default\lib-directory.
+	
+	Place this file and the RAR-file into the default\deploy directory.
+
+-->
+
+<connection-factories>
+
+
+
+  <tx-connection-factory>
+    <jndi-name>t7Connector</jndi-name>
+
+    <local-transaction/>
+    <adapter-display-name>t7-jdo</adapter-display-name>
+
+    <config-property name="ConnectionURL" type="java.lang.String">FastObjects://localhost/myBase</config-property>
+    <config-property name="TransactionDemarcation" type="java.lang.String">ContainerManaged</config-property>
+    <config-property name="VerboseMode" type="java.lang.String">0</config-property>
+
+    <min-pool-size>5</min-pool-size>
+    <max-pool-size>50</max-pool-size>
+    <blocking-timeout-millis>5000</blocking-timeout-millis>
+    <idle-timeout-minutes>15</idle-timeout-minutes>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+
+  </tx-connection-factory>
+</connection-factories>
+

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/firebird-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/firebird-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/firebird-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <!-- $Id: firebird-ds.xml 84886 2009-02-27 17:48:44Z scott.stark at jboss.org $ -->
+  
+  <!-- ==================================================================== -->
+  <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->
+  <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
+  <!-- ==================================================================== -->
+
+<connection-factories>
+
+  <!--FBManager can be used to create and drop databases.  
+    Drop is especially useful during testing, since it 
+    assures a clean start next time. -->
+  <mbean code="org.firebirdsql.management.FBManager" name="jboss.jca:service=FirebirdManager">
+    <attribute name="FileName">${jboss.server.data.dir}${/}fbtest.gdb</attribute>
+    <attribute name="UserName">sysdba</attribute>
+    <attribute name="Password">masterkey</attribute>
+    <attribute name="CreateOnStart">true</attribute>
+    <attribute name="DropOnStop">false</attribute>
+  </mbean>
+
+  <tx-connection-factory>
+    <jndi-name>FirebirdDS</jndi-name>
+    <xa-transaction/>
+    <!-- uncomment to enable interleaving <interleaving/> -->
+
+    <rar-name>firebirdsql.rar</rar-name>
+    <connection-definition>javax.sql.DataSource</connection-definition>    
+    <config-property name="Database" type="java.lang.String">localhost/3050:${jboss.server.data.dir}${/}fbtest.gdb</config-property>
+    <user-name>sysdba</user-name>
+    <password>masterkey</password>
+    <!--additional properties. only use one way of setting tx isolation, please
+    <config-property name="TransactionIsolation"></config-property>
+    <config-property name="TransactionIsolationName">TRANSACTION_READ_COMMITTED</config-property>
+    <config-property name="BlobBufferLength"></config-property>
+    <config-property name="Encoding">UNICODE_FSS</config-property>
+    -->
+    <min-pool-size>0</min-pool-size>
+    <!-- sql to call when connection is created
+    <new-connection-sql>some arbitrary sql</new-connection-sql>
+    -->
+    <!-- sql to call on an existing pooled connection when it is obtained from pool 
+    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+    -->
+    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->    
+    <metadata>
+      <type-mapping>Firebird</type-mapping>
+    </metadata>    
+  </tx-connection-factory>
+
+</connection-factories>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/hajndi-jms-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/hajndi-jms-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/hajndi-jms-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connection-factories>
+ 
+  <!-- ==================================================================== -->
+  <!-- JMS Stuff                                                            -->
+  <!-- ==================================================================== -->
+
+  <!-- The JMS provider loader -->
+  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
+	 name="jboss.mq:service=JMSProviderLoader,name=HAJNDIJMSProvider">
+    <attribute name="ProviderName">DefaultJMSProvider</attribute>
+    <attribute name="ProviderAdapterClass">
+      org.jboss.jms.jndi.JNDIProviderAdapter
+    </attribute>
+    <!-- The combined connection factory -->
+    <attribute name="FactoryRef">XAConnectionFactory</attribute>
+    <!-- The queue connection factory -->
+    <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
+    <!-- The topic factory -->
+    <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
+    <!-- Access JMS via HAJNDI -->
+    <attribute name="Properties">
+       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+       java.naming.provider.url=${jboss.bind.address:localhost}:1100
+       jnp.disableDiscovery=false
+       jnp.partitionName=${jboss.partition.name:DefaultPartition}
+       jnp.discoveryGroup=${jboss.partition.udpGroup:230.0.0.4}
+       jnp.discoveryPort=1102
+       jnp.discoveryTTL=16
+       jnp.discoveryTimeout=5000
+       jnp.maxRetries=1
+    </attribute>
+  </mbean>
+
+  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
+  <tx-connection-factory>
+    <jndi-name>JmsXA</jndi-name>
+    <xa-transaction/>
+    <rar-name>jms-ra.rar</rar-name>
+    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
+    <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+    <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+    <max-pool-size>20</max-pool-size>
+    <security-domain-and-application>JmsXARealm</security-domain-and-application>
+  </tx-connection-factory>
+
+</connection-factories>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: hsqldb-ds.xml 109975 2010-12-16 20:21:59Z rachmatowicz at jboss.com $ -->
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DefaultDS</jndi-name>
+
+      <!-- For server mode db, allowing other processes to use hsqldb over tcp.
+      This requires the org.jboss.jdbc.HypersonicDatabase mbean.
+      <connection-url>
+          <value-factory bean="ServiceBindingManager" method="getStringBinding">
+             <parameter>Hypersonic</parameter>
+             <parameter>jdbc:hsqldb:hsql://${hostforurl}:${port}</parameter>
+          </value-factory>
+      </connection-url>
+      -->
+      <!-- For totally in-memory db, not saved when jboss stops. 
+      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+      <connection-url>jdbc:hsqldb:.</connection-url>
+      -->
+      <!-- For in-process persistent db, saved when jboss stops.
+      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+      -->
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+
+      <!--example of how to specify class that determines if exception means connection should be destroyed-->
+      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+
+      <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+
+      <!-- sql to call on an existing pooled connection when it is obtained from pool 
+         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+      -->
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- Use the getConnection(user, pw) for logins
+        <application-managed-security/>
+      -->
+
+      <!-- Use the security domain defined in conf/login-config.xml -->
+      <security-domain>HsqlDbRealm</security-domain>
+
+      <!-- Use the security domain defined in conf/login-config.xml or the
+           getConnection(user, pw) for logins. The security domain takes precedence.
+        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+      -->
+
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+
+      <!-- When using in-process (standalone) mode -->
+      <depends>jboss:service=Hypersonic,database=localDB</depends>
+      <!-- Uncomment when using hsqldb in server mode
+      <depends>jboss:service=Hypersonic</depends>
+      -->
+   </local-tx-datasource>
+
+   <!-- Uncomment if you want hsqldb accessed over tcp (server mode)
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+     name="jboss:service=Hypersonic">
+     <attribute name="Port">        
+        <value-factory bean="ServiceBindingManager" method="getIntBinding" 
+           parameter="jboss:service=Hypersonic"/>
+     </attribute>
+     <attribute name="BindAddress">        
+        <value-factory bean="ServiceBindingManager" method="getStringBinding" 
+           parameter="jboss:service=Hypersonic"/>
+     </attribute>     
+     <attribute name="Silent">true</attribute>
+     <attribute name="Database">default</attribute>
+     <attribute name="Trace">false</attribute>
+     <attribute name="No_system_exit">true</attribute>
+   </mbean>
+   -->
+
+   <!-- For hsqldb accessed from jboss only, in-process (standalone) mode --> 
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+     name="jboss:service=Hypersonic,database=localDB">
+     <attribute name="Database">localDB</attribute>
+     <attribute name="InProcessMode">true</attribute>
+   </mbean>
+   
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-encrypted-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-encrypted-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/hsqldb-encrypted-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config        -->
+<!-- that illustrates the use of the JaasSecurityDomainIdentityLoginModule -->
+<!-- to use encrypted password in the data source configuration.           -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: hsqldb-encrypted-ds.xml 109975 2010-12-16 20:21:59Z rachmatowicz at jboss.com $ -->
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DefaultDS</jndi-name>
+
+      <!-- For server mode db, allowing other processes to use hsqldb over tcp.
+      This requires the org.jboss.jdbc.HypersonicDatabase mbean.
+      <connection-url>
+         <value-factory bean="ServiceBindingManager" method="getStringBinding">
+            <parameter>Hypersonic</parameter>
+            <parameter>jdbc:hsqldb:hsql://${hostforurl}:${port}</parameter>
+         </value-factory>
+      </connection-url>
+      -->
+      <!-- For totally in-memory db, not saved when jboss stops. 
+      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+      <connection-url>jdbc:hsqldb:.</connection-url>
+      -->
+      <!-- For in-process persistent db, saved when jboss stops.
+      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+      -->
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!--example of how to specify class that determines if exception means connection should be destroyed-->
+      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+
+      <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+
+      <!-- sql to call on an existing pooled connection when it is obtained from pool 
+         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+      -->
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- Use the getConnection(user, pw) for logins
+        <application-managed-security/>
+      -->
+
+      <!-- Use the security domain defined in conf/login-config.xml -->
+      <security-domain>EncryptedHsqlDbRealm</security-domain>
+
+      <!-- Use the security domain defined in conf/login-config.xml or the
+           getConnection(user, pw) for logins. The security domain takes precedence.
+        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+      -->
+
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+      
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+
+      <!-- When using in-process (standalone) mode -->
+      <depends>jboss:service=Hypersonic,database=localDB</depends>
+      <!-- Uncomment when using hsqldb in server mode
+      <depends>jboss:service=Hypersonic</depends>
+      -->
+   </local-tx-datasource>
+
+   <!-- The JaasSecurityDomain used for encryption. Use the name
+   "jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword"
+   as the value of the JaasSecurityDomainIdentityLoginModule
+   jaasSecurityDomain login module option in the EncryptedHsqlDbRealm
+   login-config.xml section. Typically this service config should be in
+   the conf/jboss-service.xml descriptor.
+   The opaque master.password file could be created using: 
+   java -cp jbosssx.jar org.jboss.security.plugins.FilePassword 12345678 17 master server.password
+
+   The corresponding login-config.xml would look like:
+    <application-policy name = "EncryptedHsqlDbRealm">
+       <authentication>
+          <login-module code = "org.jboss.resource.security.JaasSecurityDomainIdentityLoginModule"
+          flag = "required">
+             <module-option name = "username">sa</module-option>
+             <module-option name = "password">E5gtGMKcXPP</module-option>
+             <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+             <module-option name = "jaasSecurityDomain">jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+    where the encrypted password was generated using:
+     java -cp jbosssx.jar org.jboss.security.plugins.PBEUtils abcdefgh 13 master ''
+     Encoded password: E5gtGMKcXPP
+   -->
+   <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
+      name="jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword">
+      <constructor>
+         <arg type="java.lang.String" value="ServerMasterPassword"/>
+      </constructor>
+      <!-- The opaque master password file used to decrypt the encrypted
+      database password key -->
+      <attribute name="KeyStorePass">{CLASS}org.jboss.security.plugins.FilePassword:${jboss.server.home.dir}/conf/server.password</attribute>
+      <attribute name="Salt">abcdefgh</attribute>
+      <attribute name="IterationCount">13</attribute>
+   </mbean>
+
+   <!-- Uncomment if you want hsqldb accessed over tcp (server mode)
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+     name="jboss:service=Hypersonic">
+     <attribute name="Port">
+        <value-factory bean="ServiceBindingManager" method="getIntBinding" 
+           parameter="jboss:service=Hypersonic"/>
+     </attribute>
+     <attribute name="BindAddress">
+        <value-factory bean="ServiceBindingManager" method="getStringBinding" 
+           parameter="jboss:service=Hypersonic"/>
+     </attribute>     
+     <attribute name="Silent">true</attribute>
+     <attribute name="Database">default</attribute>
+     <attribute name="Trace">false</attribute>
+     <attribute name="No_system_exit">true</attribute>
+   </mbean>
+   -->
+   
+   <!-- For hsqldb accessed from jboss only, in-process (standalone) mode --> 
+   <mbean code="org.jboss.jdbc.HypersonicDatabase"
+      name="jboss:service=Hypersonic,database=localDB">
+      <attribute name="Database">localDB</attribute>
+      <attribute name="InProcessMode">true</attribute>
+   </mbean>
+   
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/informix-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/informix-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/informix-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: informix-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>InformixDS</jndi-name>
+    <connection-url>jdbc:informix-sqli://myhost.mydomain.com:1557/mydb:INFORMIXSERVER=myserver</connection-url>
+    <driver-class>com.informix.jdbc.IfxDriver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
+    <!-- sql to call when connection is created
+    <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+    <!-- sql to call on an existing pooled connection when it is obtained from pool 
+    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+    <metadata>
+       <type-mapping>InformixDB</type-mapping>
+    </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/informix-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/informix-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/informix-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: informix-xa-ds.xml 26313 2004-12-02 10:52:37Z schrouf $ -->
+
+
+<datasources>
+  <xa-datasource>
+    <jndi-name>InformixXADS</jndi-name>
+    <xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
+    <xa-datasource-property name="IfxWAITTIME">10</xa-datasource-property>
+    <xa-datasource-property name="Description">Something Descriptive</xa-datasource-property>
+    <xa-datasource-property name="IfxIFXHOST">myhost.mydomain.com</xa-datasource-property>
+    <xa-datasource-property name="PortNumber">1557</xa-datasource-property>
+    <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
+    <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
+    <!-- sql to call when connection is created
+    <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+    <!-- sql to call on an existing pooled connection when it is obtained from pool 
+    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+    <metadata>
+       <type-mapping>InformixDB</type-mapping>
+    </metadata>
+  </xa-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/jdatastore-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/jdatastore-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/jdatastore-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: jdatastore-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!-- ==================================================================== -->
+<!-- Copy these jar's from your JBuilder6/lib to your jboss's lib         -->
+<!--                dx.jar,jdsserver.jar,jds.jar                          -->
+<!--  Originally from Brent Thompson www.protegra.com/javagroup.html      -->
+<!-- ==================================================================== -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>JDataStoreDS</jndi-name>
+    <connection-url>jdbc:borland:dslocal:/home/brent/JBuilder6/samples/JDataStore/datastores/employee.jds</connection-url>
+    <driver-class>com.borland.datastore.jdbc.DataStoreDriver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/jms-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/jms-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/jms-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connection-factories>
+ 
+  <!-- ==================================================================== -->
+  <!-- JMS Stuff                                                            -->
+  <!-- ==================================================================== -->
+
+  <!-- The JMS provider loader -->
+  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
+	 name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
+    <attribute name="ProviderName">DefaultJMSProvider</attribute>
+    <attribute name="ProviderAdapterClass">
+      org.jboss.jms.jndi.JNDIProviderAdapter
+    </attribute>
+    <!-- The combined connection factory -->
+    <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+    <!-- The queue connection factory -->
+    <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+    <!-- The topic factory -->
+    <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+    <!-- Uncomment to use HAJNDI to access JMS
+    <attribute name="Properties">
+       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+       java.naming.provider.url=localhost:1100
+    </attribute>
+    -->
+  </mbean>
+
+  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
+  <tx-connection-factory>
+    <jndi-name>JmsXA</jndi-name>
+    <xa-transaction/>
+    <rar-name>jms-ra.rar</rar-name>
+    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
+    <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+    <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+    <security-domain-and-application>JmsXARealm</security-domain-and-application>
+    <max-pool-size>20</max-pool-size>
+  </tx-connection-factory>
+
+</connection-factories>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/jsql-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/jsql-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/jsql-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: jsql-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+  <!-- ======================================================================-->
+  <!-- ConnectionManager setup for JSQL Microsoft SQL Server 2000 driver     -->
+  <!-- ===================================================================== -->
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>JSQLDS</jndi-name>
+    <connection-url>jdbc:JSQLConnect://localhost:1433/databaseName=testdb</connection-url>
+    <driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/lido-versant-service.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/lido-versant-service.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/lido-versant-service.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <!-- ==================================================================== -->
+  <!-- ConnectionManager setup for LiDO jdo using Versant object db.-->
+  <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
+  <!-- ==================================================================== -->
+
+<service>
+
+  <!-- the enhanced classes must already be deployed before this adapter is started.  Currently
+       LiDO does not work with jboss to find the metadata.jdo if it is in a jar file, so you must
+       put it on the classpath independently as a file.  The license can be added similarly -->
+
+  <!-- as of LiDO build 17 it is necessary that all metadata be in one metadata.jdo file. -->
+
+  <!--Specify the metadata file name and get the metadata file on the classpath.  
+    Hopefully LiDO will make this a ManagedConnectionFactory property soon.-->
+  <mbean code="org.jboss.deployment.ClasspathExtension" name="jboss.jdo.lido:service=metadata">
+    <attribute name="MetadataURL">file:/usr/java/fgm/co4copy/tracker2/domain/src/resources/</attribute>
+  </mbean>
+
+  <mbean code="org.jboss.deployment.ClasspathExtension" name="jboss.jdo.lido:service=license">
+    <attribute name="MetadataURL">file:/usr/java/lido/bin/</attribute>
+  </mbean>
+
+  <mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" name="jboss.jca:service=XaTxCM,name=LiDOVersantDS">
+
+    <!--depend on the metadata helper-->
+    <depends>jboss.jdo.lido:service=metadata</depends>
+    <depends>jboss.jdo.lido:service=license</depends>
+
+
+    <attribute name="JndiName">adap_1</attribute>
+    <depends optional-attribute-name="ManagedConnectionPool">
+      <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=XaTxPool,name=LiDOVersantDS">
+
+    <depends optional-attribute-name="ManagedConnectionFactoryName">
+      <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=XaTxDS,name=LiDOVersantDS">
+        <!--more hack-->
+        <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=LiDO</depends>
+        <attribute name="ManagedConnectionFactoryProperties">
+          <properties>
+            <config-property name="ConnectionDriverName" type="java.lang.String">versant</config-property>
+            <config-property name="ConnectionURL" type="java.lang.String">trackerdb</config-property>
+            <!--config-property name="ConnectionDriverName" type="java.lang.String">fdb</config-property>
+            <config-property name="ConnectionURL" type="java.lang.String">/usr/java/lido/samples/company_basic/fdb.properties</config-property-->
+            <config-property name="ConnectionUserName" type="java.lang.String">david</config-property>
+            <config-property name="ConnectionPassword" type="java.lang.String">david</config-property>
+          </properties>
+        </attribute>
+      </mbean>
+
+    </depends>
+        <attribute name="MinSize">0</attribute>
+        <attribute name="MaxSize">50</attribute>
+        <attribute name="BlockingTimeoutMillis">5000</attribute>
+        <attribute name="IdleTimeoutMinutes">15</attribute>
+        <!--criteria indicates if Subject (from security domain) or app supplied
+            parameters (such as from getConnection(user, pw)) are used to distinguish
+            connections in the pool. Choices are 
+            ByContainerAndApplication (use both), 
+            ByContainer (use Subject),
+            ByApplication (use app supplied params only),
+            ByNothing (all connections are equivalent, usually if adapter supports
+              reauthentication)-->
+        <attribute name="Criteria">ByContainer</attribute>
+      </mbean>
+    </depends>
+    <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
+    <!-- Include a login module configuration named FirebirdDBRealm.
+         Update your login-conf.xml, here is an example for a 
+         ConfiguredIdentityLoginModule:
+
+    <application-policy name = "LiDOVersantDSBRealm">
+       <authentication>
+          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
+             <module-option name = "principal">sysdba</module-option>
+             <module-option name = "userName">sysdba</module-option>
+             <module-option name = "password">masterkey</module-option>
+             <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=LiDOVersantDS</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the 
+      module-option name = "managedConnectionFactoryName"
+    must match the object name of the ConnectionManager you are configuring here.
+    -->
+    <!--comment out this line if you want component managed security or want
+        to use the default values in the ManagedConnectionFactoryProperties - ->
+    <attribute name="SecurityDomainJndiName">LiDOVersantDSRealm</attribute-->
+
+    <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
+
+    <attribute name="TransactionManager">java:/TransactionManager</attribute>
+  </mbean>
+
+</service>
\ No newline at end of file

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: mimer-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+<!-- ==================================================================== -->
+<!-- ConnectionManager setup for Mimer SQL for local transactions         -->
+<!--                                                                      -->
+<!-- Supplied by fredrik.alund at upright.se                                 -->
+<!-- ==================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>MimerDS</jndi-name>
+      <driver-class>com.mimer.jdbc.Driver</driver-class>
+      <connection-url>jdbc:mimer:multi1</connection-url>
+      <user-name>changeme</user-name>
+      <password>changeme</password>
+      <min-pool-size>5</min-pool-size>
+      <max-pool-size>100</max-pool-size>
+      <blocking-timeout-millis>5000</blocking-timeout-millis>
+      <idle-timeout-minutes>15</idle-timeout-minutes>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Mimer SQL</type-mapping>
+      </metadata>
+   </local-tx-datasource>
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/mimer-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: mimer-xa-ds.xml 23720 2004-09-15 14:37:40Z loubyansky $ -->
+
+<!-- ==================================================================== -->
+<!-- ConnectionManager setup for Mimer SQL for distributed transactions   -->
+<!--                                                                      -->
+<!-- Requires version 9                                                   -->
+<!--                                                                      -->
+<!-- Supplied by fredrik.alund at upright.se                                 -->
+<!-- ==================================================================== -->
+
+<datasources>
+   <xa-datasource>
+      <jndi-name>XAMimerDS</jndi-name>
+      <xa-datasource-class>com.mimer.jdbc.MimerXADataSource</xa-datasource-class>
+      <xa-datasource-property name="DatabaseName">multi1</xa-datasource-property>
+      <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
+      <xa-datasource-property name="PortNumber">1360</xa-datasource-property>
+      <user-name>changeme</user-name>
+      <password>changeme</password>
+      <min-pool-size>5</min-pool-size>
+      <max-pool-size>100</max-pool-size>
+      <blocking-timeout-millis>5000</blocking-timeout-millis>
+      <idle-timeout-minutes>15</idle-timeout-minutes>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Mimer SQL</type-mapping>
+      </metadata>
+   </xa-datasource>
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/msaccess-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/msaccess-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/msaccess-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+
+<!-- $Id: msaccess-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!-- ==================================================================== -->
+<!-- This uses the sun jdbc-odbc driver, so don't expect miracles          -->
+<!-- Thanks to Alan Moor, who warns...                                     -->
+<!-- Remember, though, never trust critical data, or data that you can't   -->
+<!-- afford to lose, or data that you need quick access to, or data that   -->
+<!-- needs to be secure, to Microsoft Access.                              -->
+<!-- ===================================================================== -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>MSAccessDS</jndi-name>
+    <!-- format of URL is "jdbc:odbc:DSNNAME" -->
+    <connection-url>jdbc:odbc:INsightDSN</connection-url>
+    <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: mssql-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+  <!-- ======================================================================-->
+  <!-- New ConnectionManager setup for Microsoft SQL Server 2005  driver     -->
+  <!-- Further information about the Microsoft JDBC Driver version 1.1      -->
+  <!-- can be found here:                                                   -->
+  <!-- http://msdn2.microsoft.com/en-us/library/aa496082.aspx               -->  
+  <!-- ===================================================================== -->
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>MSSQLDS</jndi-name>
+    <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url>
+    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>MS SQLSERVER2000</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/mssql-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: mssql-xa-ds.xml 93459 2009-09-14 08:49:20Z istudens at redhat.com $ -->
+  <!-- ==================================================================== -->
+  <!-- ConnectionManager setup for xa Microsoft SQL Server 2005, using      -->
+  <!-- Microsoft's JDBC driver.                                             -->
+  <!-- Thanks to Benjamin Geer  <benjamin.geer at misys.com>                   -->
+  <!-- Be sure to set the JndiName property to the name you want to look up -->
+  <!-- the datasource under and set the location of your database in        -->
+  <!-- the xa-datasource-property section.                                  -->
+  <!-- Further information about the Microsoft JDBC Driver version 1.1      -->
+  <!-- can be found here:                                                   -->
+  <!-- http://msdn2.microsoft.com/en-us/library/aa496082.aspx               -->
+  <!-- ==================================================================== -->
+
+
+<datasources>
+  <xa-datasource>
+    <jndi-name>MSSQLXADS</jndi-name>
+    <!-- uncomment to enable interleaving <interleaving/> -->
+    <isSameRM-override-value>false</isSameRM-override-value>
+    <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
+    <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
+    <xa-datasource-property name="DatabaseName">mydatabase</xa-datasource-property>
+    <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
+    <xa-datasource-property name="User">myuser</xa-datasource-property>
+    <xa-datasource-property name="Password">mypassword</xa-datasource-property>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>MS SQLSERVER2000</type-mapping>
+      </metadata>
+  </xa-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: mysql-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!--  Datasource config for MySQL using 3.0.9 available from:
+http://www.mysql.com/downloads/api-jdbc-stable.html
+-->
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>MySqlDS</jndi-name>
+    <connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
+    <driver-class>com.mysql.jdbc.Driver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
+    <!-- should only be used on drivers after 3.22.1 with "ping" support
+    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
+    -->
+    <!-- sql to call when connection is created
+    <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+    <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
+    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+    <metadata>
+       <type-mapping>mySQL</type-mapping>
+    </metadata>
+  </local-tx-datasource>
+</datasources>
+

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/mysql-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: mysql-ds.xml 88948 2009-05-15 14:09:08Z jesper.pedersen $ -->
+<!--  Datasource config for MySQL using 3.0.9 available from:
+http://www.mysql.com/downloads/api-jdbc-stable.html
+-->
+
+<datasources>
+  <xa-datasource>
+    <jndi-name>MysqlDS</jndi-name>
+    <track-connection-by-tx>true</track-connection-by-tx> 
+    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
+    <xa-datasource-property name="ServerName">server_name</xa-datasource-property>
+    <xa-datasource-property name="DatabaseName">database_name</xa-datasource-property>
+    <xa-datasource-property name="User">user</xa-datasource-property>
+    <xa-datasource-property name="Password">password</xa-datasource-property>
+
+    <!-- should only be used on drivers after 3.22.1 with "ping" support
+    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
+    -->
+    <!-- sql to call when connection is created
+    <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+    <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
+    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+    <metadata>
+       <type-mapping>mySQL</type-mapping>
+    </metadata>
+  </xa-datasource>
+</datasources>
+

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: oracle-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!-- ==================================================================== -->
+<!--  Datasource config for Oracle originally from Steven Coy             -->
+<!-- ==================================================================== -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>OracleDS</jndi-name>
+    <connection-url>jdbc:oracle:thin:@youroraclehost:1521:yoursid</connection-url>
+	<!--
+
+		Here are a couple of the possible OCI configurations.
+		For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm
+
+	<connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
+		or
+	<connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
+
+		Clearly, its better to have TNS set up properly.
+	 -->
+    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
+    <!-- Checks the Oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Oracle9i</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/oracle-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 77479 2008-08-26 10:33:09Z alex.loubyansky at jboss.com $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION:  DO NOT FORGET TO SET Pad=true IN transaction-service.xml  -->
+<!-- ===================================================================== -->
+
+<datasources>
+  <xa-datasource>
+    <jndi-name>XAOracleDS</jndi-name>
+    <!-- uncomment to enable interleaving <interleaving/> -->
+    <isSameRM-override-value>false</isSameRM-override-value>
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-datasource-property name="URL">jdbc:oracle:oci8:@tc</xa-datasource-property>
+    <xa-datasource-property name="User">scott</xa-datasource-property>
+    <xa-datasource-property name="Password">tiger</xa-datasource-property>
+    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
+    <!-- Checks the Oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+    <no-tx-separate-pools/>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Oracle9i</type-mapping>
+      </metadata>
+  </xa-datasource>
+
+  <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter" 
+         name="jboss.jca:service=OracleXAExceptionFormatter">
+    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
+  </mbean>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Example of the pointbase 4.8 datasource configuration -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: pointbase-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>DefaultDS</jndi-name>
+      <connection-url>jdbc:pointbase:server://@pointbase.server@:@pointbase.port/pointbase.dbName@,new</connection-url>
+      <driver-class>com.pointbase.jdbc.jdbcUniversalDriver</driver-class>
+      <user-name>@pointbase.user@</user-name>
+      <password>@pointbase.passwd@</password>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>PointBase</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/pointbase-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Example of the pointbase 4.8 XA datasource configuration -->
+<!-- $Id: pointbase-xa-ds.xml 23720 2004-09-15 14:37:40Z loubyansky $ -->
+
+<datasources>
+   <xa-datasource>
+      <jndi-name>PointbaseXA</jndi-name>
+      <xa-datasource-class>com.pointbase.xa.xaDataSource</xa-datasource-class>
+      <xa-datasource-property name="ServerName">@pointbase.server@</xa-datasource-property>
+      <xa-datasource-property name="DatabaseName">9092</xa-datasource-property>
+      <user-name>@pointbase.user@</user-name>
+      <password>@pointbase.passwd@</password>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>PointBase</type-mapping>
+      </metadata>
+   </xa-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: postgres-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!-- ==================================================================== -->
+<!--  Datasource config for Postgres                                      -->
+<!-- ==================================================================== -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>PostgresDS</jndi-name>
+    <connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url>
+    <driver-class>org.postgresql.Driver</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+        <!-- sql to call when connection is created.  Can be anything, select 1 is valid for PostgreSQL
+        <new-connection-sql>select 1</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool.  Can be anything, select 1 is valid for PostgreSQL
+        <check-valid-connection-sql>select 1</check-valid-connection-sql>
+        -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>PostgreSQL 7.2</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/postgres-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<datasources>
+  <xa-datasource>
+    <jndi-name>PostgresDS</jndi-name>
+    <track-connection-by-tx>true</track-connection-by-tx> 
+    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
+    <xa-datasource-property name="ServerName">server_name</xa-datasource-property>
+    <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
+    <xa-datasource-property name="DatabaseName">database_name</xa-datasource-property>
+    <xa-datasource-property name="User">user</xa-datasource-property>
+    <xa-datasource-property name="Password">password</xa-datasource-property>
+
+        <!-- sql to call when connection is created.  Can be anything, select 1 is valid for PostgreSQL
+        <new-connection-sql>select 1</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool.  Can be anything, select 1 is valid for PostgreSQL
+        <check-valid-connection-sql>select 1</check-valid-connection-sql>
+        -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>PostgreSQL 7.2</type-mapping>
+      </metadata>
+
+  </xa-datasource>
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/progress-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/progress-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/progress-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: progress-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!-- ==================================================================== -->
+<!--  Datasource config for Progress 9.1                                  -->
+<!--                                                                      -->
+<!--  Based on config provided by victorstar in the forums                -->
+<!--                                                                      -->
+<!--  Beside adding the driver jar to server/[config]/lib you also        -->
+<!--  need to add the native library to your path.                        -->
+<!--  e.g. JdbcProgress.dll on windows                                    -->
+<!-- ==================================================================== -->
+
+<datasources>
+
+   <local-tx-datasource>
+      <jndi-name>ProgressDS</jndi-name>
+
+      <connection-url>jdbc:JdbcProgress:T:dbserver:3305:liveappl</connection-url>
+      <driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
+      <user-name>user</user-name>
+      <password>password</password>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>PostgreSQL 7.2</type-mapping>
+      </metadata>
+   </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/sapdb-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/sapdb-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/sapdb-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- New ConnectionManager setup for Sapdb using the sapdbc driver         -->
+<!-- Thanks to Kasper Nielsen <news at kav.dk>                                -->
+<!-- See http://www.sapdb.org/sap_db_jdbc.htm for details                  -->
+<!-- This is a minimal example.  See the generic example for other stuff   -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: sapdb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>SapdbDS</jndi-name>
+    <connection-url>jdbc:sapdb://127.0.0.1/DB_NAME</connection-url>
+    <driver-class>com.sap.dbtech.jdbc.DriverSapDB</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>SapDB</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/sapr3-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/sapr3-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/sapr3-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!-- ==================================================================== -->
+  <!-- ConnectionManager setup for SAP R3                                   -->
+  <!--  Author: David Jencks (d_jencks at users.sourceforge.net)               -->
+  <!--  Author: Chris Pinfold (chrisp at yambay.com)                           -->
+  <!--  Author: Juraj Lenharcik (nort at nort.de) ;-)	                    -->
+  <!-- ==================================================================== -->
+
+<connection-factories>
+  <tx-connection-factory>
+    <adapter-display-name>SAPJRA</adapter-display-name>
+    <jndi-name>eis/SAPJRA</jndi-name>
+    <config-property name="SAPClient" type="java.lang.String">150</config-property>
+    <user-name>dsgsd</user-name>
+    <password>sdgsdg</password>
+    <config-property name="Language" type="java.lang.String">DE</config-property>
+    <config-property name="ServerName" type="java.lang.String">44.44.44.44</config-property>
+    <config-property name="SystemNumber" type="java.lang.String">00</config-property>
+    <config-property name="PortNumber" type="java.lang.String">10</config-property>
+<!--    <config-property name="GatewayServerName" type="java.lang.String">a</config-property>
+    <config-property name="GatewayServiceNumber" type="java.lang.String">a</config-property>
+    <config-property name="MessageServerName" type="java.lang.String">a</config-property>
+    <config-property name="SystemName" type="java.lang.String">a</config-property>
+    <config-property name="GroupName" type="java.lang.String">a</config-property>   -->
+  </tx-connection-factory>
+</connection-factories>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/solid-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/solid-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/solid-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: solid-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<!-- ==================================================================== -->
+<!-- DataSource configuration for solid using 3.0 driver                  -->
+<!-- Thanks to Casey Haakenson                                            -->
+<!-- ==================================================================== -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>SolidDS</jndi-name>
+    <!--NOTE: Solid wants the username/password in the URL, it will 
+            ignore the specific arguments.-->
+    <connection-url>jdbc:solid://yourdbhost:1964/yourdbusername/yourdbpassword</connection-url>
+    <driver-class>solid.jdbc.SolidDriver</driver-class>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>SOLID</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- New ConnectionManager setup for Sybase ASE/ASA jConnect driver        -->
+<!-- Thanks to Marc Zampetti <zampetti at aol.net>                            -->
+<!-- This is a minimal example.  See the generic example for other stuff   -->
+<!-- ===================================================================== -->
+
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
+<!-- $Id: sybase-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>jdbc/SybaseDB</jndi-name>
+    <!-- Sybase jConnect URL for the database. 
+    NOTE: The hostname and port are made up values. The optional
+          database name is provided, as well as some additinal Driver
+          parameters.
+    -->
+    <connection-url>jdbc:sybase:Tds:host.at.some.domain:5000/db_name?JCONNECT_VERSION=6</connection-url>
+    <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
+    <user-name>x</user-name>
+    <password>y</password>
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
+        <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+        -->
+
+        <!-- sql to call on an existing pooled connection when it is obtained from pool 
+        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+        -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Sybase</type-mapping>
+      </metadata>
+  </local-tx-datasource>
+
+</datasources>

Added: projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-xa-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/as/src/test/resources/ds/sybase-xa-ds.xml	2011-10-13 08:37:25 UTC (rev 112342)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!-- Thanks to kosulin in the forumns                                      -->
+<!-- ===================================================================== -->
+
+<!-- $Id: sybase-xa-ds.xml 93459 2009-09-14 08:49:20Z istudens at redhat.com $ -->
+
+<datasources>
+
+   <!--
+      TODO: add driver name, version and download url here
+   -->
+
+   <!--
+      The example posted in the forums uses a security domain. What is the user/password xa-datasource-property?
+      try javap com.sybase.jdbc3.jdbc.SybXADataSource 
+      For the security domain. Add something like the following to conf/login-config.xml
+
+      <application-policy name = "SybaseXADSRealm">
+         <login-module code = "org.jboss.resource.security.SecureIdentityLoginModule" flag = "required">
+            <module-option name = "username">myuser</module-option>
+            <module-option name = "password">myhash</module-option>
+            <module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=SybaseXADS</module-option>
+         </login-module>
+      </application-policy>
+   -->
+
+   <xa-datasource>
+     <jndi-name>SybaseXADS</jndi-name>
+     <!-- uncomment to enable interleaving <interleaving/> -->
+     <xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>
+     <xa-datasource-property name="NetworkProtocol">Tds</xa-datasource-property>
+     <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
+     <xa-datasource-property name="PortNumber">4100</xa-datasource-property>
+     <xa-datasource-property name="DatabaseName">mydatabase</xa-datasource-property>
+
+     <!-- Use the security domain defined in conf/login-config.xml -->
+     <security-domain>SybaseXADSRealm</security-domain>
+     <!-- or User/Password properties -->
+     <xa-datasource-property name="User">user</xa-datasource-property>
+     <xa-datasource-property name="Password">password</xa-datasource-property>
+
+     <min-pool-size>1</min-pool-size>
+     <max-pool-size>20</max-pool-size>
+     <idle-timeout-minutes>15</idle-timeout-minutes>
+     <check-valid-connection-sql>select 1 from mytable</check-valid-connection-sql>
+     <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
+     <type-mapping>Sybase</type-mapping>
+
+   </xa-datasource>
+
+</datasources>



More information about the jboss-cvs-commits mailing list