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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 16 18:19:55 EDT 2010


Author: maeste
Date: 2010-08-16 18:19:54 -0400 (Mon, 16 Aug 2010)
New Revision: 107636

Added:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/SecurityManager.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/TransactionSupportEnum.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/package.html
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/AdminObject.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Security.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Validation.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/package.html
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/AdminObjectImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/LocalTxConnectionFactoryImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/NoTxConnectionFactoryImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ResourceAdapterImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/SecurityImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/TimeOutImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ValidationImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/XaTxConnectionFactoryImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/package.html
   projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/package.html
   projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/package.html
Removed:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/TransactionSupportEnum.java
Modified:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/annotations/Annotations.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/ra10/ResourceAdapter10.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecurityImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/RaParser.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/common/OutboundResourceAdapterImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/ra10/ResourceAdapter10Impl.java
   projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd
   projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserTestCase.java
   projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/JbossRaParserTestCase.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
Log:
JBJCA-401 few fixes to resource-adapter_1_0.xsd, metadata api and impl for this xsd. Few checkstyle fixes in test suite

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/annotations/Annotations.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/annotations/Annotations.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/annotations/Annotations.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -22,6 +22,7 @@
 
 package org.jboss.jca.common.annotations;
 
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.AdminObject;
 import org.jboss.jca.common.api.metadata.ra.AuthenticationMechanism;
 import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
@@ -38,7 +39,6 @@
 import org.jboss.jca.common.api.metadata.ra.Path;
 import org.jboss.jca.common.api.metadata.ra.ResourceAdapter1516;
 import org.jboss.jca.common.api.metadata.ra.SecurityPermission;
