[jboss-cvs] JBossAS SVN: r84044 - in projects/metadata/trunk/src: test/java/org/jboss/test/metadata/rar and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 10 04:37:52 EST 2009


Author: jeff.zhang
Date: 2009-02-10 04:37:52 -0500 (Tue, 10 Feb 2009)
New Revision: 84044

Added:
   projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50NegativeUnitTestCase.java
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserConnectionUrl.xml
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserDriverClass.xml
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserJndiName.xml
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsBasic.xml
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsMinimal.xml
Removed:
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml
   projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testMinimal.xml
Modified:
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java
   projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java
   projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/package.html
Log:
[JBMETA-167] add some ds negative tests

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java	2009-02-10 09:27:05 UTC (rev 84043)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java	2009-02-10 09:37:52 UTC (rev 84044)
@@ -155,6 +155,7 @@
     * 
     * @param jndiName The jndiName to set.
     */
+   @XmlElement(required=true)
    public void setJndiName(String jndiName)
    {
       this.jndiName = jndiName;

Added: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50NegativeUnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50NegativeUnitTestCase.java	                        (rev 0)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50NegativeUnitTestCase.java	2009-02-10 09:37:52 UTC (rev 84044)
@@ -0,0 +1,111 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.metadata.rar;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.rar.jboss.mcf.ManagedConnectionFactoryDeploymentGroup;
+
+import org.jboss.test.metadata.javaee.AbstractJavaEEEverythingTest;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+
+/**
+ * Test ResourceAdapter ds.xml metadata.
+ *
+ * @author Jeff Zhang
+ * @version $Revision$
+ */
+public class JcaDs50NegativeUnitTestCase extends AbstractJavaEEEverythingTest
+{
+   private static final Logger log = Logger.getLogger(JcaDs50NegativeUnitTestCase.class);
+
+   
+   public static SchemaBindingResolver initResolver()
+   {
+      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+      resolver.addClassBindingForLocation("jboss-ds_5_0.xsd", ManagedConnectionFactoryDeploymentGroup.class);
+      return resolver;
+   }
+
+   public JcaDs50NegativeUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      enableTrace("org.jboss.xb");
+   }
+   
+   /**
+    * test miss jndi-name
+    */
+   public void testParserJndiName() throws Exception
+   {
+      negativeParserTest("jndi-name");
+   }
+   
+   /**
+    * test miss connection-url
+    */
+   public void testParserConnectionUrl() throws Exception
+   {
+      negativeParserTest("connection-url");
+   }
+   
+   /**
+    * test miss driver-class
+    */
+   public void testParserDriverClass() throws Exception
+   {
+      negativeParserTest("driver-class");
+   }
+   
+   protected ManagedConnectionFactoryDeploymentGroup unmarshalMCFD() throws Exception
+   {
+      return unmarshal(ManagedConnectionFactoryDeploymentGroup.class);
+   }
+   
+   private void negativeParserTest(String element) throws Exception
+   {
+      try
+      {
+         ManagedConnectionFactoryDeploymentGroup connector = unmarshalMCFD();
+         fail(getName() + " should be failed since we miss " + element);
+      } catch (Exception expected)
+      {
+         StringWriter sw = new StringWriter();
+         PrintWriter pw = new PrintWriter(sw);
+         expected.printStackTrace(pw);
+         assertTrue(sw.toString().indexOf(element) > 0);
+      }    
+   }
+
+
+}


Property changes on: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50NegativeUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Modified: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java	2009-02-10 09:27:05 UTC (rev 84043)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java	2009-02-10 09:37:52 UTC (rev 84044)
@@ -65,7 +65,7 @@
    /**
     * test a minimal local-tx-datasource
     */
