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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 3 06:35:57 EST 2010


Author: maeste
Date: 2010-12-03 06:35:56 -0500 (Fri, 03 Dec 2010)
New Revision: 109701

Added:
   projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/BlockingTimeoutMillisNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ExceptionSorterClassNameMissing-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/IdleTimeoutMinutesNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/StaleConnectionCheckerClassNameMissing-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ValidationCheckerClassNameMissing-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryWaitMillisNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/backgroundValidationMinutesNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/noconnectionurl-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nojndiname-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nopool-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/preparedStatementCacheSizeNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/queryTimeoutNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/useTryLockNegative-ds.xml
   projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xaresourcetimeoutNegative-ds.xml
Removed:
   projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForMinimalFileTestCase.java
Modified:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonTimeOutImpl.java
   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/TimeOutImpl.java
Log:
JBJCA-478 test suite for metadata validation for datasources

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java	2010-12-03 11:29:13 UTC (rev 109700)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonIronJacamarParser.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -227,7 +227,7 @@
    }
 
    private CommonTimeOut parseTimeOut(XMLStreamReader reader, boolean isXa) throws XMLStreamException,
-      ParserException
+      ParserException, ValidateException
    {
       Long blockingTimeoutMillis = null;
       Long allocationRetryWaitMillis = null;

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonTimeOutImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonTimeOutImpl.java	2010-12-03 11:29:13 UTC (rev 109700)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonTimeOutImpl.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -22,6 +22,7 @@
 package org.jboss.jca.common.metadata.common;
 
 import org.jboss.jca.common.api.metadata.common.CommonTimeOut;
+import org.jboss.jca.common.api.validator.ValidateException;
 
 /**
  *
@@ -59,9 +60,10 @@
     * @param allocationRetry allocationRetry
     * @param allocationRetryWaitMillis allocationRetryWaitMillis
     * @param xaResourceTimeout xaResourceTimeout
+    * @throws ValidateException ValidateException
     */
    public CommonTimeOutImpl(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Integer allocationRetry,
-      Long allocationRetryWaitMillis, Integer xaResourceTimeout)
+      Long allocationRetryWaitMillis, Integer xaResourceTimeout) throws ValidateException
    {
       super();
       this.blockingTimeoutMillis = blockingTimeoutMillis;
@@ -69,6 +71,7 @@
       this.allocationRetry = allocationRetry;
       this.allocationRetryWaitMillis = allocationRetryWaitMillis;
       this.xaResourceTimeout = xaResourceTimeout;
+      this.partialCommonValidate();
    }
 
    /**
@@ -195,4 +198,20 @@
              allocationRetryWaitMillis + ", xaResourceTimeout=" + xaResourceTimeout + "]";
    }
 
+
+   private void partialCommonValidate() throws ValidateException
+   {
+      if (this.allocationRetry != null && this.allocationRetry < 0)
+         throw new ValidateException("allocationRetry cannot be < 0");
+      if (this.blockingTimeoutMillis != null && this.blockingTimeoutMillis < 0)
+         throw new ValidateException("blockingTimeoutMillis cannot be < 0");
+      if (this.allocationRetryWaitMillis != null && this.allocationRetryWaitMillis < 0)
+         throw new ValidateException("allocationRetryWaitMillis cannot be < 0");
+      if (this.idleTimeoutMinutes != null && this.idleTimeoutMinutes < 0)
+         throw new ValidateException("idleTimeoutMinutes cannot be < 0");
+      if (this.xaResourceTimeout != null && this.xaResourceTimeout < 0)
+         throw new ValidateException("xaResourceTimeout cannot be < 0");
+
+   }
+
 }

Modified: 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	2010-12-03 11:29:13 UTC (rev 109700)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -238,9 +238,9 @@
    protected void partialCommonValidation() throws ValidateException
    {
       if (this.jndiName == null)
-         throw new ValidateException("jndiName is require in " + this.getClass().getCanonicalName());
+         throw new ValidateException("jndiName is required in " + this.getClass().getCanonicalName());
       if (this.poolName == null)
-         throw new ValidateException("poolName is require in " + this.getClass().getCanonicalName());
+         throw new ValidateException("poolName is required in " + this.getClass().getCanonicalName());
 
       if (this.timeOut != null)
          this.timeOut.validate();

Modified: 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	2010-12-03 11:29:13 UTC (rev 109700)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -289,9 +289,9 @@
    public void validate() throws ValidateException
    {
       if (this.connectionUrl == null || this.connectionUrl.trim().length() == 0)
-         throw new ValidateException("connectionUrl is require in " + this.getClass().getCanonicalName());
+         throw new ValidateException("connectionUrl is required in " + this.getClass().getCanonicalName());
       if (this.driverClass == null || this.driverClass.trim().length() == 0)
-         throw new ValidateException("driverClass is require in " + this.getClass().getCanonicalName());
+         throw new ValidateException("driverClass is required in " + this.getClass().getCanonicalName());
 
    }
 }

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/TimeOutImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/TimeOutImpl.java	2010-12-03 11:29:13 UTC (rev 109700)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/TimeOutImpl.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -155,16 +155,10 @@
    @Override
    public void validate() throws ValidateException
    {
-      if (this.allocationRetry != null && this.allocationRetry < 0)
-         throw new ValidateException("allocationRetry cannot be < 0");
-      if (this.blockingTimeoutMillis != null && this.blockingTimeoutMillis < 0)
-         throw new ValidateException("blockingTimeoutMillis cannot be < 0");
-      if (this.allocationRetryWaitMillis != null && this.allocationRetryWaitMillis < 0)
-         throw new ValidateException("allocationRetryWaitMillis cannot be < 0");
-      if (this.idleTimeoutMinutes != null && this.idleTimeoutMinutes < 0)
-         throw new ValidateException("idleTimeoutMinutes cannot be < 0");
-      if (this.xaResourceTimeout != null && this.xaResourceTimeout < 0)
-         throw new ValidateException("xaResourceTimeout cannot be < 0");
+      if (this.queryTimeout != null && this.queryTimeout < 0)
+         throw new ValidateException("queryTimeout cannot be < 0");
+      if (this.useTryLock != null && this.useTryLock < 0)
+         throw new ValidateException("useTryLock cannot be < 0");
 
    }
 

Deleted: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForMinimalFileTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForMinimalFileTestCase.java	2010-12-03 11:29:13 UTC (rev 109700)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForMinimalFileTestCase.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jca.common.metadata.ds;
-
-import org.jboss.jca.common.api.metadata.ds.DataSources;
-import org.jboss.jca.common.api.validator.ValidateException;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
-/**
- *
- * A DsParserForMinimalFileTestCase.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
-public class DsParserForMinimalFileTestCase
-{
-
-   private static DsParser parser;
-
-   /**
-   *
-   * beforeClass method
-   *
-   * @throws Exception in casae of file not found
-   */
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      parser = new DsParser();
-   }
-
-   /**
-    *
-    * shouldFailIfNoDriverHasBeenSpecified
-    *
-    * @throws Exception test passes if a {@link ValidateException} has been
-    * thrown
-    */
-   @Test(expected = ValidateException.class)
-   public void shouldFailIfNoDriverHasBeenSpecified() throws Exception
-   {
-
-      FileInputStream is = null;
-
-      //given
-      File xmlFile = new File(Thread.currentThread().getContextClassLoader().getResource("ds/unit/nodriver-ds.xml")
-         .toURI());
-      try
-      {
-         is = new FileInputStream(xmlFile);
-         //when
-         DataSources ds = parser.parse(is);
-         //then
-         assertThat(ds.getDataSource().size() + ds.getXaDataSource().size(), is(1));
-
-      }
-      finally
-      {
-         if (is != null)
-            is.close();
-      }
-   }
-
-}
-