-import org.jboss.jca.common.api.metadata.ra.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.XsdString;
 import org.jboss.jca.common.api.metadata.ra.ra16.Activationspec16;
 import org.jboss.jca.common.api.metadata.ra.ra16.ConfigProperty16;

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/SecurityManager.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/TransactionSupportEnum.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/SecurityManager.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/SecurityManager.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.common;
+
+/**
+ *
+ * A SecurityManager.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public enum SecurityManager
+{
+   /**
+    * APPLICATION
+    */
+   APPLICATION,
+   /**
+    * DOMAIN
+    */
+   DOMAIN,
+   /**
+    * APPLICATION_AND_DOMAIN
+    */
+   APPLICATION_AND_DOMAIN,
+   /**
+    * NONE
+    */
+   NONE;
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/TransactionSupportEnum.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/TransactionSupportEnum.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/TransactionSupportEnum.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/TransactionSupportEnum.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.common;
+
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public enum TransactionSupportEnum
+{
+   /**
+    * NoTransaction
+    */
+   NoTransaction,
+   /**
+    * LocalTransaction
+    */
+   LocalTransaction,
+   /**
+    * XATransaction
+    */
+   XATransaction;
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/package.html	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,3 @@
+<body>
+This package contains interfaces to define metadata api cpmmon in various xsds
+</body>

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -22,6 +22,7 @@
 package org.jboss.jca.common.api.metadata.ds;
 
 import org.jboss.jca.common.api.metadata.JCAMetadata;
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -36,33 +37,6 @@
 public interface Security extends JCAMetadata
 {
    /**
-    *
-    * A SecurityManager.
-    *
-    * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
-    *
-    */
-   public enum SecurityManager
-   {
-      /**
-       * APPLICATION
-       */
-      APPLICATION,
-      /**
-       * DOMAIN
-       */
-      DOMAIN,
-      /**
-       * APPLICATION_AND_DOMAIN
-       */
-      APPLICATION_AND_DOMAIN,
-      /**
-       * NONE
-       */
-      NONE;
-   }
-
-   /**
     * Get the securityManager.
     *
     * @return the securityManager.

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -23,6 +23,7 @@
 
 
 import org.jboss.jca.common.api.metadata.CopyableMetaData;
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 
 import java.util.HashMap;
 import java.util.List;

Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/TransactionSupportEnum.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/TransactionSupportEnum.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/TransactionSupportEnum.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jca.common.api.metadata.ra;
-
-
-/**
- * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
- *
- */
-public enum TransactionSupportEnum
-{
-   /**
-    * NoTransaction
-    */
-   NoTransaction,
-   /**
-    * LocalTransaction
-    */
-   LocalTransaction,
-   /**
-    * XATransaction
-    */
-   XATransaction;
-
-}

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/ra10/ResourceAdapter10.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/ra10/ResourceAdapter10.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/ra10/ResourceAdapter10.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -21,11 +21,11 @@
  */
 package org.jboss.jca.common.api.metadata.ra.ra10;
 
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.AuthenticationMechanism;
 import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
 import org.jboss.jca.common.api.metadata.ra.ResourceAdapter;
 import org.jboss.jca.common.api.metadata.ra.SecurityPermission;
-import org.jboss.jca.common.api.metadata.ra.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.XsdString;
 import org.jboss.jca.common.api.validator.ValidateException;
 

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/AdminObject.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/AdminObject.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/AdminObject.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,198 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A AdminObject.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface AdminObject extends JCAMetadata
+{
+
+   /**
+    * Get the configProperties.
+    *
+    * @return the configProperties.
+    */
+   public Map<String, String> getConfigProperties();
+
+   /**
+    * Get the className.
+    *
+    * @return the className.
+    */
+   public String getClassName();
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   public String getJndiName();
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+   public boolean isEnabled();
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   public boolean isUseJavaContext();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+       * config-property tag
+       */
+      CONFIG_PROPERTY("config-property");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+
+   /**
+    *
+    * A Attribute.
+    *
+    * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+    *
+    */
+   public enum Attribute
+   {
+
+      /** jndiName attribute
+       *
+       */
+      JNDINAME("jndiName"),
+
+      /** class-name attribute
+      *
+      */
+      CLASS_NAME("class-name"),
+
+      /** enabled attribute
+      *
+      */
+      ENABLED("enabled"),
+      /** use-java-context attribute
+      *
+      */
+      USEJAVACONTEXT("use-java-context");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Attribute(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+   }
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,220 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A LocalTxConnectionFactory.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface LocalTxConnectionFactory extends NoTxConnectionFactory
+{
+
+   /**
+    * Get the noTxSeparatePools.
+    *
+    * @return the noTxSeparatePools.
+    */
+   public boolean isNoTxSeparatePools();
+
+   /**
+    * Get the trackConnectionByTx.
+    *
+    * @return the trackConnectionByTx.
+    */
+   public boolean isTrackConnectionByTx();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      minPoolSize tag
+      */
+      MINPOOLSIZE("min-pool-size"),
+      /**
+      maxPoolSize tag
+      */
+      MAXPOOLSIZE("max-pool-size"),
+      /**
+      prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+      userName tag
+      */
+      USERNAME("user-name"),
+      /**
+      password tag
+      */
+      PASSWORD("password"),
+      /**
+      connectionDefinition tag
+      */
+      CONNECTIONDEFINITION("connection-definition"),
+      /**
+      configProperty tag
+      */
+      CONFIGPROPERTY("config-property"),
+      /**
+      security tag
+      */
+      SECURITY("security"),
+      /**
+      timeOut tag
+      */
+      TIMEOUT("time-out"),
+      /**
+      validation tag
+      */
+      VALIDATION("validation"),
+
+      /**
+       * no-tx-separate-pools tag
+       */
+      NOTXSEPARATEPOOLS("no-tx-separate-pools"),
+      /**
+       * track-connection-by-tx
+       */
+      TRACKCONNECTIONBYTX("track-connection-by-tx");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+
+   /**
+    *
+    * A Attribute.
+    *
+    * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+    *
+    */
+   public enum Attribute
+   {
+
+      /** jndiName attribute
+       *
+       */
+      JNDINAME("jndiName"),
+
+      /** class-name attribute
+      *
+      */
+      CLASS_NAME("class-name"),
+
+      /** enabled attribute
+      *
+      */
+      ENABLED("enabled"),
+      /** use-java-context attribute
+      *
+      */
+      USEJAVACONTEXT("use-java-context");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Attribute(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+   }
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,305 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A NoTxConnectionFactory.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface NoTxConnectionFactory extends JCAMetadata
+{
+
+   /**
+    * Get the minPoolSize.
+    *
+    * @return the minPoolSize.
+    */
+   public Integer getMinPoolSize();
+
+   /**
+    * Get the maxPoolSize.
+    *
+    * @return the maxPoolSize.
+    */
+   public Integer getMaxPoolSize();
+
+   /**
+    * Get the prefill.
+    *
+    * @return the prefill.
+    */
+   public boolean isPrefill();
+
+   /**
+    * Get the userName.
+    *
+    * @return the userName.
+    */
+   public String getUserName();
+
+   /**
+    * Get the password.
+    *
+    * @return the password.
+    */
+   public String getPassword();
+
+   /**
+    * Get the connectionDefinition.
+    *
+    * @return the connectionDefinition.
+    */
+   public String getConnectionDefinition();
+
+   /**
+    * Get the configProperty.
+    *
+    * @return the configProperty.
+    */
+   public HashMap<String, String> getConfigProperty();
+
+   /**
+    * Get the security.
+    *
+    * @return the security.
+    */
+   public Security getSecurity();
+
+   /**
+    * Get the timeOut.
+    *
+    * @return the timeOut.
+    */
+   public TimeOut getTimeOut();
+
+   /**
+    * Get the validation.
+    *
+    * @return the validation.
+    */
+   public Validation getValidation();
+
+   /**
+    * Get the poolName.
+    *
+    * @return the poolName.
+    */
+   public String getPoolName();
+
+   /**
+    * Get the className.
+    *
+    * @return the className.
+    */
+   public String getClassName();
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   public String getJndiName();
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+   public boolean isEnabled();
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   public boolean isUseJavaContext();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      minPoolSize tag
+      */
+      MINPOOLSIZE("min-pool-size"),
+      /**
+      maxPoolSize tag
+      */
+      MAXPOOLSIZE("max-pool-size"),
+      /**
+      prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+      userName tag
+      */
+      USERNAME("user-name"),
+      /**
+      password tag
+      */
+      PASSWORD("password"),
+      /**
+      connectionDefinition tag
+      */
+      CONNECTIONDEFINITION("connection-definition"),
+      /**
+      configProperty tag
+      */
+      CONFIGPROPERTY("config-property"),
+      /**
+      security tag
+      */
+      SECURITY("security"),
+      /**
+      timeOut tag
+      */
+      TIMEOUT("time-out"),
+      /**
+      validation tag
+      */
+      VALIDATION("validation");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+
+   /**
+    *
+    * A Attribute.
+    *
+    * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+    *
+    */
+   public enum Attribute
+   {
+
+      /** jndiName attribute
+       *
+       */
+      JNDINAME("jndiName"),
+
+      /** class-name attribute
+      *
+      */
+      CLASS_NAME("class-name"),
+
+      /** enabled attribute
+      *
+      */
+      ENABLED("enabled"),
+      /** use-java-context attribute
+      *
+      */
+      USEJAVACONTEXT("use-java-context");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Attribute(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+   }
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * A ResourceAdapter.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface ResourceAdapter extends JCAMetadata
+{
+
+   /**
+    * Get the archive.
+    *
+    * @return the archive.
+    */
+   public String getArchive();
+
+   /**
+    * Get the transactionSupport.
+    *
+    * @return the transactionSupport.
+    */
+   public TransactionSupportEnum getTransactionSupport();
+
+   /**
+    * Get the connectionFactories.
+    *
+    * @return the connectionFactories.
+    */
+   public List<? extends NoTxConnectionFactory> getConnectionFactories();
+
+   /**
+    * Get the adminObjects.
+    *
+    * @return the adminObjects.
+    */
+   public List<AdminObject> getAdminobjects();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      transactionsupport tag
+      */
+      TRANSACTIONSUPPORT("transaction-support"),
+      /**
+      localtxconnectionfactory tag
+      */
+      LOCALTXCONNECTIONFACTORY("local-tx-connection-factory"),
+      /**
+      xatxconnectionfactory tag
+      */
+      XATXCONNECTIONFACTORY("xa-tx-connection-factory"),
+      /**
+      notxconnectionfactory tag
+      */
+      NOTXCONNECTIONFACTORY("no-txconnection-factory"),
+      /**
+      adminobject tag
+      */
+      ADMINOBJECT("admin-object");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Security.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Security.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Security.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A Security.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface Security extends JCAMetadata
+{
+
+   /**
+    * Get the securityManager.
+    *
+    * @return the securityManager.
+    */
+   public SecurityManager getSecurityManager();
+
+   /**
+    * Get the securityDomain.
+    *
+    * @return the securityDomain.
+    */
+   public String getSecurityDomain();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      securityManager tag
+      */
+      SECURITYMANAGER("security-manager"),
+      /**
+      securityDomain tag
+      */
+      SECURITYDOMAIN("security-domain");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A TimeOut.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface TimeOut extends JCAMetadata
+{
+
+   /**
+    * Get the blockingTimeoutMillis.
+    *
+    * @return the blockingTimeoutMillis.
+    */
+   public Long getBlockingTimeoutMillis();
+
+   /**
+    * Get the idleTimeoutMinutes.
+    *
+    * @return the idleTimeoutMinutes.
+    */
+   public Long getIdleTimeoutMinutes();
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   public Long getAllocationRetryWaitMillis();
+
+   /**
+    * Get the backgroundValidationMinutes.
+    *
+    * @return the backgroundValidationMinutes.
+    */
+   public Long getBackgroundValidationMinutes();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      blockingTimeoutMillis tag
+      */
+      BLOCKINGTIMEOUTMILLIS("blocking-imeout-millis"),
+      /**
+      idleTimeoutMinutes tag
+      */
+      IDLETIMEOUTMINUTES("idle-timeout-minutes"),
+      /**
+      allocationRetryWaitMillis tag
+      */
+      ALLOCATIONRETRYWAITMILLIS("allocation-retry-wait-millis"),
+      /**
+      backgroundValidationMinutes tag
+      */
+      BACKGROUNDVALIDATIONMINUTES("background-validation-minutes");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Tag(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+      private static final Map<String, Tag> MAP;
+
+      static
+      {
+         final Map<String, Tag> map = new HashMap<String, Tag>();
+         for (Tag element : values())
+         {
+            final String name = element.getLocalName();
+            if (name != null)
+               map.put(name, element);
+         }
+         MAP = map;
+      }
+
+      /**
+      *
+      * Static method to get enum instance given localName XsdString
+      *
+      * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+      * @return the enum instance
+      */
+      public static Tag forName(String localName)
+      {
+         final Tag element = MAP.get(localName);
+         return element == null ? UNKNOWN : element;
+      }
+
+   }
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Validation.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Security.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Validation.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/Validation.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A Validation.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface Validation extends JCAMetadata
+{
+
+   /**
+    * Get the allocationRetry.
+    *
+    * @return the allocationRetry.
+    */
+   public Integer getAllocationRetry();
+
+   /**
+    * Get the backgroundValidation.
+    *
+    * @return the backgroundValidation.
+    */
+   public boolean isBackgroundValidation();
+
+   /**
+    * Get the useFastFail.
+    *
+    * @return the useFastFail.
+    */
+   public boolean isUseFastFail();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      allocationRetry tag
+      */
+      ALLOCATIONRETRY("allocation-retry"),
+      /**
+      backgroundValidation tag
+      */
+      BACKGROUNDVALIDATION("background-validation"),
+      /**
+      useFastFail tag
+      */
+      USEFASTFAIL("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;
+      }
+
+      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;
+      }
+
+   }
+}

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ra/OutboundResourceAdapter.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,218 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.resourceadapter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A XaTxConnectionFactory.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface XaTxConnectionFactory extends LocalTxConnectionFactory
+{
+
+   /**
+    * Get the xaResourceTimeout.
+    *
+    * @return the xaResourceTimeout.
+    */
+   public String getXaResourceTimeout();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      minPoolSize tag
+      */
+      MINPOOLSIZE("min-pool-size"),
+      /**
+      maxPoolSize tag
+      */
+      MAXPOOLSIZE("max-pool-size"),
+      /**
+      prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+      userName tag
+      */
+      USERNAME("user-name"),
+      /**
+      password tag
+      */
+      PASSWORD("password"),
+      /**
+      connectionDefinition tag
+      */
+      CONNECTIONDEFINITION("connection-definition"),
+      /**
+      configProperty tag
+      */
+      CONFIGPROPERTY("config-property"),
+      /**
+      security tag
+      */
+      SECURITY("security"),
+      /**
+      timeOut tag
+      */
+      TIMEOUT("time-out"),
+      /**
+      validation tag
+      */
+      VALIDATION("validation"),
+
+      /**
+       * no-tx-separate-pools tag
+       */
+      NOTXSEPARATEPOOLS("no-tx-separate-pools"),
+      /**
+       * track-connection-by-tx
+       */
+      TRACKCONNECTIONBYTX("track-connection-by-tx"),
+
+      /**
+       * xa-resource-timeout tag
+       */
+      XARESOURCETIMEOUT("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;
+      }
+
+      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;
+      }
+
+   }
+
+   /**
+    *
+    * A Attribute.
+    *
+    * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+    *
+    */
+   public enum Attribute
+   {
+
+      /** jndiName attribute
+       *
+       */
+      JNDINAME("jndiName"),
+
+      /** class-name attribute
+      *
+      */
+      CLASS_NAME("class-name"),
+
+      /** enabled attribute
+      *
+      */
+      ENABLED("enabled"),
+      /** use-java-context attribute
+      *
+      */
+      USEJAVACONTEXT("use-java-context");
+
+      private final String name;
+
+      /**
+       *
+       * Create a new Tag.
+       *
+       * @param name a name
+       */
+      Attribute(final String name)
+      {
+         this.name = name;
+      }
+
+      /**
+       * Get the local name of this element.
+       *
+       * @return the local name
+       */
+      public String getLocalName()
+      {
+         return name;
+      }
+
+   }
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/package.html	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,3 @@
+<body>
+This package contains interfaces to define metadata api for resource_adapter_1.0.xml
+</body>

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -21,11 +21,11 @@
  */
 package org.jboss.jca.common.metadata.ds;
 
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
 import org.jboss.jca.common.api.metadata.ds.DataSource;
 import org.jboss.jca.common.api.metadata.ds.DataSources;
 import org.jboss.jca.common.api.metadata.ds.Recovery;
 import org.jboss.jca.common.api.metadata.ds.Security;
-import org.jboss.jca.common.api.metadata.ds.Security.SecurityManager;
 import org.jboss.jca.common.api.metadata.ds.Statement;
 import org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum;
 import org.jboss.jca.common.api.metadata.ds.TimeOut;

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecurityImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecurityImpl.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecurityImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -21,6 +21,7 @@
  */
 package org.jboss.jca.common.metadata.ds;
 
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
 import org.jboss.jca.common.api.metadata.ds.Security;
 
 

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/RaParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/RaParser.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/RaParser.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -21,6 +21,7 @@
  */
 package org.jboss.jca.common.metadata.ra;
 
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.AdminObject;
 import org.jboss.jca.common.api.metadata.ra.AuthenticationMechanism;
 import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
@@ -38,7 +39,6 @@
 import org.jboss.jca.common.api.metadata.ra.RequiredConfigProperty;
 import org.jboss.jca.common.api.metadata.ra.ResourceAdapter1516;
 import org.jboss.jca.common.api.metadata.ra.SecurityPermission;
-import org.jboss.jca.common.api.metadata.ra.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.XsdString;
 import org.jboss.jca.common.api.metadata.ra.ra10.Connector10;
 import org.jboss.jca.common.api.metadata.ra.ra10.ResourceAdapter10;

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/common/OutboundResourceAdapterImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/common/OutboundResourceAdapterImpl.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/common/OutboundResourceAdapterImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -24,11 +24,11 @@
 import org.jboss.jca.common.api.metadata.CopyUtil;
 import org.jboss.jca.common.api.metadata.CopyableMetaData;
 import org.jboss.jca.common.api.metadata.MergeUtil;
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.AuthenticationMechanism;
 import org.jboss.jca.common.api.metadata.ra.ConnectionDefinition;
 import org.jboss.jca.common.api.metadata.ra.MergeableMetadata;
 import org.jboss.jca.common.api.metadata.ra.OutboundResourceAdapter;
-import org.jboss.jca.common.api.metadata.ra.TransactionSupportEnum;
 
 import java.util.ArrayList;
 import java.util.Collections;

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/ra10/ResourceAdapter10Impl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/ra10/ResourceAdapter10Impl.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ra/ra10/ResourceAdapter10Impl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -23,10 +23,10 @@
 
 import org.jboss.jca.common.api.metadata.CopyUtil;
 import org.jboss.jca.common.api.metadata.CopyableMetaData;
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.AuthenticationMechanism;
 import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
 import org.jboss.jca.common.api.metadata.ra.SecurityPermission;
-import org.jboss.jca.common.api.metadata.ra.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.XsdString;
 import org.jboss.jca.common.api.metadata.ra.ra10.ResourceAdapter10;
 import org.jboss.jca.common.api.validator.ValidateException;

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/AdminObjectImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/AdminObjectImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/AdminObjectImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.AdminObject;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A AdminObjectImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class AdminObjectImpl implements AdminObject
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 8137442556861441967L;
+
+   private final HashMap<String, String> configProperties;
+
+   private final String className;
+
+   private final String jndiName;
+
+   private final boolean enabled;
+
+   private final boolean useJavaContext;
+
+   /**
+    * Create a new AdminObjectImpl.
+    *
+    * @param configProperties configProperties
+    * @param className className
+    * @param jndiName jndiName
+    * @param enabled enabled
+    * @param useJavaContext useJavaContext
+    */
+   public AdminObjectImpl(Map<String, String> configProperties, String className, String jndiName, boolean enabled,
+         boolean useJavaContext)
+   {
+      super();
+      if (configProperties != null)
+      {
+         this.configProperties = new HashMap<String, String>(configProperties.size());
+         this.configProperties.putAll(configProperties);
+      }
+      else
+      {
+         this.configProperties = new HashMap<String, String>(0);
+      }
+      this.className = className;
+      this.jndiName = jndiName;
+      this.enabled = enabled;
+      this.useJavaContext = useJavaContext;
+   }
+
+   /**
+    * Get the configProperties.
+    *
+    * @return the configProperties.
+    */
+   @Override
+   public final Map<String, String> getConfigProperties()
+   {
+      return Collections.unmodifiableMap(configProperties);
+   }
+
+   /**
+    * Get the className.
+    *
+    * @return the className.
+    */
+   @Override
+   public final String getClassName()
+   {
+      return className;
+   }
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   @Override
+   public final String getJndiName()
+   {
+      return jndiName;
+   }
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+   @Override
+   public final boolean isEnabled()
+   {
+      return enabled;
+   }
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   @Override
+   public final boolean isUseJavaContext()
+   {
+      return useJavaContext;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((className == null) ? 0 : className.hashCode());
+      result = prime * result + ((configProperties == null) ? 0 : configProperties.hashCode());
+      result = prime * result + (enabled ? 1231 : 1237);
+      result = prime * result + ((jndiName == null) ? 0 : jndiName.hashCode());
+      result = prime * result + (useJavaContext ? 1231 : 1237);
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof AdminObjectImpl))
+         return false;
+      AdminObjectImpl other = (AdminObjectImpl) obj;
+      if (className == null)
+      {
+         if (other.className != null)
+            return false;
+      }
+      else if (!className.equals(other.className))
+         return false;
+      if (configProperties == null)
+      {
+         if (other.configProperties != null)
+            return false;
+      }
+      else if (!configProperties.equals(other.configProperties))
+         return false;
+      if (enabled != other.enabled)
+         return false;
+      if (jndiName == null)
+      {
+         if (other.jndiName != null)
+            return false;
+      }
+      else if (!jndiName.equals(other.jndiName))
+         return false;
+      if (useJavaContext != other.useJavaContext)
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "AdminObjectImpl [configProperties=" + configProperties + ", className=" + className + ", jndiName="
+            + jndiName + ", enabled=" + enabled + ", useJavaContext=" + useJavaContext + "]";
+   }
+}
+

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/LocalTxConnectionFactoryImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/LocalTxConnectionFactoryImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/LocalTxConnectionFactoryImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.LocalTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+
+import java.util.HashMap;
+
+/**
+ *
+ * A LocalTxConnectionFactoryImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class LocalTxConnectionFactoryImpl extends NoTxConnectionFactoryImpl implements LocalTxConnectionFactory
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -7691787666361594149L;
+
+   private final boolean noTxSeparatePools;
+
+   private final boolean trackConnectionByTx;
+
+   /**
+    * Create a new LocalTxConnectionFactoryImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param userName userName
+    * @param password password
+    * @param connectionDefinition connectionDefinition
+    * @param configProperty configProperty
+    * @param security security
+    * @param timeOut timeOut
+    * @param validation validation
+    * @param poolName poolName
+    * @param className className
+    * @param jndiName jndiName
+    * @param enabled enabled
+    * @param useJavaContext useJavaContext
+    * @param noTxSeparatePools noTxSeparatePools
+    * @param trackConnectionByTx trackConnectionByTx
+    */
+   public LocalTxConnectionFactoryImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName,
+         String password, String connectionDefinition, HashMap<String, String> configProperty, Security security,
+         TimeOut timeOut, Validation validation, String poolName, String className, String jndiName, boolean enabled,
+         boolean useJavaContext, boolean noTxSeparatePools, boolean trackConnectionByTx)
+   {
+      super(minPoolSize, maxPoolSize, prefill, userName, password, connectionDefinition, configProperty, security,
+            timeOut, validation, poolName, className, jndiName, enabled, useJavaContext);
+      this.noTxSeparatePools = noTxSeparatePools;
+      this.trackConnectionByTx = trackConnectionByTx;
+   }
+
+   /**
+    * Get the noTxSeparatePools.
+    *
+    * @return the noTxSeparatePools.
+    */
+   @Override
+   public final boolean isNoTxSeparatePools()
+   {
+      return noTxSeparatePools;
+   }
+
+   /**
+    * Get the trackConnectionByTx.
+    *
+    * @return the trackConnectionByTx.
+    */
+   @Override
+   public final boolean isTrackConnectionByTx()
+   {
+      return trackConnectionByTx;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = super.hashCode();
+      result = prime * result + (noTxSeparatePools ? 1231 : 1237);
+      result = prime * result + (trackConnectionByTx ? 1231 : 1237);
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (!super.equals(obj))
+         return false;
+      if (!(obj instanceof LocalTxConnectionFactoryImpl))
+         return false;
+      LocalTxConnectionFactoryImpl other = (LocalTxConnectionFactoryImpl) obj;
+      if (noTxSeparatePools != other.noTxSeparatePools)
+         return false;
+      if (trackConnectionByTx != other.trackConnectionByTx)
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "LocalTxConnectionFactoryImpl [noTxSeparatePools=" + noTxSeparatePools + ", trackConnectionByTx="
+            + trackConnectionByTx + ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill="
+            + prefill + ", userName=" + userName + ", password=" + password + ", connectionDefinition="
+            + connectionDefinition + ", configProperty=" + configProperty + ", security=" + security + ", timeOut="
+            + timeOut + ", validation=" + validation + ", poolName=" + poolName + ", className=" + className
+            + ", jndiName=" + jndiName + ", enabled=" + enabled + ", useJavaContext=" + useJavaContext + "]";
+   }
+
+}
+

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/NoTxConnectionFactoryImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/NoTxConnectionFactoryImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/NoTxConnectionFactoryImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,430 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.NoTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+
+import java.util.HashMap;
+
+/**
+ *
+ * A NoTxConnectionFactoryImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class NoTxConnectionFactoryImpl implements NoTxConnectionFactory
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -2475537312421610650L;
+
+   /** minPoolSize field **/
+   protected final Integer minPoolSize;
+
+   /** maxPoolSize field **/
+   protected final Integer maxPoolSize;
+
+   /** prefill field **/
+   protected final boolean prefill;
+
+   /** userName field **/
+   protected final String userName;
+
+   /** password field **/
+   protected final String password;
+
+   /** connectionDefinition field **/
+   protected final String connectionDefinition;
+
+   /** configProperty field **/
+   protected final HashMap<String, String> configProperty;
+
+   /** security field **/
+   protected final Security security;
+
+   /** timeOut field **/
+   protected final TimeOut timeOut;
+
+   /** validation field **/
+   protected final Validation validation;
+
+   /** poolName field **/
+   protected final String poolName;
+
+   /** className field **/
+   protected final String className;
+
+   /** jndiName field **/
+   protected final String jndiName;
+
+   /** enabled field **/
+   protected final boolean enabled;
+
+   /** useJavaContext field **/
+   protected final boolean useJavaContext;
+
+   /**
+    * Create a new NoTxConnectionFactoryImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param userName userName
+    * @param password password
+    * @param connectionDefinition connectionDefinition
+    * @param configProperty configProperty
+    * @param security security
+    * @param timeOut timeOut
+    * @param validation validation
+    * @param poolName poolName
+    * @param className className
+    * @param jndiName jndiName
+    * @param enabled enabled
+    * @param useJavaContext useJavaContext
+    */
+   public NoTxConnectionFactoryImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName,
+         String password, String connectionDefinition, HashMap<String, String> configProperty, Security security,
+         TimeOut timeOut, Validation validation, String poolName, String className, String jndiName, boolean enabled,
+         boolean useJavaContext)
+   {
+      super();
+      this.minPoolSize = minPoolSize;
+      this.maxPoolSize = maxPoolSize;
+      this.prefill = prefill;
+      this.userName = userName;
+      this.password = password;
+      this.connectionDefinition = connectionDefinition;
+      this.configProperty = configProperty;
+      this.security = security;
+      this.timeOut = timeOut;
+      this.validation = validation;
+      this.poolName = poolName;
+      this.className = className;
+      this.jndiName = jndiName;
+      this.enabled = enabled;
+      this.useJavaContext = useJavaContext;
+   }
+
+   /**
+    * Get the minPoolSize.
+    *
+    * @return the minPoolSize.
+    */
+   @Override
+   public final Integer getMinPoolSize()
+   {
+      return minPoolSize;
+   }
+
+   /**
+    * Get the maxPoolSize.
+    *
+    * @return the maxPoolSize.
+    */
+   @Override
+   public final Integer getMaxPoolSize()
+   {
+      return maxPoolSize;
+   }
+
+   /**
+    * Get the prefill.
+    *
+    * @return the prefill.
+    */
+   @Override
+   public final boolean isPrefill()
+   {
+      return prefill;
+   }
+
+   /**
+    * Get the userName.
+    *
+    * @return the userName.
+    */
+   @Override
+   public final String getUserName()
+   {
+      return userName;
+   }
+
+   /**
+    * Get the password.
+    *
+    * @return the password.
+    */
+   @Override
+   public final String getPassword()
+   {
+      return password;
+   }
+
+   /**
+    * Get the connectionDefinition.
+    *
+    * @return the connectionDefinition.
+    */
+   @Override
+   public final String getConnectionDefinition()
+   {
+      return connectionDefinition;
+   }
+
+   /**
+    * Get the configProperty.
+    *
+    * @return the configProperty.
+    */
+   @Override
+   public final HashMap<String, String> getConfigProperty()
+   {
+      return configProperty;
+   }
+
+   /**
+    * Get the security.
+    *
+    * @return the security.
+    */
+   @Override
+   public final Security getSecurity()
+   {
+      return security;
+   }
+
+   /**
+    * Get the timeOut.
+    *
+    * @return the timeOut.
+    */
+   @Override
+   public final TimeOut getTimeOut()
+   {
+      return timeOut;
+   }
+
+   /**
+    * Get the validation.
+    *
+    * @return the validation.
+    */
+   @Override
+   public final Validation getValidation()
+   {
+      return validation;
+   }
+
+   /**
+    * Get the poolName.
+    *
+    * @return the poolName.
+    */
+   @Override
+   public final String getPoolName()
+   {
+      return poolName;
+   }
+
+   /**
+    * Get the className.
+    *
+    * @return the className.
+    */
+   @Override
+   public final String getClassName()
+   {
+      return className;
+   }
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   @Override
+   public final String getJndiName()
+   {
+      return jndiName;
+   }
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+   @Override
+   public final boolean isEnabled()
+   {
+      return enabled;
+   }
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   @Override
+   public final boolean isUseJavaContext()
+   {
+      return useJavaContext;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((className == null) ? 0 : className.hashCode());
+      result = prime * result + ((configProperty == null) ? 0 : configProperty.hashCode());
+      result = prime * result + ((connectionDefinition == null) ? 0 : connectionDefinition.hashCode());
+      result = prime * result + (enabled ? 1231 : 1237);
+      result = prime * result + ((jndiName == null) ? 0 : jndiName.hashCode());
+      result = prime * result + ((maxPoolSize == null) ? 0 : maxPoolSize.hashCode());
+      result = prime * result + ((minPoolSize == null) ? 0 : minPoolSize.hashCode());
+      result = prime * result + ((password == null) ? 0 : password.hashCode());
+      result = prime * result + ((poolName == null) ? 0 : poolName.hashCode());
+      result = prime * result + (prefill ? 1231 : 1237);
+      result = prime * result + ((security == null) ? 0 : security.hashCode());
+      result = prime * result + ((timeOut == null) ? 0 : timeOut.hashCode());
+      result = prime * result + (useJavaContext ? 1231 : 1237);
+      result = prime * result + ((userName == null) ? 0 : userName.hashCode());
+      result = prime * result + ((validation == null) ? 0 : validation.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof NoTxConnectionFactoryImpl))
+         return false;
+      NoTxConnectionFactoryImpl other = (NoTxConnectionFactoryImpl) obj;
+      if (className == null)
+      {
+         if (other.className != null)
+            return false;
+      }
+      else if (!className.equals(other.className))
+         return false;
+      if (configProperty == null)
+      {
+         if (other.configProperty != null)
+            return false;
+      }
+      else if (!configProperty.equals(other.configProperty))
+         return false;
+      if (connectionDefinition == null)
+      {
+         if (other.connectionDefinition != null)
+            return false;
+      }
+      else if (!connectionDefinition.equals(other.connectionDefinition))
+         return false;
+      if (enabled != other.enabled)
+         return false;
+      if (jndiName == null)
+      {
+         if (other.jndiName != null)
+            return false;
+      }
+      else if (!jndiName.equals(other.jndiName))
+         return false;
+      if (maxPoolSize == null)
+      {
+         if (other.maxPoolSize != null)
+            return false;
+      }
+      else if (!maxPoolSize.equals(other.maxPoolSize))
+         return false;
+      if (minPoolSize == null)
+      {
+         if (other.minPoolSize != null)
+            return false;
+      }
+      else if (!minPoolSize.equals(other.minPoolSize))
+         return false;
+      if (password == null)
+      {
+         if (other.password != null)
+            return false;
+      }
+      else if (!password.equals(other.password))
+         return false;
+      if (poolName == null)
+      {
+         if (other.poolName != null)
+            return false;
+      }
+      else if (!poolName.equals(other.poolName))
+         return false;
+      if (prefill != other.prefill)
+         return false;
+      if (security == null)
+      {
+         if (other.security != null)
+            return false;
+      }
+      else if (!security.equals(other.security))
+         return false;
+      if (timeOut == null)
+      {
+         if (other.timeOut != null)
+            return false;
+      }
+      else if (!timeOut.equals(other.timeOut))
+         return false;
+      if (useJavaContext != other.useJavaContext)
+         return false;
+      if (userName == null)
+      {
+         if (other.userName != null)
+            return false;
+      }
+      else if (!userName.equals(other.userName))
+         return false;
+      if (validation == null)
+      {
+         if (other.validation != null)
+            return false;
+      }
+      else if (!validation.equals(other.validation))
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "NoTxConnectionFactoryImpl [minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill="
+            + prefill + ", userName=" + userName + ", password=" + password + ", connectionDefinition="
+            + connectionDefinition + ", configProperty=" + configProperty + ", security=" + security + ", timeOut="
+            + timeOut + ", validation=" + validation + ", poolName=" + poolName + ", className=" + className
+            + ", jndiName=" + jndiName + ", enabled=" + enabled + ", useJavaContext=" + useJavaContext + "]";
+   }
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ResourceAdapterImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ResourceAdapterImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ResourceAdapterImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,186 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+import org.jboss.jca.common.api.metadata.resourceadapter.AdminObject;
+import org.jboss.jca.common.api.metadata.resourceadapter.NoTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * A ResourceAdapterImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class ResourceAdapterImpl implements ResourceAdapter
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -7422976850056232511L;
+   private final String archive;
+   private final TransactionSupportEnum transactionSupport;
+
+   private final ArrayList<NoTxConnectionFactory> connectionFactories;
+
+   private final ArrayList<AdminObject> adminObjects;
+
+   /**
+    * Create a new ResourceAdapterImpl.
+    *
+    * @param archive archive
+    * @param transactionSupport transactionSupport
+    * @param connectionFactories connectionFactories
+    * @param adminObjects adminObjects
+    */
+   public ResourceAdapterImpl(String archive, TransactionSupportEnum transactionSupport,
+         List<? extends NoTxConnectionFactory> connectionFactories, List<AdminObject> adminObjects)
+   {
+      super();
+      this.archive = archive;
+      this.transactionSupport = transactionSupport;
+      if (connectionFactories != null)
+      {
+         this.connectionFactories = new ArrayList<NoTxConnectionFactory>(connectionFactories.size());
+         this.connectionFactories.addAll(connectionFactories);
+      }
+      else
+      {
+         this.connectionFactories = new ArrayList<NoTxConnectionFactory>(0);
+      }
+
+      if (adminObjects != null)
+      {
+         this.adminObjects = new ArrayList<AdminObject>(adminObjects.size());
+         this.adminObjects.addAll(adminObjects);
+      }
+      else
+      {
+         this.adminObjects = new ArrayList<AdminObject>(0);
+      }
+
+   }
+
+   /**
+    * Get the archive.
+    *
+    * @return the archive.
+    */
+   @Override
+   public final String getArchive()
+   {
+      return archive;
+   }
+
+   /**
+    * Get the transactionSupport.
+    *
+    * @return the transactionSupport.
+    */
+   @Override
+   public final TransactionSupportEnum getTransactionSupport()
+   {
+      return transactionSupport;
+   }
+
+   /**
+    * Get the connectionFactories.
+    *
+    * @return the connectionFactories.
+    */
+   @Override
+   public final List<? extends NoTxConnectionFactory> getConnectionFactories()
+   {
+      return Collections.unmodifiableList(connectionFactories);
+   }
+
+   /**
+    * Get the adminObjects.
+    *
+    * @return the adminObjects.
+    */
+   @Override
+   public final List<AdminObject> getAdminobjects()
+   {
+      return Collections.unmodifiableList(adminObjects);
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((adminObjects == null) ? 0 : adminObjects.hashCode());
+      result = prime * result + ((archive == null) ? 0 : archive.hashCode());
+      result = prime * result + ((connectionFactories == null) ? 0 : connectionFactories.hashCode());
+      result = prime * result + ((transactionSupport == null) ? 0 : transactionSupport.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof ResourceAdapterImpl))
+         return false;
+      ResourceAdapterImpl other = (ResourceAdapterImpl) obj;
+      if (adminObjects == null)
+      {
+         if (other.adminObjects != null)
+            return false;
+      }
+      else if (!adminObjects.equals(other.adminObjects))
+         return false;
+      if (archive == null)
+      {
+         if (other.archive != null)
+            return false;
+      }
+      else if (!archive.equals(other.archive))
+         return false;
+      if (connectionFactories == null)
+      {
+         if (other.connectionFactories != null)
+            return false;
+      }
+      else if (!connectionFactories.equals(other.connectionFactories))
+         return false;
+      if (transactionSupport != other.transactionSupport)
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "ResourceAdapterImpl [archive=" + archive + ", transactionSupport=" + transactionSupport
+            + ", connectionFactories=" + connectionFactories + ", adminObjects=" + adminObjects + "]";
+   }
+}
+

Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/SecurityImpl.java (from rev 107635, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecurityImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/SecurityImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/SecurityImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+
+/**
+ *
+ * A SecurityImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class SecurityImpl implements Security
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1792878989502127046L;
+
+   private final SecurityManager securityManager;
+
+   private final String securityDomain;
+
+   /**
+    * Create a new SecurityImpl.
+    *
+    * @param securityManager securityManager
+    * @param securityDomain securityDomain
+    */
+   public SecurityImpl(SecurityManager securityManager, String securityDomain)
+   {
+      super();
+      this.securityManager = securityManager;
+      this.securityDomain = securityDomain;
+   }
+
+   /**
+    * Get the securityManager.
+    *
+    * @return the securityManager.
+    */
+   @Override
+   public final SecurityManager getSecurityManager()
+   {
+      return securityManager;
+   }
+
+   /**
+    * Get the securityDomain.
+    *
+    * @return the securityDomain.
+    */
+   @Override
+   public final String getSecurityDomain()
+   {
+      return securityDomain;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((securityDomain == null) ? 0 : securityDomain.hashCode());
+      result = prime * result + ((securityManager == null) ? 0 : securityManager.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof SecurityImpl))
+         return false;
+      SecurityImpl other = (SecurityImpl) obj;
+      if (securityDomain == null)
+      {
+         if (other.securityDomain != null)
+            return false;
+      }
+      else if (!securityDomain.equals(other.securityDomain))
+         return false;
+      if (securityManager != other.securityManager)
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "SecurityImpl [securityManager=" + securityManager + ", securityDomain=" + securityDomain + "]";
+   }
+}
+

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/TimeOutImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/TimeOutImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/TimeOutImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+
+/**
+ *
+ * A TimeOutImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class TimeOutImpl implements TimeOut
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -4482517387845540925L;
+
+   private final Long blockingTimeoutMillis;
+
+   private final Long idleTimeoutMinutes;
+
+   private final Long allocationRetryWaitMillis;
+
+   private final Long backgroundValidationMinutes;
+
+   /**
+    * Create a new TimeOutImpl.
+    *
+    * @param blockingTimeoutMillis blockingTimeoutMillis
+    * @param idleTimeoutMinutes idleTimeoutMinutes
+    * @param allocationRetryWaitMillis allocationRetryWaitMillis
+    * @param backgroundValidationMinutes backgroundValidationMinutes
+    */
+   public TimeOutImpl(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Long allocationRetryWaitMillis,
+         Long backgroundValidationMinutes)
+   {
+      super();
+      this.blockingTimeoutMillis = blockingTimeoutMillis;
+      this.idleTimeoutMinutes = idleTimeoutMinutes;
+      this.allocationRetryWaitMillis = allocationRetryWaitMillis;
+      this.backgroundValidationMinutes = backgroundValidationMinutes;
+   }
+
+   /**
+    * Get the blockingTimeoutMillis.
+    *
+    * @return the blockingTimeoutMillis.
+    */
+   @Override
+   public final Long getBlockingTimeoutMillis()
+   {
+      return blockingTimeoutMillis;
+   }
+
+   /**
+    * Get the idleTimeoutMinutes.
+    *
+    * @return the idleTimeoutMinutes.
+    */
+   @Override
+   public final Long getIdleTimeoutMinutes()
+   {
+      return idleTimeoutMinutes;
+   }
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   @Override
+   public final Long getAllocationRetryWaitMillis()
+   {
+      return allocationRetryWaitMillis;
+   }
+
+   /**
+    * Get the backgroundValidationMinutes.
+    *
+    * @return the backgroundValidationMinutes.
+    */
+   @Override
+   public final Long getBackgroundValidationMinutes()
+   {
+      return backgroundValidationMinutes;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((allocationRetryWaitMillis == null) ? 0 : allocationRetryWaitMillis.hashCode());
+      result = prime * result + ((backgroundValidationMinutes == null) ? 0 : backgroundValidationMinutes.hashCode());
+      result = prime * result + ((blockingTimeoutMillis == null) ? 0 : blockingTimeoutMillis.hashCode());
+      result = prime * result + ((idleTimeoutMinutes == null) ? 0 : idleTimeoutMinutes.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof TimeOutImpl))
+         return false;
+      TimeOutImpl other = (TimeOutImpl) obj;
+      if (allocationRetryWaitMillis == null)
+      {
+         if (other.allocationRetryWaitMillis != null)
+            return false;
+      }
+      else if (!allocationRetryWaitMillis.equals(other.allocationRetryWaitMillis))
+         return false;
+      if (backgroundValidationMinutes == null)
+      {
+         if (other.backgroundValidationMinutes != null)
+            return false;
+      }
+      else if (!backgroundValidationMinutes.equals(other.backgroundValidationMinutes))
+         return false;
+      if (blockingTimeoutMillis == null)
+      {
+         if (other.blockingTimeoutMillis != null)
+            return false;
+      }
+      else if (!blockingTimeoutMillis.equals(other.blockingTimeoutMillis))
+         return false;
+      if (idleTimeoutMinutes == null)
+      {
+         if (other.idleTimeoutMinutes != null)
+            return false;
+      }
+      else if (!idleTimeoutMinutes.equals(other.idleTimeoutMinutes))
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "TimeOutImpl [blockingTimeoutMillis=" + blockingTimeoutMillis + ", idleTimeoutMinutes="
+            + idleTimeoutMinutes + ", allocationRetryWaitMillis=" + allocationRetryWaitMillis
+            + ", backgroundValidationMinutes=" + backgroundValidationMinutes + "]";
+   }
+}
+

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ValidationImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ValidationImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ValidationImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+
+/**
+ *
+ * A ValidationImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class ValidationImpl implements Validation
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 2178081632626071094L;
+
+   private final Integer allocationRetry;
+
+   private final boolean backgroundValidation;
+
+   private final boolean useFastFail;
+
+   /**
+    * Create a new ValidationImpl.
+    *
+    * @param allocationRetry allocationRetry
+    * @param backgroundValidation backgroundValidation
+    * @param useFastFail useFastFail
+    */
+   public ValidationImpl(Integer allocationRetry, boolean backgroundValidation, boolean useFastFail)
+   {
+      super();
+      this.allocationRetry = allocationRetry;
+      this.backgroundValidation = backgroundValidation;
+      this.useFastFail = useFastFail;
+   }
+
+   /**
+    * Get the allocationRetry.
+    *
+    * @return the allocationRetry.
+    */
+   @Override
+   public final Integer getAllocationRetry()
+   {
+      return allocationRetry;
+   }
+
+   /**
+    * Get the backgroundValidation.
+    *
+    * @return the backgroundValidation.
+    */
+   @Override
+   public final boolean isBackgroundValidation()
+   {
+      return backgroundValidation;
+   }
+
+   /**
+    * Get the useFastFail.
+    *
+    * @return the useFastFail.
+    */
+   @Override
+   public final boolean isUseFastFail()
+   {
+      return useFastFail;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((allocationRetry == null) ? 0 : allocationRetry.hashCode());
+      result = prime * result + (backgroundValidation ? 1231 : 1237);
+      result = prime * result + (useFastFail ? 1231 : 1237);
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof ValidationImpl))
+         return false;
+      ValidationImpl other = (ValidationImpl) obj;
+      if (allocationRetry == null)
+      {
+         if (other.allocationRetry != null)
+            return false;
+      }
+      else if (!allocationRetry.equals(other.allocationRetry))
+         return false;
+      if (backgroundValidation != other.backgroundValidation)
+         return false;
+      if (useFastFail != other.useFastFail)
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "ValidationImpl [allocationRetry=" + allocationRetry + ", backgroundValidation=" + backgroundValidation
+            + ", useFastFail=" + useFastFail + "]";
+   }
+
+}
+

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/XaTxConnectionFactoryImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/XaTxConnectionFactoryImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/XaTxConnectionFactoryImpl.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadpater;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+import org.jboss.jca.common.api.metadata.resourceadapter.XaTxConnectionFactory;
+
+import java.util.HashMap;
+
+/**
+ *
+ * A XaTxConnectionFactoryImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class XaTxConnectionFactoryImpl extends LocalTxConnectionFactoryImpl implements XaTxConnectionFactory
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 8211429129210108351L;
+   private final String xaResourceTimeout;
+
+   /**
+    * Create a new XaTxConnectionFactoryImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param userName userName
+    * @param password password
+    * @param connectionDefinition connectionDefinition
+    * @param configProperty configProperty
+    * @param security security
+    * @param timeOut timeOut
+    * @param validation validation
+    * @param poolName poolName
+    * @param className className
+    * @param jndiName jndiName
+    * @param enabled enabled
+    * @param useJavaContext useJavaContext
+    * @param noTxSeparatePools noTxSeparatePools
+    * @param trackConnectionByTx trackConnectionByTx
+    * @param xaResourceTimeout xaResourceTimeout
+    */
+   public XaTxConnectionFactoryImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName,
+         String password, String connectionDefinition, HashMap<String, String> configProperty, Security security,
+         TimeOut timeOut, Validation validation, String poolName, String className, String jndiName, boolean enabled,
+         boolean useJavaContext, boolean noTxSeparatePools, boolean trackConnectionByTx, String xaResourceTimeout)
+   {
+      super(minPoolSize, maxPoolSize, prefill, userName, password, connectionDefinition, configProperty, security,
+            timeOut, validation, poolName, className, jndiName, enabled, useJavaContext, noTxSeparatePools,
+            trackConnectionByTx);
+      this.xaResourceTimeout = xaResourceTimeout;
+   }
+
+   /**
+    * Get the xaResourceTimeout.
+    *
+    * @return the xaResourceTimeout.
+    */
+   @Override
+   public final String getXaResourceTimeout()
+   {
+      return xaResourceTimeout;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = super.hashCode();
+      result = prime * result + ((xaResourceTimeout == null) ? 0 : xaResourceTimeout.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (!super.equals(obj))
+         return false;
+      if (!(obj instanceof XaTxConnectionFactoryImpl))
+         return false;
+      XaTxConnectionFactoryImpl other = (XaTxConnectionFactoryImpl) obj;
+      if (xaResourceTimeout == null)
+      {
+         if (other.xaResourceTimeout != null)
+            return false;
+      }
+      else if (!xaResourceTimeout.equals(other.xaResourceTimeout))
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "XaTxConnectionFactoryImpl [xaResourceTimeout=" + xaResourceTimeout + ", minPoolSize=" + minPoolSize
+            + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill + ", userName=" + userName + ", password="
+            + password + ", connectionDefinition=" + connectionDefinition + ", configProperty=" + configProperty
+            + ", security=" + security + ", timeOut=" + timeOut + ", validation=" + validation + ", poolName="
+            + poolName + ", className=" + className + ", jndiName=" + jndiName + ", enabled=" + enabled
+            + ", useJavaContext=" + useJavaContext + "]";
+   }
+}
+

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/package.html	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,3 @@
+<body>
+This package contains metadatas implementation for resource_adapter_1.0.xsd
+</body>

Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd	2010-08-16 22:19:54 UTC (rev 107636)
@@ -43,7 +43,7 @@
           </xs:documentation>
         </xs:annotation>
       </xs:element>