-   public void testMinimal() throws Exception
+   public void testDsMinimal() throws Exception
    {
 
       ManagedConnectionFactoryDeploymentGroup ds = unmarshalMCFD();
@@ -80,7 +80,7 @@
    /**
     * test a basic local-tx-datasource, for example hsql-ds.xml
     */   
-   public void testBasic() throws Exception
+   public void testDsBasic() throws Exception
    {
 
       ManagedConnectionFactoryDeploymentGroup ds = unmarshalMCFD();
@@ -158,7 +158,7 @@
       assertEquals(ld.getSecurityMetaData().getDomain(), "HsqlDbRealm");
       assertTestConnectionPool(ld);
       assertTrue(ld.isValidateOnMatch());
-      //assertTrue(ld.getNoTxSeparatePools());
+
       assertTestDatasource(ld);
       
       assertTestAddition(ld);
@@ -174,7 +174,6 @@
       XADataSourceDeploymentMetaData ld = (XADataSourceDeploymentMetaData)ds.getDeployments().get(0);
       
       assertFalse(ld.isUseJavaContext());
-      //assertTrue(ld.getTrackConnectionByTransaction());
       assertTrue(ld.isInterleaving());
       
       assertTrue(ld.getXaDataSourceClass().startsWith("oracle"));
@@ -184,13 +183,12 @@
       assertTestUrl(ld);
       
       assertFalse(ld.getIsSameRMOverrideValue());
-      //transaction-isolation
 
       assertTestUser(ld);
       assertEquals(ld.getSecurityMetaData().getDomain(), "HsqlDbRealm");
       assertTestConnectionPool(ld);
       assertTrue(ld.isValidateOnMatch());
-      //assertTrue(ld.getNoTxSeparatePools());
+
       assertEquals(ld.getXaResourceTimeout(), 300);
       assertTestDatasource(ld);
       

Modified: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/package.html
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/package.html	2009-02-10 09:27:05 UTC (rev 84043)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/package.html	2009-02-10 09:37:52 UTC (rev 84044)
@@ -112,6 +112,131 @@
 <td>testParserSecurityPermSpec</td></tr>
 
 </tbody>
+</table>
+
+
+      <p>
+         JCA ds.xml testcases.
+      </p>
+
+<table border>
+<thead>
+<tr><th>Area</th><th>Element</th><th>Positive</th><th>Negative</th></tr>
+</thead>
+<tbody>
+<tr><td rowspan=36>ds.xml</td>
+<td>jndi-name</td>
+<td rowspan=36>testNoTxDsEverything<br/>testLocalTxDsEverything<br/>testXaDsEverything</td>
+<td>testParserJndiName</td></tr>
+
+<tr><td>use-java-context</td>
+<td></td></tr>
+
+<tr><td>connection-url</td>
+<td>testParserConnectionUrl</td></tr>
+
+<tr><td>url-delimiter</td>
+<td></td></tr>
+
+<tr><td>url-selector-strategy-class-name</td>
+<td></td></tr>
+
+<tr><td>driver-class</td>
+<td>testParserDriverClass</td></tr>
+
+<tr><td>transaction-isolation</td>
+<td></td></tr>
+
+<tr><td>connection-property</td>
+<td></td></tr>
+
+<tr><td>user-name</td>
+<td></td></tr>
+
+<tr><td>password</td>
+<td></td></tr>
+
+<tr><td>security-domain</td>
+<td></td></tr>
+
+<tr><td>min-pool-size</td>
+<td></td></tr>
+
+<tr><td>max-pool-size</td>
+<td></td></tr>
+
+<tr><td>locking-timeout-millis</td>
+<td></td></tr>
+
+<tr><td>background-validation</td>
+<td></td></tr>
+
+<tr><td>background-validation-millis</td>
+<td></td></tr>
+
+<tr><td>idle-timeout-minutes</td>
+<td></td></tr>
+
+<tr><td>allocation-retry</td>
+<td></td></tr>
+
+<tr><td>allocation-retry-wait-millis</td>
+<td></td></tr>
+
+<tr><td>validate-on-match</td>
+<td></td></tr>
+
+<tr><td>no-tx-separate-pools</td>
+<td></td></tr>
+
+<tr><td>new-connection-sql</td>
+<td></td></tr>
+
+<tr><td>check-valid-connection-sql</td>
+<td></td></tr>
+
+<tr><td>valid-connection-checker-class-name</td>
+<td></td></tr>
+
+<tr><td>exception-sorter-class-name</td>
+<td></td></tr>
+
+
+<tr><td>stale-connection-checker-class-name</td>
+<td></td></tr>
+
+<tr><td>track-statements</td>
+<td></td></tr>
+
+<tr><td>prefill</td>
+<td></td></tr>
+
+<tr><td>prepared-statement-cache-size</td>
+<td></td></tr>
+
+<tr><td>share-prepared-statements</td>
+<td></td></tr>
+
+<tr><td>set-tx-query-timeout</td>
+<td></td></tr>
+
+<tr><td>query-timeout</td>
+<td></td></tr>
+
+<tr><td>use-try-lock</td>
+<td></td></tr>
+
+<tr><td>metadata</td>
+<td></td></tr>
+
+<tr><td>type-mapping</td>
+<td></td></tr>
+
+<tr><td>depends</td>
+<td></td></tr>
+
+</tbody>
+</table>
    </body>
 </html>
 

Added: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserConnectionUrl.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserConnectionUrl.xml	                        (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserConnectionUrl.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
+   <local-tx-datasource>
+      <jndi-name>DefaultDS</jndi-name>
+<!--      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url> -->
+     <driver-class>org.hsqldb.jdbcDriver</driver-class>
+   </local-tx-datasource>
+</datasources>


Property changes on: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserConnectionUrl.xml
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserDriverClass.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserDriverClass.xml	                        (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserDriverClass.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
+   <local-tx-datasource>
+      <jndi-name>DefaultDS</jndi-name>
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+<!--     <driver-class>org.hsqldb.jdbcDriver</driver-class> -->
+      <user-name>sa</user-name>
+   </local-tx-datasource>
+</datasources>


Property changes on: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserDriverClass.xml
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserJndiName.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserJndiName.xml	                        (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserJndiName.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
+   <local-tx-datasource>
+<!--      <jndi-name>DefaultDS</jndi-name> -->
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+     <driver-class>org.hsqldb.jdbcDriver</driver-class>
+   </local-tx-datasource>
+</datasources>


Property changes on: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50Negative_testParserJndiName.xml
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Deleted: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml	2009-02-10 09:27:05 UTC (rev 84043)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id:  $ -->
-
-<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
-                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
-   <local-tx-datasource>
-
-      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
-      <!-- Datasources are not available outside the virtual machine -->
-      <jndi-name>DefaultDS</jndi-name>
-
-      <!-- For in-process persistent db, saved when jboss stops.
-      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
-      -->
-      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
-
-      <!-- The driver class -->
-      <driver-class>org.hsqldb.jdbcDriver</driver-class>
-
-      <!-- The login and password -->
-      <user-name>sa</user-name>
-      <password></password>
-      
-      
-      <!-- Use the getConnection(user, pw) for logins
-        <application-managed-security/>
-      -->
-
-      <!-- Use the security domain defined in conf/login-config.xml -->
-      <security-domain>HsqlDbRealm</security-domain>
-
-      <!-- Use the security domain defined in conf/login-config.xml or the
-           getConnection(user, pw) for logins. The security domain takes precedence.
-        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
-      -->
-
-      <!--example of how to specify class that determines if exception means connection should be destroyed-->
-      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
-
-      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
-      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
-
-      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
-      <min-pool-size>5</min-pool-size>
-
-      <!-- The maximum connections in a pool/sub-pool -->
-      <max-pool-size>20</max-pool-size>
-
-      <!-- The time before an unused connection is destroyed -->
-      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
-      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
-      <idle-timeout-minutes>0</idle-timeout-minutes>
-
-      <!-- sql to call when connection is created
-        <new-connection-sql>some arbitrary sql</new-connection-sql>
-      -->
-
-      <!-- sql to call on an existing pooled connection when it is obtained from pool 
-         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-      -->
-
-      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
-         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
-      -->
-
-      <!-- Whether to check all statements are closed when the connection is returned to the pool,
-           this is a debugging feature that should be turned off in production -->
-      <track-statements/>
-
-      <!-- HSQL DB benefits from prepared statement caching -->
-      <prepared-statement-cache-size>32</prepared-statement-cache-size>
-
-      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)       -->
-      <metadata>
-         <type-mapping>Hypersonic SQL</type-mapping>
-      </metadata>
-      
-      <!-- 
-       When using in-process (standalone) mode 
-      <depends>jboss:service=Hypersonic,database=localDB</depends>
-       Uncomment when using hsqldb in server mode
-      <depends>jboss:service=Hypersonic</depends>
-      -->
-   </local-tx-datasource>
-
-</datasources>

Copied: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsBasic.xml (from rev 84021, projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml)
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsBasic.xml	                        (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsBasic.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id:  $ -->
+
+<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DefaultDS</jndi-name>
+
+      <!-- For in-process persistent db, saved when jboss stops.
+      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+      -->
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+      
+      
+      <!-- Use the getConnection(user, pw) for logins
+        <application-managed-security/>
+      -->
+
+      <!-- Use the security domain defined in conf/login-config.xml -->
+      <security-domain>HsqlDbRealm</security-domain>
+
+      <!-- Use the security domain defined in conf/login-config.xml or the
+           getConnection(user, pw) for logins. The security domain takes precedence.
+        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+      -->
+
+      <!--example of how to specify class that determines if exception means connection should be destroyed-->
+      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+
+      <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+
+      <!-- sql to call on an existing pooled connection when it is obtained from pool 
+         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+      -->
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)       -->
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+      
+      <!-- 
+       When using in-process (standalone) mode 
+      <depends>jboss:service=Hypersonic,database=localDB</depends>
+       Uncomment when using hsqldb in server mode
+      <depends>jboss:service=Hypersonic</depends>
+      -->
+   </local-tx-datasource>
+
+</datasources>

Copied: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsMinimal.xml (from rev 84021, projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testMinimal.xml)
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsMinimal.xml	                        (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testDsMinimal.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id:  $ -->
+
+<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
+   <local-tx-datasource>
+      <jndi-name>DefaultDS</jndi-name>
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+     <driver-class>org.hsqldb.jdbcDriver</driver-class>
+   </local-tx-datasource>
+</datasources>

Deleted: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testMinimal.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testMinimal.xml	2009-02-10 09:27:05 UTC (rev 84043)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testMinimal.xml	2009-02-10 09:37:52 UTC (rev 84044)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id:  $ -->
-
-<datasources xmlns="http://www.jboss.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
-                            http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd">
-   <local-tx-datasource>
-      <jndi-name>DefaultDS</jndi-name>
-      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
-     <driver-class>org.hsqldb.jdbcDriver</driver-class>
-   </local-tx-datasource>
-</datasources>




More information about the jboss-cvs-commits mailing list