Added: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,400 @@
+/*
+ * 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.DataSources;
+import org.jboss.jca.common.api.validator.ValidateException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ *
+ * A DsParserForMinimalFileTestCase.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class DsParserForValidatorExceptionTestCase
+{
+
+   private static DsParser parser;
+
+   /**
+   *
+   * beforeClass method
+   *
+   * @throws Exception in casae of file not found
+   */
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      parser = new DsParser();
+   }
+
+   /**
+    *
+    * shouldThrowalidateExceptionIfNoDriverHasBeenSpecified
+    *
+    * @throws Exception test passes if a {@link ValidateException} has been
+    * thrown
+    */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfNoDriverHasBeenSpecified() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader().getResource("ds/unit/nodriver-ds.xml")
+         .toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfNoConnectionUrlHasBeenSpecified
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfNoConnectionUrlHasBeenSpecified() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/noconnectionurl-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfNoJndiNameHasBeenSpecified
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfNoJndiNameHasBeenSpecified() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader().getResource("ds/unit/nojndiname-ds.xml")
+         .toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfNoPoolHasBeenSpecified
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfNoPoolHasBeenSpecified() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader().getResource("ds/unit/nopool-ds.xml")
+         .toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   private void doParse(File xmlFile) throws FileNotFoundException, Exception, IOException, ValidateException
+   {
+      FileInputStream is = null;
+
+      try
+      {
+         is = new FileInputStream(xmlFile);
+         //when
+         DataSources ds = parser.parse(is);
+
+      }
+      finally
+      {
+         if (is != null)
+            is.close();
+      }
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfallocationRetryNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfallocationRetryNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/allocationRetryNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfallocationRetryWaitMillisNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfallocationRetryWaitMillisNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/allocationRetryWaitMillisNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfBlockingTimeoutMillisNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfBlockingTimeoutMillisNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/BlockingTimeoutMillisNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfIdleTimeoutMinutesNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfIdleTimeoutMinutesNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/IdleTimeoutMinutesNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfnoconnectionurl
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfnoconnectionurl() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/noconnectionurl-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfqueryTimeoutNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfqueryTimeoutNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/queryTimeoutNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfuseTryLockNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfuseTryLockNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/useTryLockNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfxaresourcetimeoutNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfxaresourcetimeoutNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/xaresourcetimeoutNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfpreparedStatementCacheSizeNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfpreparedStatementCacheSizeNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/preparedStatementCacheSizeNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfbackgroundValidationMinutesNegative
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfbackgroundValidationMinutesNegative() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/backgroundValidationMinutesNegative-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfExceptionSorterClassNameMissing
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfExceptionSorterClassNameMissing() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/ExceptionSorterClassNameMissing-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfStaleConnectionCheckerClassNameMissing
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfStaleConnectionCheckerClassNameMissing() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/StaleConnectionCheckerClassNameMissing-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+   /**
+   *
+   * shouldThrowalidateExceptionIfValidationCheckerClassNameMissing
+   *
+   * @throws Exception test passes if a {@link ValidateException} has been
+   * thrown
+   */
+   @Test(expected = ValidateException.class)
+   public void shouldThrowalidateExceptionIfValidationCheckerClassNameMissing() throws Exception
+   {
+
+      //given
+      File xmlFile = new File(Thread.currentThread().getContextClassLoader()
+         .getResource("ds/unit/ValidationCheckerClassNameMissing-ds.xml").toURI());
+      //when
+      doParse(xmlFile);
+      //then throw ValidateException
+   }
+
+}

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/BlockingTimeoutMillisNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/BlockingTimeoutMillisNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/BlockingTimeoutMillisNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <blocking-timeout-millis>-1</blocking-timeout-millis>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ExceptionSorterClassNameMissing-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ExceptionSorterClassNameMissing-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ExceptionSorterClassNameMissing-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <exception-sorter class-name=""></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/IdleTimeoutMinutesNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/IdleTimeoutMinutesNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/IdleTimeoutMinutesNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>-1</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/StaleConnectionCheckerClassNameMissing-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/StaleConnectionCheckerClassNameMissing-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/StaleConnectionCheckerClassNameMissing-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <stale-connection-checker class-name=""></stale-connection-checker>    
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ValidationCheckerClassNameMissing-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ValidationCheckerClassNameMissing-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/ValidationCheckerClassNameMissing-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <valid-connection-checker class-name=""></valid-connection-checker>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <allocation-retry>-1</allocation-retry>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryWaitMillisNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryWaitMillisNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/allocationRetryWaitMillisNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <allocation-retry-wait-millis>-1</allocation-retry-wait-millis>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/backgroundValidationMinutesNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/backgroundValidationMinutesNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/backgroundValidationMinutesNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <background-validation-minutes>-1</background-validation-minutes>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/noconnectionurl-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/noconnectionurl-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/noconnectionurl-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nojndiname-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nojndiname-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nojndiname-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nopool-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nopool-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/nopool-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/preparedStatementCacheSizeNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/preparedStatementCacheSizeNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/preparedStatementCacheSizeNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>-32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/queryTimeoutNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/queryTimeoutNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/queryTimeoutNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <query-timeout>-1</query-timeout>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/useTryLockNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/useTryLockNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/useTryLockNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- The Hypersonic embedded database JCA connection factory config -->
+<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
+<!-- $Id: hsqldb-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+    <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+    <!-- The driver class -->
+    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <pool>
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+      <!-- The login and password -->
+    </pool>
+    <security>
+      <user-name>sa</user-name>
+      <password></password>
+    </security> 
+    <!-- For server mode db, allowing other processes to use hsqldb over tcp. This requires the org.jboss.jdbc.HypersonicDatabase 
+      mbean. <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url> -->
+    <!-- For totally in-memory db, not saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
+    <!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for 
+      proper db shutdown -->
+    <time-out>
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <use-try-lock>-1</use-try-lock>
+    </time-out>
+    <statement>
+      <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
+        that should be turned off in production -->
+      <track-statements>true</track-statements>
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+    </statement>
+    <validation>
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
+      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.vendor.DummyValidConnectionChecker"></valid-connection-checker>
+      <!-- this will be run before a managed connection is removed from the pool for use by a client -->
+      <check-valid-connection-sql>select * from something</check-valid-connection-sql>
+      <!--example of how to specify class that determines if exception means connection should be destroyed -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.DummyExceptionSorter"></exception-sorter>
+    </validation>
+  </datasource>
+</datasources>
\ No newline at end of file

Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xaresourcetimeoutNegative-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xaresourcetimeoutNegative-ds.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xaresourcetimeoutNegative-ds.xml	2010-12-03 11:35:56 UTC (rev 109701)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ===================================================================== -->
+<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
+<!-- ===================================================================== -->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <xa-datasource jndi-name="XAOracleDS" pool-name="XAOracleDS">
+    <xa-datasource-property name="URL">jdbc:oracle:oci8:@tc</xa-datasource-property>
+    <xa-datasource-property name="User">scott</xa-datasource-property>
+    <xa-datasource-property name="Password">tiger</xa-datasource-property>
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-pool>
+      <!-- uncomment to enable interleaving <interleaving/> -->
+      <is-same-rm-override>false</is-same-rm-override>
+      <no-tx-separate-pools />
+    </xa-pool>
+    <time-out>
+      <xa-resource-timeout>-1</xa-resource-timeout>
+    </time-out>
+    <validation>
+      <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+      <!--valid-connection-checker-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name -->
+      <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker 
+        is prefered <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql> -->
+      <!-- Checks the Oracle error codes and messages for fatal errors -->
+      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.vendor.OracleExceptionSorter"></exception-sorter>
+    </validation>
+  </xa-datasource>
+</datasources>



More information about the jboss-cvs-commits mailing list