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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 10 09:46:41 EDT 2010


Author: maeste
Date: 2010-08-10 09:46:40 -0400 (Tue, 10 Aug 2010)
New Revision: 107521

Added:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSources.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/RecoverySettings.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/SecuritySettings.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/StatementSettings.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/TimeOutSettings.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/TransactionIsolation.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/ValidationSettings.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/package.html
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DatasourcesImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/RecoverySettingsImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecuritySettingsImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/StatementSettingsImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/TimeOutSettingsImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/ValidationSettingsImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/package.html
Modified:
   projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd
Log:
JBJCA-400 small review of xsd, Metadata interfaces and implementations

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,365 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A DataSource.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface DataSource 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 connectionUrl.
+    *
+    * @return the connectionUrl.
+    */
+   public String getConnectionUrl();
+
+   /**
+    * Get the driverClass.
+    *
+    * @return the driverClass.
+    */
+   public String getDriverClass();
+
+   /**
+    * Get the transactionIsolation.
+    *
+    * @return the transactionIsolation.
+    */
+   public TransactionIsolation getTransactionIsolation();
+
+   /**
+    * Get the connectionProperties.
+    *
+    * @return the connectionProperties.
+    */
+   public Map<String, String> getConnectionProperties();
+
+   /**
+    * Get the timeOutSettings.
+    *
+    * @return the timeOutSettings.
+    */
+   public TimeOutSettings getTimeOutSettings();
+
+   /**
+    * Get the securitySettings.
+    *
+    * @return the securitySettings.
+    */
+   public SecuritySettings getSecuritySettings();
+
+   /**
+    * Get the statementSettings.
+    *
+    * @return the statementSettings.
+    */
+   public StatementSettings getStatementSettings();
+
+   /**
+    * Get the validationSettings.
+    *
+    * @return the validationSettings.
+    */
+   public ValidationSettings getValidationSettings();
+
+   /**
+    * Get the urlDelimiter.
+    *
+    * @return the urlDelimiter.
+    */
+   public String getUrlDelimiter();
+
+   /**
+    * Get the urlSelectorStrategyClassName.
+    *
+    * @return the urlSelectorStrategyClassName.
+    */
+   public String getUrlSelectorStrategyClassName();
+
+   /**
+    * Get the newConnectionSql.
+    *
+    * @return the newConnectionSql.
+    */
+   public String getNewConnectionSql();
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   public boolean isUseJavaContext();
+
+   /**
+    * Get the poolName.
+    *
+    * @return the poolName.
+    */
+   public String getPoolName();
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+   public boolean isEnabled();
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   public String getJndiName();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+       * min-pool-size tag
+       */
+      MIN_POOL_SIZE("min-pool-size"),
+
+      /**
+      * maxPoolSize tag
+      */
+      MAXPOOLSIZE("maxPoolSize"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+      * userName tag
+      */
+      USERNAME("userName"),
+      /**
+      * password tag
+      */
+      PASSWORD("password"),
+      /**
+      * connectionUrl tag
+      */
+      CONNECTIONURL("connectionUrl"),
+      /**
+      * driverClass tag
+      */
+      DRIVERCLASS("driverClass"),
+      /**
+      * transactionIsolation tag
+      */
+      TRANSACTIONISOLATION("transactionIsolation"),
+      /**
+      * connectionProperty tag
+      */
+      CONNECTIONPROPERTY("connectionProperty"),
+      /**
+      * timeOutSettings tag
+      */
+      TIMEOUTSETTINGS("timeOutSettings"),
+      /**
+      * securitySettings tag
+      */
+      SECURITYSETTINGS("securitySettings"),
+      /**
+      * statementSettings tag
+      */
+      STATEMENTSETTINGS("statementSettings"),
+      /**
+      * validationSettings tag
+      */
+      VALIDATIONSETTINGS("validationSettings"),
+      /**
+      * urlDelimiter tag
+      */
+      URLDELIMITER("urlDelimiter"),
+      /**
+      * urlSelectorStrategyClassName tag
+      */
+      URLSELECTORSTRATEGYCLASSNAME("urlSelectorStrategyClassName"),
+      /**
+      * newConnectionSql tag
+      */
+      NEWCONNECTIONSQL("newConnectionSql");
+
+      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"),
+
+      /** jndiName attribute
+      *
+      */
+      POOL_NAME("pool-name"),
+
+      /** jndiName attribute
+      *
+      */
+      ENABLED("enabled"),
+      /** jndiName attribute
+      *
+      */
+      USEJAVACONTEXT("useJavaContext");
+
+      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/ds/DataSources.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSources.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSources.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.sql.XADataSource;
+
+/**
+ *
+ * A DataSources.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface DataSources extends JCAMetadata
+{
+
+   /**
+    * Get the datasource.
+    *
+    * @return the datasource.
+    */
+   public List<DataSource> getDatasource();
+
+   /**
+    * Get the xaDataSource.
+    *
+    * @return the xaDataSource.
+    */
+   public List<XADataSource> getXaDataSource();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+       * datasource tag
+       */
+      DATASOURCE("datasource"),
+
+      /**
+       * xa-datasource tag
+       */
+      XA_DATASOURCE("xa-datasource");
+
+      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;
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/RecoverySettings.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/RecoverySettings.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/RecoverySettings.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A RecoverySettings.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface RecoverySettings extends JCAMetadata
+{
+
+   /**
+    * Get the noRecover.
+    *
+    * @return the noRecover.
+    */
+   public boolean isNoRecover();
+
+   /**
+    * Get the recoverUserName.
+    *
+    * @return the recoverUserName.
+    */
+   public String getRecoverUserName();
+
+   /**
+    * Get the recoverPassword.
+    *
+    * @return the recoverPassword.
+    */
+   public String getRecoverPassword();
+
+   /**
+    * Get the recoverSecurityDomain.
+    *
+    * @return the recoverSecurityDomain.
+    */
+   public String getRecoverSecurityDomain();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      * noRecover tag
+      */
+      NORECOVER("noRecover"),
+      /**
+      * recoverUserName tag
+      */
+      RECOVERUSERNAME("recoverUserName"),
+      /**
+      * recoverPassword tag
+      */
+      RECOVERPASSWORD("recoverPassword"),
+      /**
+      * recoverSecurityDomain tag
+      */
+      RECOVERSECURITYDOMAIN("recoverSecurityDomain");
+
+      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;
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/SecuritySettings.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/SecuritySettings.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/SecuritySettings.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A SecuritySettings.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface SecuritySettings 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.
+    */
+   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("securityManager"),
+      /**
+      * securityDomain tag
+      */
+      SECURITYDOMAIN("securityDomain");
+
+      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;
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/StatementSettings.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/StatementSettings.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/StatementSettings.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A StatementSettings.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface StatementSettings extends JCAMetadata
+{
+
+   /**
+    *
+    * A TrackStatementsEnum.
+    *
+    * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+    *
+    */
+   public enum TrackStatementsEnum
+   {
+
+      /**
+      * true
+      */
+      TRUE,
+      /**
+       * false
+       */
+      FALSE,
+      /**
+       * NOWARN
+       */
+      NOWARN;
+
+   }
+
+   /**
+    * Get the sharePreparedStatements.
+    *
+    * @return the sharePreparedStatements.
+    */
+   public boolean isSharePreparedStatements();
+
+   /**
+    * Get the preparedStatementsCacheSize.
+    *
+    * @return the preparedStatementsCacheSize.
+    */
+   public Long getPreparedStatementsCacheSize();
+
+   /**
+    * Get the trackStatements.
+    *
+    * @return the trackStatements.
+    */
+   public TrackStatementsEnum getTrackStatements();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      * trackStatements tag
+      */
+      TRACKSTATEMENTS("trackStatements"),
+      /**
+      * preparedStatementCacheSize tag
+      */
+      PREPAREDSTATEMENTCACHESIZE("preparedStatementCacheSize"),
+      /**
+      * sharePreparedStatements tag
+      */
+      SHAREPREPAREDSTATEMENTS("sharePreparedStatements");
+
+      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;
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/TimeOutSettings.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/TimeOutSettings.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/TimeOutSettings.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A TimeOutSettings.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface TimeOutSettings extends JCAMetadata
+{
+
+   /**
+    * Get the blockingTimeoutMillis.
+    *
+    * @return the blockingTimeoutMillis.
+    */
+   public Long getBlockingTimeoutMillis();
+
+   /**
+    * Get the idleTimeoutMinutes.
+    *
+    * @return the idleTimeoutMinutes.
+    */
+   public Long getIdleTimeoutMinutes();
+
+   /**
+    * Get the setTxQuertTimeout.
+    *
+    * @return the setTxQuertTimeout.
+    */
+   public boolean isSetTxQuertTimeout();
+
+   /**
+    * Get the queryTimeout.
+    *
+    * @return the queryTimeout.
+    */
+   public Long getQueryTimeout();
+
+   /**
+    * Get the useTryLock.
+    *
+    * @return the useTryLock.
+    */
+   public Long getUseTryLock();
+
+   /**
+    * Get the allocationRetry.
+    *
+    * @return the allocationRetry.
+    */
+   public Long getAllocationRetry();
+
+   /**
+    * Get the allocationRetryWaitMillis.
+    *
+    * @return the allocationRetryWaitMillis.
+    */
+   public Long getAllocationRetryWaitMillis();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      * blockingTimeoutMillis tag
+      */
+      BLOCKINGTIMEOUTMILLIS("blockingTimeoutMillis"),
+      /**
+      * idleTimeoutMinutes tag
+      */
+      IDLETIMEOUTMINUTES("idleTimeoutMinutes"),
+      /**
+      * setTxQueryTimeout tag
+      */
+      SETTXQUERYTIMEOUT("setTxQueryTimeout"),
+      /**
+      * queryTimeout tag
+      */
+      QUERYTIMEOUT("queryTimeout"),
+      /**
+      * useTryLock tag
+      */
+      USETRYLOCK("useTryLock"),
+      /**
+      * allocationRetry tag
+      */
+      ALLOCATIONRETRY("allocationRetry"),
+      /**
+      * allocationRetryWaitMillis tag
+      */
+      ALLOCATIONRETRYWAITMILLIS("allocationRetryWaitMillis");
+
+      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;
+      }
+
+   }
+
+}

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

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/ValidationSettings.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/ValidationSettings.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/ValidationSettings.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A ValidationSettings.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface ValidationSettings extends JCAMetadata
+{
+
+   /**
+    * Get the validConnectionCheckerClassName.
+    *
+    * @return the validConnectionCheckerClassName.
+    */
+   public String getValidConnectionCheckerClassName();
+
+   /**
+    * Get the checkValidConnectionSql.
+    *
+    * @return the checkValidConnectionSql.
+    */
+   public String getCheckValidConnectionSql();
+
+   /**
+    * Get the validateOnMatch.
+    *
+    * @return the validateOnMatch.
+    */
+   public boolean isValidateOnMatch();
+
+   /**
+    * Get the backgroundValidation.
+    *
+    * @return the backgroundValidation.
+    */
+   public boolean isBackgroundValidation();
+
+   /**
+    * Get the backgroundValidationMinutes.
+    *
+    * @return the backgroundValidationMinutes.
+    */
+   public Long getBackgroundValidationMinutes();
+
+   /**
+    * Get the useFastFail.
+    *
+    * @return the useFastFail.
+    */
+   public boolean isUseFastFail();
+
+   /**
+    * Get the staleConnectionCheckerClassName.
+    *
+    * @return the staleConnectionCheckerClassName.
+    */
+   public String getStaleConnectionCheckerClassName();
+
+   /**
+    * Get the exceptionSorterClassName.
+    *
+    * @return the exceptionSorterClassName.
+    */
+   public String getExceptionSorterClassName();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      * validConnectionCheckerClassName tag
+      */
+      VALIDCONNECTIONCHECKERCLASSNAME("validConnectionCheckerClassName"),
+      /**
+      * checkValidConnectionSql tag
+      */
+      CHECKVALIDCONNECTIONSQL("checkValidConnectionSql"),
+      /**
+      * validateOnMatch tag
+      */
+      VALIDATEONMATCH("validateOnMatch"),
+      /**
+      * backgroundValidation tag
+      */
+      BACKGROUNDVALIDATION("backgroundValidation"),
+      /**
+      * backgroundValidationMinutes tag
+      */
+      BACKGROUNDVALIDATIONMINUTES("backgroundValidationMinutes"),
+      /**
+      * useFastFail tag
+      */
+      USEFASTFAIL("useFastFail"),
+      /**
+      * staleConnectionCheckerClassName tag
+      */
+      STALECONNECTIONCHECKERCLASSNAME("staleConnectionCheckerClassName"),
+      /**
+      * exceptionSorterClassName tag
+      */
+      EXCEPTIONSORTERCLASSNAME("exceptionSorterClassName");
+
+      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;
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,390 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A XaDataSource.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface XaDataSource 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 xaDataSoourceProperty.
+    *
+    * @return the xaDataSoourceProperty.
+    */
+   public Map<String, String> getXaDataSoourceProperty();
+
+   /**
+    * Get the xaDataSourceClass.
+    *
+    * @return the xaDataSourceClass.
+    */
+   public String getXaDataSourceClass();
+
+   /**
+    * Get the transactionIsolation.
+    *
+    * @return the transactionIsolation.
+    */
+   public TransactionIsolation getTransactionIsolation();
+
+   /**
+    * Get the isSameRmOverrideValue.
+    *
+    * @return the isSameRmOverrideValue.
+    */
+   public boolean isSameRmOverrideValue();
+
+   /**
+    * Get the interleaving.
+    *
+    * @return the interleaving.
+    */
+   public boolean isInterleaving();
+
+   /**
+    * Get the recoverySettings.
+    *
+    * @return the recoverySettings.
+    */
+   public RecoverySettings getRecoverySettings();
+
+   /**
+    * Get the timeOutSettings.
+    *
+    * @return the timeOutSettings.
+    */
+   public TimeOutSettings getTimeOutSettings();
+
+   /**
+    * Get the securitySettings.
+    *
+    * @return the securitySettings.
+    */
+   public SecuritySettings getSecuritySettings();
+
+   /**
+    * Get the statementSettings.
+    *
+    * @return the statementSettings.
+    */
+   public StatementSettings getStatementSettings();
+
+   /**
+    * Get the validationSettings.
+    *
+    * @return the validationSettings.
+    */
+   public ValidationSettings getValidationSettings();
+
+   /**
+    * Get the urlDelimiter.
+    *
+    * @return the urlDelimiter.
+    */
+   public String getUrlDelimiter();
+
+   /**
+    * Get the urlSelectorStrategyClassName.
+    *
+    * @return the urlSelectorStrategyClassName.
+    */
+   public String getUrlSelectorStrategyClassName();
+
+   /**
+    * Get the newConnectionSql.
+    *
+    * @return the newConnectionSql.
+    */
+   public String getNewConnectionSql();
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+   public boolean isUseJavaContext();
+
+   /**
+    * Get the poolName.
+    *
+    * @return the poolName.
+    */
+   public String getPoolName();
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+   public boolean isEnabled();
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+   public String getJndiName();
+
+   /**
+   *
+   * A Tag.
+   *
+   * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+   *
+   */
+   public enum Tag
+   {
+      /** always first
+       *
+       */
+      UNKNOWN(null),
+
+      /**
+      * minPoolSize tag
+      */
+      MINPOOLSIZE("minPoolSize"),
+      /**
+      * maxPoolSize tag
+      */
+      MAXPOOLSIZE("maxPoolSize"),
+      /**
+      * prefill tag
+      */
+      PREFILL("prefill"),
+      /**
+      * userName tag
+      */
+      USERNAME("userName"),
+      /**
+      * password tag
+      */
+      PASSWORD("password"),
+      /**
+      * xaDatasourceProperty tag
+      */
+      XADATASOURCEPROPERTY("xaDatasourceProperty"),
+      /**
+      * xaDatasourceClass tag
+      */
+      XADATASOURCECLASS("xaDatasourceClass"),
+      /**
+      * transactionIsolation tag
+      */
+      TRANSACTIONISOLATION("transactionIsolation"),
+      /**
+      * isSameRmOverrideValue tag
+      */
+      ISSAMERMOVERRIDEVALUE("isSameRmOverrideValue"),
+      /**
+      * interleaving tag
+      */
+      INTERLEAVING("interleaving"),
+      /**
+      * recoverySettings tag
+      */
+      RECOVERYSETTINGS("recoverySettings"),
+      /**
+      * timeOutSettings tag
+      */
+      TIMEOUTSETTINGS("timeOutSettings"),
+      /**
+      * xaResourceTimeout tag
+      */
+      XARESOURCETIMEOUT("xaResourceTimeout"),
+      /**
+      * securitySettings tag
+      */
+      SECURITYSETTINGS("securitySettings"),
+      /**
+      * statementSettings tag
+      */
+      STATEMENTSETTINGS("statementSettings"),
+      /**
+      * validationSettings tag
+      */
+      VALIDATIONSETTINGS("validationSettings"),
+      /**
+      * urlDelimiter tag
+      */
+      URLDELIMITER("urlDelimiter"),
+      /**
+      * urlSelectorStrategyClassName tag
+      */
+      URLSELECTORSTRATEGYCLASSNAME("urlSelectorStrategyClassName"),
+      /**
+      * newConnectionSql tag
+      */
+      NEWCONNECTIONSQL("newConnectionSql");
+
+      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"),
+
+      /** jndiName attribute
+      *
+      */
+      POOL_NAME("pool-name"),
+
+      /** jndiName attribute
+      *
+      */
+      ENABLED("enabled"),
+      /** jndiName attribute
+      *
+      */
+      USEJAVACONTEXT("useJavaContext");
+
+      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/ds/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/package.html	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,3 @@
+<body>
+This package contains interfaces to define metadata api for data_sources_1.0.xml
+</body>

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,278 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.ds.SecuritySettings;
+import org.jboss.jca.common.api.metadata.ds.StatementSettings;
+import org.jboss.jca.common.api.metadata.ds.TimeOutSettings;
+import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
+import org.jboss.jca.common.api.metadata.ds.ValidationSettings;
+
+import java.io.Serializable;
+
+/**
+ *
+ * A DataSourceAbstractImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public abstract class DataSourceAbstractImpl implements Serializable
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5612846950298960159L;
+
+   /**
+   * minPoolSize
+   */
+   protected final Integer minPoolSize;
+
+   /**
+   * maxPoolSize
+   */
+   protected final Integer maxPoolSize;
+
+   /**
+   * prefill
+   */
+   protected final boolean prefill;
+
+   /**
+   * transactionIsolation
+   */
+   protected final TransactionIsolation transactionIsolation;
+
+   /**
+   * timeOutSettings
+   */
+   protected final TimeOutSettings timeOutSettings;
+
+   /**
+   * securitySettings
+   */
+   protected final SecuritySettings securitySettings;
+
+   /**
+   * statementSettings
+   */
+   protected final StatementSettings statementSettings;
+
+   /**
+   * validationSettings
+   */
+   protected final ValidationSettings validationSettings;
+
+   /**
+   * urlDelimiter
+   */
+   protected final String urlDelimiter;
+
+   /**
+   * urlSelectorStrategyClassName
+   */
+   protected final String urlSelectorStrategyClassName;
+
+   /**
+   * useJavaContext
+   */
+   protected final boolean useJavaContext;
+
+   /**
+   * poolName
+   */
+   protected final String poolName;
+
+   /**
+   * enabled
+   */
+   protected final boolean enabled;
+
+   /**
+   * jndiName
+   */
+   protected final String jndiName;
+
+   /**
+    * Create a new DataSourceAbstractImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param transactionIsolation transactionIsolation
+    * @param timeOutSettings timeOutSettings
+    * @param securitySettings securitySettings
+    * @param statementSettings statementSettings
+    * @param validationSettings validationSettings
+    * @param urlDelimiter urlDelimiter
+    * @param urlSelectorStrategyClassName urlSelectorStrategyClassName
+    * @param useJavaContext useJavaContext
+    * @param poolName poolName
+    * @param enabled enabled
+    * @param jndiName jndiName
+    */
+   protected DataSourceAbstractImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill,
+          TransactionIsolation transactionIsolation,
+         TimeOutSettings timeOutSettings,
+         SecuritySettings securitySettings, StatementSettings statementSettings, ValidationSettings validationSettings,
+         String urlDelimiter, String urlSelectorStrategyClassName, boolean useJavaContext,
+         String poolName, boolean enabled, String jndiName)
+   {
+      super();
+      this.minPoolSize = minPoolSize;
+      this.maxPoolSize = maxPoolSize;
+      this.prefill = prefill;
+      this.transactionIsolation = transactionIsolation;
+      this.timeOutSettings = timeOutSettings;
+      this.securitySettings = securitySettings;
+      this.statementSettings = statementSettings;
+      this.validationSettings = validationSettings;
+      this.urlDelimiter = urlDelimiter;
+      this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
+      this.useJavaContext = useJavaContext;
+      this.poolName = poolName;
+      this.enabled = enabled;
+      this.jndiName = jndiName;
+   }
+
+   /**
+    * Get the minPoolSize.
+    *
+    * @return the minPoolSize.
+    */
+
+   public final Integer getMinPoolSize()
+   {
+      return minPoolSize;
+   }
+
+   /**
+    * Get the maxPoolSize.
+    *
+    * @return the maxPoolSize.
+    */
+
+   public final Integer getMaxPoolSize()
+   {
+      return maxPoolSize;
+   }
+
+   /**
+    * Get the prefill.
+    *
+    * @return the prefill.
+    */
+
+   public final boolean isPrefill()
+   {
+      return prefill;
+   }
+
+   /**
+    * Get the transactionIsolation.
+    *
+    * @return the transactionIsolation.
+    */
+
+   public final TransactionIsolation getTransactionIsolation()
+   {
+      return transactionIsolation;
+   }
+
+   /**
+    * Get the timeOutSettings.
+    *
+    * @return the timeOutSettings.
+    */
+
+   public final TimeOutSettings getTimeOutSettings()
+   {
+      return timeOutSettings;
+   }
+
+   /**
+    * Get the securitySettings.
+    *
+    * @return the securitySettings.
+    */
+
+   public final SecuritySettings getSecuritySettings()
+   {
+      return securitySettings;
+   }
+
+   /**
+    * Get the validationSettings.
+    *
+    * @return the validationSettings.
+    */
+
+   public final ValidationSettings getValidationSettings()
+   {
+      return validationSettings;
+   }
+
+   /**
+    * Get the useJavaContext.
+    *
+    * @return the useJavaContext.
+    */
+
+   public final boolean isUseJavaContext()
+   {
+      return useJavaContext;
+   }
+
+   /**
+    * Get the poolName.
+    *
+    * @return the poolName.
+    */
+
+   public final String getPoolName()
+   {
+      return poolName;
+   }
+
+   /**
+    * Get the enabled.
+    *
+    * @return the enabled.
+    */
+
+   public final boolean isEnabled()
+   {
+      return enabled;
+   }
+
+   /**
+    * Get the jndiName.
+    *
+    * @return the jndiName.
+    */
+
+   public final String getJndiName()
+   {
+      return jndiName;
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,383 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.ds.DataSource;
+import org.jboss.jca.common.api.metadata.ds.SecuritySettings;
+import org.jboss.jca.common.api.metadata.ds.StatementSettings;
+import org.jboss.jca.common.api.metadata.ds.TimeOutSettings;
+import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
+import org.jboss.jca.common.api.metadata.ds.ValidationSettings;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A DataSourceImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class DataSourceImpl extends DataSourceAbstractImpl implements DataSource
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5214100851560229431L;
+
+   private final String userName;
+
+   private final String password;
+
+   private final String connectionUrl;
+
+   private final String driverClass;
+
+   private final HashMap<String, String> connectionProperties;
+
+   private final String newConnectionSql;
+
+   /**
+    * Create a new DataSourceImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param userName userName
+    * @param password password
+    * @param connectionUrl connectionUrl
+    * @param driverClass driverClass
+    * @param transactionIsolation transactionIsolation
+    * @param connectionProperties connectionProperties
+    * @param timeOutSettings timeOutSettings
+    * @param securitySettings securitySettings
+    * @param statementSettings statementSettings
+    * @param validationSettings validationSettings
+    * @param urlDelimiter urlDelimiter
+    * @param urlSelectorStrategyClassName urlSelectorStrategyClassName
+    * @param newConnectionSql newConnectionSql
+    * @param useJavaContext useJavaContext
+    * @param poolName poolName
+    * @param enabled enabled
+    * @param jndiName jndiName
+    */
+   public DataSourceImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName, String password,
+         String connectionUrl, String driverClass, TransactionIsolation transactionIsolation,
+         Map<String, String> connectionProperties, TimeOutSettings timeOutSettings,
+         SecuritySettings securitySettings, StatementSettings statementSettings, ValidationSettings validationSettings,
+         String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql, boolean useJavaContext,
+         String poolName, boolean enabled, String jndiName)
+   {
+      super(minPoolSize, maxPoolSize, prefill, transactionIsolation, timeOutSettings, securitySettings,
+            statementSettings, validationSettings, urlDelimiter, urlSelectorStrategyClassName, useJavaContext,
+            poolName, enabled, jndiName);
+      this.userName = userName;
+      this.password = password;
+      this.connectionUrl = connectionUrl;
+      this.driverClass = driverClass;
+      if (connectionProperties != null)
+      {
+         this.connectionProperties = new HashMap<String, String>(connectionProperties.size());
+         this.connectionProperties.putAll(connectionProperties);
+      }
+      else
+      {
+         this.connectionProperties = new HashMap<String, String>(0);
+      }
+      this.newConnectionSql = newConnectionSql;
+
+   }
+
+   /**
+    * 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 connectionUrl.
+    *
+    * @return the connectionUrl.
+    */
+   @Override
+   public final String getConnectionUrl()
+   {
+      return connectionUrl;
+   }
+
+   /**
+    * Get the driverClass.
+    *
+    * @return the driverClass.
+    */
+   @Override
+   public final String getDriverClass()
+   {
+      return driverClass;
+   }
+
+   /**
+    * Get the connectionProperties.
+    *
+    * @return the connectionProperties.
+    */
+   @Override
+   public final Map<String, String> getConnectionProperties()
+   {
+      return Collections.unmodifiableMap(connectionProperties);
+   }
+
+   /**
+    * Get the statementSettings.
+    *
+    * @return the statementSettings.
+    */
+   @Override
+   public final StatementSettings getStatementSettings()
+   {
+      return statementSettings;
+   }
+
+   /**
+    * Get the urlDelimiter.
+    *
+    * @return the urlDelimiter.
+    */
+   @Override
+   public final String getUrlDelimiter()
+   {
+      return urlDelimiter;
+   }
+
+   /**
+    * Get the urlSelectorStrategyClassName.
+    *
+    * @return the urlSelectorStrategyClassName.
+    */
+   @Override
+   public final String getUrlSelectorStrategyClassName()
+   {
+      return urlSelectorStrategyClassName;
+   }
+
+   /**
+    * Get the newConnectionSql.
+    *
+    * @return the newConnectionSql.
+    */
+   @Override
+   public final String getNewConnectionSql()
+   {
+      return newConnectionSql;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + ((connectionProperties == null) ? 0 : connectionProperties.hashCode());
+      result = prime * result + ((connectionUrl == null) ? 0 : connectionUrl.hashCode());
+      result = prime * result + ((driverClass == null) ? 0 : driverClass.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 + ((newConnectionSql == null) ? 0 : newConnectionSql.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 + ((securitySettings == null) ? 0 : securitySettings.hashCode());
+      result = prime * result + ((statementSettings == null) ? 0 : statementSettings.hashCode());
+      result = prime * result + ((timeOutSettings == null) ? 0 : timeOutSettings.hashCode());
+      result = prime * result + ((transactionIsolation == null) ? 0 : transactionIsolation.hashCode());
+      result = prime * result + ((urlDelimiter == null) ? 0 : urlDelimiter.hashCode());
+      result = prime * result + ((urlSelectorStrategyClassName == null) ? 0 : urlSelectorStrategyClassName.hashCode());
+      result = prime * result + (useJavaContext ? 1231 : 1237);
+      result = prime * result + ((userName == null) ? 0 : userName.hashCode());
+      result = prime * result + ((validationSettings == null) ? 0 : validationSettings.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof DataSourceImpl))
+         return false;
+      DataSourceImpl other = (DataSourceImpl) obj;
+      if (connectionProperties == null)
+      {
+         if (other.connectionProperties != null)
+            return false;
+      }
+      else if (!connectionProperties.equals(other.connectionProperties))
+         return false;
+      if (connectionUrl == null)
+      {
+         if (other.connectionUrl != null)
+            return false;
+      }
+      else if (!connectionUrl.equals(other.connectionUrl))
+         return false;
+      if (driverClass == null)
+      {
+         if (other.driverClass != null)
+            return false;
+      }
+      else if (!driverClass.equals(other.driverClass))
+         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 (newConnectionSql == null)
+      {
+         if (other.newConnectionSql != null)
+            return false;
+      }
+      else if (!newConnectionSql.equals(other.newConnectionSql))
+         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 (securitySettings == null)
+      {
+         if (other.securitySettings != null)
+            return false;
+      }
+      else if (!securitySettings.equals(other.securitySettings))
+         return false;
+      if (statementSettings == null)
+      {
+         if (other.statementSettings != null)
+            return false;
+      }
+      else if (!statementSettings.equals(other.statementSettings))
+         return false;
+      if (timeOutSettings == null)
+      {
+         if (other.timeOutSettings != null)
+            return false;
+      }
+      else if (!timeOutSettings.equals(other.timeOutSettings))
+         return false;
+      if (transactionIsolation != other.transactionIsolation)
+         return false;
+      if (urlDelimiter == null)
+      {
+         if (other.urlDelimiter != null)
+            return false;
+      }
+      else if (!urlDelimiter.equals(other.urlDelimiter))
+         return false;
+      if (urlSelectorStrategyClassName == null)
+      {
+         if (other.urlSelectorStrategyClassName != null)
+            return false;
+      }
+      else if (!urlSelectorStrategyClassName.equals(other.urlSelectorStrategyClassName))
+         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 (validationSettings == null)
+      {
+         if (other.validationSettings != null)
+            return false;
+      }
+      else if (!validationSettings.equals(other.validationSettings))
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "DataSourceImpl [minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill
+            + ", userName=" + userName + ", password=" + password + ", connectionUrl=" + connectionUrl
+            + ", driverClass=" + driverClass + ", transactionIsolation=" + transactionIsolation
+            + ", connectionProperties=" + connectionProperties + ", timeOutSettings=" + timeOutSettings
+            + ", securitySettings=" + securitySettings + ", statementSettings=" + statementSettings
+            + ", validationSettings=" + validationSettings + ", urlDelimiter=" + urlDelimiter
+            + ", urlSelectorStrategyClassName=" + urlSelectorStrategyClassName + ", newConnectionSql="
+            + newConnectionSql + ", useJavaContext=" + useJavaContext + ", poolName=" + poolName + ", enabled="
+            + enabled + ", jndiName=" + jndiName + "]";
+   }
+}

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

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

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecuritySettingsImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecuritySettingsImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/SecuritySettingsImpl.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -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.ds;
+
+import org.jboss.jca.common.api.metadata.ds.SecuritySettings;
+
+
+/**
+ *
+ * A SecuritySettingsImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class SecuritySettingsImpl implements SecuritySettings
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5842402120520191086L;
+
+   private final SecurityManager securityManager;
+
+   private final String securityDomain;
+
+   /**
+    * Create a new SecuritySettingsImpl.
+    *
+    * @param securityManager securityManager
+    * @param securityDomain securityDomain
+    */
+   public SecuritySettingsImpl(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 SecuritySettingsImpl))
+         return false;
+      SecuritySettingsImpl other = (SecuritySettingsImpl) 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 "SecuritySettingsImpl [securityManager=" + securityManager + ", securityDomain=" + securityDomain + "]";
+   }
+
+}

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

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

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

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,420 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.ds.RecoverySettings;
+import org.jboss.jca.common.api.metadata.ds.SecuritySettings;
+import org.jboss.jca.common.api.metadata.ds.StatementSettings;
+import org.jboss.jca.common.api.metadata.ds.TimeOutSettings;
+import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
+import org.jboss.jca.common.api.metadata.ds.ValidationSettings;
+import org.jboss.jca.common.api.metadata.ds.XaDataSource;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A DataSourceImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class XADataSourceImpl extends DataSourceAbstractImpl implements XaDataSource
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -1401087499308709724L;
+
+   private final String userName;
+
+   private final String password;
+
+   private final HashMap<String, String> xaDataSoourceProperty;
+
+   private final String xaDataSourceClass;
+
+   private final boolean isSameRmOverrideValue;
+
+   private final boolean interleaving;
+
+   private final RecoverySettings recoverySettings;
+
+   private final String newConnectionSql;
+
+   /**
+    * Create a new XADataSourceImpl.
+    *
+    * @param minPoolSize minPoolSize
+    * @param maxPoolSize maxPoolSize
+    * @param prefill prefill
+    * @param userName userName
+    * @param password password
+    * @param xaDataSoourceProperty xaDataSoourceProperty
+    * @param xaDataSourceClass xaDataSourceClass
+    * @param transactionIsolation transactionIsolation
+    * @param isSameRmOverrideValue isSameRmOverrideValue
+    * @param interleaving interleaving
+    * @param recoverySettings recoverySettings
+    * @param timeOutSettings timeOutSettings
+    * @param securitySettings securitySettings
+    * @param statementSettings statementSettings
+    * @param validationSettings validationSettings
+    * @param urlDelimiter urlDelimiter
+    * @param urlSelectorStrategyClassName urlSelectorStrategyClassName
+    * @param newConnectionSql newConnectionSql
+    * @param useJavaContext useJavaContext
+    * @param poolName poolName
+    * @param enabled enabled
+    * @param jndiName jndiName
+    */
+   public XADataSourceImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName, String password,
+         Map<String, String> xaDataSoourceProperty, String xaDataSourceClass,
+         TransactionIsolation transactionIsolation, boolean isSameRmOverrideValue, boolean interleaving,
+         RecoverySettings recoverySettings, TimeOutSettings timeOutSettings, SecuritySettings securitySettings,
+         StatementSettings statementSettings, ValidationSettings validationSettings, String urlDelimiter,
+         String urlSelectorStrategyClassName, String newConnectionSql, boolean useJavaContext, String poolName,
+         boolean enabled, String jndiName)
+   {
+      super(minPoolSize, maxPoolSize, prefill, transactionIsolation, timeOutSettings, securitySettings,
+            statementSettings, validationSettings, urlDelimiter, urlSelectorStrategyClassName, useJavaContext,
+            poolName, enabled, jndiName);
+      this.userName = userName;
+      this.password = password;
+      if (xaDataSoourceProperty != null)
+      {
+         this.xaDataSoourceProperty = new HashMap<String, String>(xaDataSoourceProperty.size());
+         this.xaDataSoourceProperty.putAll(xaDataSoourceProperty);
+      }
+      else
+      {
+         this.xaDataSoourceProperty = new HashMap<String, String>(0);
+      }
+      this.xaDataSourceClass = xaDataSourceClass;
+      this.isSameRmOverrideValue = isSameRmOverrideValue;
+      this.interleaving = interleaving;
+      this.recoverySettings = recoverySettings;
+      this.newConnectionSql = newConnectionSql;
+   }
+
+   /**
+    * 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 xaDataSoourceProperty.
+    *
+    * @return the xaDataSoourceProperty.
+    */
+   @Override
+   public final Map<String, String> getXaDataSoourceProperty()
+   {
+      return Collections.unmodifiableMap(xaDataSoourceProperty);
+   }
+
+   /**
+    * Get the xaDataSourceClass.
+    *
+    * @return the xaDataSourceClass.
+    */
+   @Override
+   public final String getXaDataSourceClass()
+   {
+      return xaDataSourceClass;
+   }
+
+   /**
+    * Get the isSameRmOverrideValue.
+    *
+    * @return the isSameRmOverrideValue.
+    */
+   @Override
+   public final boolean isSameRmOverrideValue()
+   {
+      return isSameRmOverrideValue;
+   }
+
+   /**
+    * Get the interleaving.
+    *
+    * @return the interleaving.
+    */
+   @Override
+   public final boolean isInterleaving()
+   {
+      return interleaving;
+   }
+
+   /**
+    * Get the recoverySettings.
+    *
+    * @return the recoverySettings.
+    */
+   @Override
+   public final RecoverySettings getRecoverySettings()
+   {
+      return recoverySettings;
+   }
+
+   /**
+    * Get the statementSettings.
+    *
+    * @return the statementSettings.
+    */
+   @Override
+   public final StatementSettings getStatementSettings()
+   {
+      return statementSettings;
+   }
+
+   /**
+    * Get the urlDelimiter.
+    *
+    * @return the urlDelimiter.
+    */
+   @Override
+   public final String getUrlDelimiter()
+   {
+      return urlDelimiter;
+   }
+
+   /**
+    * Get the urlSelectorStrategyClassName.
+    *
+    * @return the urlSelectorStrategyClassName.
+    */
+   @Override
+   public final String getUrlSelectorStrategyClassName()
+   {
+      return urlSelectorStrategyClassName;
+   }
+
+   /**
+    * Get the newConnectionSql.
+    *
+    * @return the newConnectionSql.
+    */
+   @Override
+   public final String getNewConnectionSql()
+   {
+      return newConnectionSql;
+   }
+
+   @Override
+   public int hashCode()
+   {
+      final int prime = 31;
+      int result = 1;
+      result = prime * result + (enabled ? 1231 : 1237);
+      result = prime * result + (interleaving ? 1231 : 1237);
+      result = prime * result + (isSameRmOverrideValue ? 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 + ((newConnectionSql == null) ? 0 : newConnectionSql.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 + ((recoverySettings == null) ? 0 : recoverySettings.hashCode());
+      result = prime * result + ((securitySettings == null) ? 0 : securitySettings.hashCode());
+      result = prime * result + ((statementSettings == null) ? 0 : statementSettings.hashCode());
+      result = prime * result + ((timeOutSettings == null) ? 0 : timeOutSettings.hashCode());
+      result = prime * result + ((transactionIsolation == null) ? 0 : transactionIsolation.hashCode());
+      result = prime * result + ((urlDelimiter == null) ? 0 : urlDelimiter.hashCode());
+      result = prime * result + ((urlSelectorStrategyClassName == null) ? 0 : urlSelectorStrategyClassName.hashCode());
+      result = prime * result + (useJavaContext ? 1231 : 1237);
+      result = prime * result + ((userName == null) ? 0 : userName.hashCode());
+      result = prime * result + ((validationSettings == null) ? 0 : validationSettings.hashCode());
+      result = prime * result + ((xaDataSoourceProperty == null) ? 0 : xaDataSoourceProperty.hashCode());
+      result = prime * result + ((xaDataSourceClass == null) ? 0 : xaDataSourceClass.hashCode());
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (this == obj)
+         return true;
+      if (obj == null)
+         return false;
+      if (!(obj instanceof XADataSourceImpl))
+         return false;
+      XADataSourceImpl other = (XADataSourceImpl) obj;
+      if (enabled != other.enabled)
+         return false;
+      if (interleaving != other.interleaving)
+         return false;
+      if (isSameRmOverrideValue != other.isSameRmOverrideValue)
+         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 (newConnectionSql == null)
+      {
+         if (other.newConnectionSql != null)
+            return false;
+      }
+      else if (!newConnectionSql.equals(other.newConnectionSql))
+         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 (recoverySettings == null)
+      {
+         if (other.recoverySettings != null)
+            return false;
+      }
+      else if (!recoverySettings.equals(other.recoverySettings))
+         return false;
+      if (securitySettings == null)
+      {
+         if (other.securitySettings != null)
+            return false;
+      }
+      else if (!securitySettings.equals(other.securitySettings))
+         return false;
+      if (statementSettings == null)
+      {
+         if (other.statementSettings != null)
+            return false;
+      }
+      else if (!statementSettings.equals(other.statementSettings))
+         return false;
+      if (timeOutSettings == null)
+      {
+         if (other.timeOutSettings != null)
+            return false;
+      }
+      else if (!timeOutSettings.equals(other.timeOutSettings))
+         return false;
+      if (transactionIsolation != other.transactionIsolation)
+         return false;
+      if (urlDelimiter == null)
+      {
+         if (other.urlDelimiter != null)
+            return false;
+      }
+      else if (!urlDelimiter.equals(other.urlDelimiter))
+         return false;
+      if (urlSelectorStrategyClassName == null)
+      {
+         if (other.urlSelectorStrategyClassName != null)
+            return false;
+      }
+      else if (!urlSelectorStrategyClassName.equals(other.urlSelectorStrategyClassName))
+         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 (validationSettings == null)
+      {
+         if (other.validationSettings != null)
+            return false;
+      }
+      else if (!validationSettings.equals(other.validationSettings))
+         return false;
+      if (xaDataSoourceProperty == null)
+      {
+         if (other.xaDataSoourceProperty != null)
+            return false;
+      }
+      else if (!xaDataSoourceProperty.equals(other.xaDataSoourceProperty))
+         return false;
+      if (xaDataSourceClass == null)
+      {
+         if (other.xaDataSourceClass != null)
+            return false;
+      }
+      else if (!xaDataSourceClass.equals(other.xaDataSourceClass))
+         return false;
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "XADataSourceImpl [minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill
+            + ", userName=" + userName + ", password=" + password + ", xaDataSoourceProperty=" + xaDataSoourceProperty
+            + ", xaDataSourceClass=" + xaDataSourceClass + ", transactionIsolation=" + transactionIsolation
+            + ", isSameRmOverrideValue=" + isSameRmOverrideValue + ", interleaving=" + interleaving
+            + ", recoverySettings=" + recoverySettings + ", timeOutSettings=" + timeOutSettings + ", securitySettings="
+            + securitySettings + ", statementSettings=" + statementSettings + ", validationSettings="
+            + validationSettings + ", urlDelimiter=" + urlDelimiter + ", urlSelectorStrategyClassName="
+            + urlSelectorStrategyClassName + ", newConnectionSql=" + newConnectionSql + ", useJavaContext="
+            + useJavaContext + ", poolName=" + poolName + ", enabled=" + enabled + ", jndiName=" + jndiName + "]";
+   }
+}

Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/package.html	2010-08-10 13:46:40 UTC (rev 107521)
@@ -0,0 +1,3 @@
+<body>
+This package contains metadatas implementation for data_sources_1.0.xsd
+</body>

Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd	2010-08-10 11:14:27 UTC (rev 107520)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd	2010-08-10 13:46:40 UTC (rev 107521)
@@ -142,47 +142,7 @@
       <xs:element name="time-out-settings" type="time-out-settings_type" minOccurs="0"/>
       <xs:element minOccurs="0" name="security-settings" type="security-settings_type"> </xs:element>
 
-      <xs:element name="statement-settings" minOccurs="0">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element minOccurs="0" name="track-statements" type="track-statements-type">
-              <xs:annotation>
-                <xs:documentation>
-                  <![CDATA[[
-                  Whether to check for unclosed statements when a connection is returned 
-                to the pool and result sets are closed when a statement is closed/return 
-                to the prepared statement cache. valid values are: false - do not track statements 
-                and results true - track statements and result sets and warn when they are 
-                not closed nowarn - track statements but do no warn about them being unclosed 
-                (the default) e.g. <track-statements>nowarn</track-statements>
-              ]]>
-                </xs:documentation>
-              </xs:annotation>
-            </xs:element>
-            <xs:element minOccurs="0" name="prepared-statement-cache-size"
-              type="xs:nonNegativeInteger">
-              <xs:annotation>
-                <xs:documentation>
-                  <![CDATA[[
-               The number of prepared statements per connection in an LRU cache
-              ]]>
-                </xs:documentation>
-              </xs:annotation>
-            </xs:element>
-            <xs:element minOccurs="0" name="share-prepared-statements"
-              type="boolean-presence-ComplexType">
-              <xs:annotation>
-                <xs:documentation>
-                  <![CDATA[[
-                whether to share prepare statements, i.e. whether asking for same 
-                statement twice without closing uses the same underlying prepared statement. 
-                The default is false. e.g. <share-prepared-statements/>
-              ]]>
-                </xs:documentation>
-              </xs:annotation>
-            </xs:element>
-          </xs:sequence>
-        </xs:complexType>
+      <xs:element name="statement-settings" minOccurs="0" type="statement-settings_type">
       </xs:element>
 
       <xs:element name="validation-settings" type="validation-settings_type" minOccurs="0"/>
@@ -472,46 +432,67 @@
       <xs:enumeration value="TRANSACTION_NONE"/>
     </xs:restriction>
   </xs:simpleType>
+  
+   <xs:simpleType name="security-manager-values">
+    <xs:annotation>
+      <xs:documentation>
+        Define constants used as the possible
+        security manager 
+        in security-settings_type. See there for complete documentation
+        Include: APPLICATION
+        DOMAIN
+        APPLICATION-AND-DOMAIN
+        NONE
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:token">
+      <xs:enumeration value="APPLICATION"/>
+      <xs:enumeration value="DOMAIN"/>
+      <xs:enumeration value="APPLICATION-AND-DOMAIN"/>
+      <xs:enumeration value="NONE"/>
+    </xs:restriction>
+  </xs:simpleType>
 
   <xs:complexType name="security-settings_type">
-    <xs:choice minOccurs="0">
-      <xs:element name="application-managed-security" type="boolean-presence-ComplexType"
+    <xs:sequence>
+      <xs:element name="security-manager" type="security-manager-values"
         minOccurs="0">
         <xs:annotation>
           <xs:documentation>
-              <![CDATA[[
-              Indicates that app supplied parameters (such as from getConnection(user, 
-              pw)) are used to distinguish connections in the pool. Ex: <application-managed-security/>
+            <![CDATA[[
+              Possible value are:
+              * APPLICATION: Indicates that app supplied parameters (such as from getConnection(user, 
+                  pw)) are used to distinguish connections in the pool.
+              * DOMAIN: Indicates Subject (from security domain) are used to distinguish connections 
+                  in the pool. The content is the security-domain is the name of the JAAS security
+                  manager that will handle authentication.
+              * APPLICATION-AND-DOMAIN: Indicates that either app supplied parameters (such as from getConnection(user, 
+              pw)) or Subject (from security domain) are used to distinguish connections 
+              in the pool. The content is the security-domain is the name of the JAAS security
+                  manager that will handle authentication.
+              * NONE: user/password provided in datasource definition are used.
               ]]>
           </xs:documentation>
         </xs:annotation>
       </xs:element>
-      <xs:element name="security-domain" type="xs:token" minOccurs="0">
+      
+      <xs:element name="security-domain" type="xs:token"
+        minOccurs="0">
         <xs:annotation>
           <xs:documentation>
-              <![CDATA[[
-              Indicates Subject (from security domain) are used to distinguish connections 
-              in the pool. The content of the security-domain is the name of the JAAS security 
+            <![CDATA[[
+              The content of the security-domain is the name of the JAAS security 
               manager that will handle authentication. This name correlates to the JAAS 
-              login-config.xml descriptor application-policy/name attribute. Ex: <security-domain>HsqlDbRealm</security-domain> 
+              login-config.xml descriptor application-policy/name attribute. 
+              Ex: <security-domain>HsqlDbRealm</security-domain> 
+              used for DOMAIN and APPLICATION-AND-DOMAIN security manager
               ]]>
           </xs:documentation>
         </xs:annotation>
       </xs:element>
-      <xs:element name="security-domain-and-application" type="xs:token" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>
-              <![CDATA[[
-              Indicates that either app supplied parameters (such as from getConnection(user, 
-              pw)) or Subject (from security domain) are used to distinguish connections 
-              in the pool. The content of the security-domain is the name of the JAAS security 
-              manager that will handle authentication. This name correlates to the JAAS 
-              login-config.xml descriptor application-policy/name attribute. Ex: <security-domain-and-application>HsqlDbRealm</security-domain-and-application> 
-              ]]>
-          </xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:choice>
+   
+    </xs:sequence>
+    
   </xs:complexType>
 
 
@@ -761,4 +742,20 @@
       <xs:enumeration value="nowarn"/>
     </xs:restriction>
   </xs:simpleType>
+  <xs:complexType name="statement-settings_type">
+    <xs:sequence>
+      <xs:element minOccurs="0" name="track-statements"
+        type="track-statements-type">
+        <xs:annotation></xs:annotation>
+      </xs:element>
+      <xs:element minOccurs="0" name="prepared-statement-cache-size"
+        type="xs:nonNegativeInteger">
+        <xs:annotation></xs:annotation>
+      </xs:element>
+      <xs:element minOccurs="0" name="share-prepared-statements"
+        type="boolean-presence-ComplexType">
+        <xs:annotation></xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
 </xs:schema>



More information about the jboss-cvs-commits mailing list