-      <xs:element name="prefill" type="xs:token" minOccurs="0">
+      <xs:element name="prefill" type="xs:boolean" minOccurs="0">
         <xs:annotation>
           <xs:documentation>
             <![CDATA[[
@@ -153,9 +153,6 @@
       <xs:enumeration value="NONE" />
     </xs:restriction>
   </xs:simpleType>
-  <xs:complexType name="connection-propertyType" mixed="true">
-    <xs:attribute use="required" name="name" type="xs:token"></xs:attribute>
-  </xs:complexType>
   <xs:element name="resource-adapter" type="resource-adapterType"></xs:element>
   <xs:complexType name="resource-adapterType">
     <xs:sequence>
@@ -199,12 +196,12 @@
   <xs:simpleType name="transaction-supportType">
     <xs:annotation>
       <xs:documentation> Define the typoe of transaction supported by this respurce adapter. It overrides/selects
-        connection manager one valid value are: NONE, LOCAL, XA</xs:documentation>
+        connection manager one valid value are: NoTransaction, LocalTransaction, XA</xs:documentation>
     </xs:annotation>
     <xs:restriction base="xs:token">
-      <xs:enumeration value="NONE" />
-      <xs:enumeration value="LOCAL" />
-      <xs:enumeration value="XA" />
+      <xs:enumeration value="NoTransaction" />
+      <xs:enumeration value="LocalTransaction" />
+      <xs:enumeration value="XATransaction" />
     </xs:restriction>
   </xs:simpleType>
 

Modified: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserTestCase.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserTestCase.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -22,7 +22,6 @@
 package org.jboss.jca.common.metadata.ds;
 
 import org.jboss.jca.common.api.metadata.ds.DataSources;
-import org.jboss.jca.common.metadata.ds.DsParser;
 
 import java.io.File;
 import java.io.FileInputStream;

Added: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/package.html	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,3 @@
+<body>
+This package contains Ds parser tet cases
+</body>

Modified: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/JbossRaParserTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/JbossRaParserTestCase.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/JbossRaParserTestCase.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -23,7 +23,6 @@
 
 import org.jboss.jca.common.api.metadata.jbossra.JbossRa;
 import org.jboss.jca.common.api.metadata.jbossra.jbossra20.JbossRa20;
-import org.jboss.jca.common.metadata.jbossra.JbossRaParser;
 import org.jboss.jca.common.metadata.jbossra.jbossra10.JbossRa10Impl;
 import org.jboss.jca.common.metadata.jbossra.jbossra20.JbossRa20Impl;
 import org.jboss.jca.common.metadata.ra.common.RaConfigPropertyImpl;

Added: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/jbossra/package.html	2010-08-16 22:19:54 UTC (rev 107636)
@@ -0,0 +1,3 @@
+<body>
+This package contains JbossRa parser tet cases
+</body>

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-08-16 22:17:13 UTC (rev 107635)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-08-16 22:19:54 UTC (rev 107636)
@@ -23,6 +23,7 @@
 package org.jboss.jca.deployers.fungal;
 
 import org.jboss.jca.common.annotations.Annotations;
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.jbossra.JbossRa;
 import org.jboss.jca.common.api.metadata.jbossra.jbossra20.BeanValidationGroup;
 import org.jboss.jca.common.api.metadata.jbossra.jbossra20.JbossRa20;
@@ -33,7 +34,6 @@
 import org.jboss.jca.common.api.metadata.ra.Connector.Version;
 import org.jboss.jca.common.api.metadata.ra.MessageListener;
 import org.jboss.jca.common.api.metadata.ra.ResourceAdapter1516;
-import org.jboss.jca.common.api.metadata.ra.TransactionSupportEnum;
 import org.jboss.jca.common.api.metadata.ra.ra10.ResourceAdapter10;
 import org.jboss.jca.common.metadata.MetadataFactory;
 import org.jboss.jca.core.api.bootstrap.CloneableBootstrapContext;



More information about the jboss-cvs-commits mailing list