Author: fjuma
Date: 2009-03-10 15:09:32 -0400 (Tue, 10 Mar 2009)
New Revision: 199
Added:
trunk/jsfunit/testdata/datasources/expectedFiles/
trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
trunk/jsfunit/testdata/datasources/testFiles/
trunk/jsfunit/testdata/datasources/testFiles/DeleteLocalTXExistingFile-ds.xml
trunk/jsfunit/testdata/datasources/testFiles/DeleteNoTXExistingFile-ds.xml
trunk/jsfunit/testdata/datasources/testFiles/DeleteXAExistingFile-ds.xml
trunk/jsfunit/testdata/datasources/testFiles/MultipleDatasources-ds.xml
Removed:
trunk/jsfunit/testdata/datasources/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
trunk/jsfunit/testdata/datasources/MultipleDatasources-ds.xml
Modified:
trunk/jsfunit/pom.xml
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java
Log:
Adding datasource deletion tests that use an existing -ds.xml file.
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-03-10 15:41:53 UTC (rev 198)
+++ trunk/jsfunit/pom.xml 2009-03-10 19:09:32 UTC (rev 199)
@@ -307,17 +307,18 @@
<file>${basedir}/testdata/jboss-configuration/conf/props/jmx-console-users.properties</file>
<tofile>conf/props/jmx-console-users.properties</tofile>
</configfile>
- <!-- Datasources -->
- <configfile>
-
<file>${basedir}/testdata/datasources/MultipleDatasources-ds.xml</file>
-
<toFile>deploy/MultipleDatasources-ds.xml</toFile>
- </configfile>
</configfiles>
+
+ <!-- Deploy the test files -->
<files>
<copy>
<file>${basedir}/testdata/destinations</file>
<toDir>deploy</toDir>
</copy>
+ <copy>
+
<file>${basedir}/testdata/datasources/testFiles</file>
+ <toDir>deploy</toDir>
+ </copy>
</files>
</configuration>
<!-- /Container configuration -->
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-03-10
15:41:53 UTC (rev 198)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-03-10
19:09:32 UTC (rev 199)
@@ -589,6 +589,35 @@
*/
protected abstract boolean isMBeanStateDeployedImpl( ObjectName deploymentMBean )
throws JMException, IOException;
+ /**
+ * Parse the -ds.xml file given by jndiName. Return a mapping of property
+ * names to property values.
+ */
+ public Map<String, String> getPropertyValuesMap(String jndiName,
+ DatasourceType datasourceType) throws
Exception {
+ File file = new File(this.getDatasourceConfigFile(jndiName));
+
+ Map<String, String> actualValuesMap = new HashMap<String, String>();
+
+ SAXBuilder builder = new SAXBuilder();
+ Document doc = builder.build(file);
+
+ Element root = doc.getRootElement();
+ assertTrue(root.getName().equals("datasources"));
+
+ // Get the datasource element
+ Element datasource = root.getChild(datasourceType.getXmlElementName());
+
+ // Create actualValuesMap by mapping property names to
+ // property values
+ Iterator itr = (datasource.getChildren()).iterator();
+ while(itr.hasNext()) {
+ Element property = (Element)itr.next();
+ actualValuesMap.put(property.getName(), property.getValue());
+ }
+
+ return actualValuesMap;
+ }
/*
* CREATION TESTS
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java 2009-03-10
15:41:53 UTC (rev 198)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java 2009-03-10
19:09:32 UTC (rev 199)
@@ -268,6 +268,55 @@
}
/**
+ * Remove a Local TX Datasource. Use an existing -ds.xml file.
+ */
+ public void testDeleteLocalTXDatasourceUsingExistingDSFile() throws Exception {
+
+ // Use an existing -ds.xml file
+ Map<String, String> propertiesMap =
getPropertyValuesMap("DeleteLocalTXExistingFile",
+
DatasourceType.LOCAL_TX_DATASOURCE);
+
+ String expectedMessage = "Successfully deleted Local TX Datasource
'"
+ + propertiesMap.get("jndi-name") +
"'";
+
+ deleteDS(expectedMessage, propertiesMap,
+ LOCAL_TX_COMPONENT_TYPE, DatasourceType.LOCAL_TX_DATASOURCE);
+ }
+
+ /**
+ * Remove a No TX Datasource. Use an existing -ds.xml file.
+ */
+ public void testDeleteNoTXDatasourceUsingExistingDSFile() throws Exception {
+
+ // Use an existing -ds.xml file
+ Map<String, String> propertiesMap =
getPropertyValuesMap("DeleteNoTXExistingFile",
+
DatasourceType.NO_TX_DATASOURCE);
+
+ String expectedMessage = "Successfully deleted No TX Datasource '"
+ + propertiesMap.get("jndi-name") +
"'";
+
+ deleteDS(expectedMessage, propertiesMap, NO_TX_COMPONENT_TYPE,
+ DatasourceType.NO_TX_DATASOURCE);
+ }
+
+ /**
+ * Remove an XA Datasource. Use an existing -ds.xml file.
+ */
+ public void testDeleteXADatasourceUsingExistingDSFile() throws Exception {
+
+ // Use an existing -ds.xml file
+ Map<String, String> propertiesMap =
getPropertyValuesMap("DeleteXAExistingFile",
+
DatasourceType.XA_DATASOURCE);
+
+ // Check for the appropriate success messages
+ String expectedMessage = "Successfully deleted XA Datasource '"
+ + propertiesMap.get("jndi-name") +
"'";
+
+ deleteDS(expectedMessage, propertiesMap, XA_COMPONENT_TYPE,
+ DatasourceType.XA_DATASOURCE);
+ }
+
+ /**
* Common code for the testDelete* tests.
*/
private void deleteDS(String expectedMessage, Map<String, String>
propertiesMap,
@@ -296,25 +345,26 @@
* -ds.xml file does not get deleted. (See JBAS-6227.)
*/
public void testDeleteDatasourceComplexDSDotXmlFile() throws Exception {
-
+ String jndiName = "NoTXDeletionTest";
+
// MultipleDatasources-ds.xml contains two Local TX Datasources and
- // a No TX Datasource. We will delete the No TX Datasource (NoTX-ds.xml).
- deleteDatasource("NoTX");
+ // a No TX Datasource. We will delete the No TX Datasource
(NoTXDeletionTest-ds.xml).
+ deleteDatasource(jndiName);
// Check for the appropriate success messages
- String expectedMessage = "Successfully deleted No TX Datasource
'NoTX'";
+ String expectedMessage = "Successfully deleted No TX Datasource '"
+ jndiName + "'";
checkClientAndServerMessages(expectedMessage, expectedMessage, false);
// Make sure the ManagedComponent was removed
assertNull("The datasource was not removed after deletion (the
ManagedComponent is non-null)",
- getManagedComponent("NoTX", NO_TX_COMPONENT_TYPE));
+ getManagedComponent(jndiName, NO_TX_COMPONENT_TYPE));
// Make sure only the No TX Datasource entry was removed
// from the -ds.xml file
String actualDSFile = System.getProperty("jsfunit.deploy.dir")
+ "/MultipleDatasources-ds.xml";
String expectedDSFile = System.getProperty("jsfunit.testdata")
- +
"/datasources/ExpectedMultipleDatasourcesAfterDeletion-ds.xml";
+ +
"/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml";
compareFiles(actualDSFile, expectedDSFile);
}
@@ -556,7 +606,7 @@
// Clean up
deleteDatasource(propertiesMap.get("jndi-name"));
}
-
+
/**
* Test the "List Formatted Sub Pool Statistics" operation after multiple
* connections to a database have been established.
@@ -607,7 +657,7 @@
closeConnections(connections);
deleteDatasource(propertiesMap.get("jndi-name"));
}
-
+
/**
* Test the "List Formatted Sub Pool Statistics" operation after
* closing some connections.
Deleted:
trunk/jsfunit/testdata/datasources/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
===================================================================
---
trunk/jsfunit/testdata/datasources/ExpectedMultipleDatasourcesAfterDeletion-ds.xml 2009-03-10
15:41:53 UTC (rev 198)
+++
trunk/jsfunit/testdata/datasources/ExpectedMultipleDatasourcesAfterDeletion-ds.xml 2009-03-10
19:09:32 UTC (rev 199)
@@ -1,40 +0,0 @@
-<datasources>
- <local-tx-datasource>
- <jndi-name>LocalTX1</jndi-name>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- <min-pool-size>5</min-pool-size>
- <max-pool-size>20</max-pool-size>
- <idle-timeout-minutes>10</idle-timeout-minutes>
- <track-statements/>
- <security-domain>HsqlDbRealm</security-domain>
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
- <metadata>
- <type-mapping>FirstSQL/J</type-mapping>
- </metadata>
- </local-tx-datasource>
- <local-tx-datasource>
- <jndi-name>LocalTX2</jndi-name>
- <use-java-context>false</use-java-context>
- <min-pool-size>5</min-pool-size>
- <max-pool-size>10</max-pool-size>
- <idle-timeout-minutes>15</idle-timeout-minutes>
- <background-validation>false</background-validation>
- <background-validation-millis>10000</background-validation-millis>
- <validate-on-match>false</validate-on-match>
- <metadata>
- <type-mapping>FirstSQL/J</type-mapping>
- </metadata>
- <user-name>sa</user-name>
- <password></password>
- <prepared-statement-cache-size>10</prepared-statement-cache-size>
- <share-prepared-statements>false</share-prepared-statements>
- <set-tx-query-timeout>false</set-tx-query-timeout>
- <query-timeout>36000</query-timeout>
- <use-try-lock>60000</use-try-lock>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- </local-tx-datasource>
-</datasources>
Deleted: trunk/jsfunit/testdata/datasources/MultipleDatasources-ds.xml
===================================================================
--- trunk/jsfunit/testdata/datasources/MultipleDatasources-ds.xml 2009-03-10 15:41:53 UTC
(rev 198)
+++ trunk/jsfunit/testdata/datasources/MultipleDatasources-ds.xml 2009-03-10 19:09:32 UTC
(rev 199)
@@ -1,56 +0,0 @@
-<datasources>
- <local-tx-datasource>
- <jndi-name>LocalTX1</jndi-name>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- <min-pool-size>5</min-pool-size>
- <max-pool-size>20</max-pool-size>
- <idle-timeout-minutes>10</idle-timeout-minutes>
- <track-statements/>
- <security-domain>HsqlDbRealm</security-domain>
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
- <metadata>
- <type-mapping>FirstSQL/J</type-mapping>
- </metadata>
- </local-tx-datasource>
- <no-tx-datasource>
- <jndi-name>NoTX</jndi-name>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- <min-pool-size>10</min-pool-size>
- <max-pool-size>30</max-pool-size>
- <idle-timeout-minutes>5</idle-timeout-minutes>
- <track-statements/>
- <security-domain>HsqlDbRealm</security-domain>
- <prepared-statement-cache-size>20</prepared-statement-cache-size>
- <metadata>
- <type-mapping>FirstSQL/J</type-mapping>
- </metadata>
- </no-tx-datasource>
- <local-tx-datasource>
- <jndi-name>LocalTX2</jndi-name>
- <use-java-context>false</use-java-context>
- <min-pool-size>5</min-pool-size>
- <max-pool-size>10</max-pool-size>
- <idle-timeout-minutes>15</idle-timeout-minutes>
- <background-validation>false</background-validation>
- <background-validation-millis>10000</background-validation-millis>
- <validate-on-match>false</validate-on-match>
- <metadata>
- <type-mapping>FirstSQL/J</type-mapping>
- </metadata>
- <user-name>sa</user-name>
- <password></password>
- <prepared-statement-cache-size>10</prepared-statement-cache-size>
- <share-prepared-statements>false</share-prepared-statements>
- <set-tx-query-timeout>false</set-tx-query-timeout>
- <query-timeout>36000</query-timeout>
- <use-try-lock>60000</use-try-lock>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- </local-tx-datasource>
-</datasources>
Added:
trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
===================================================================
---
trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
(rev 0)
+++
trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml 2009-03-10
19:09:32 UTC (rev 199)
@@ -0,0 +1,66 @@
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>LocalTX1</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>35000</blocking-timeout-millis>
+ <idle-timeout-minutes>20</idle-timeout-minutes>
+ <prefill>false</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <local-transaction/>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </local-tx-datasource>
+ <local-tx-datasource>
+ <jndi-name>LocalTX2</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>35000</blocking-timeout-millis>
+ <idle-timeout-minutes>20</idle-timeout-minutes>
+ <prefill>false</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <local-transaction/>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </local-tx-datasource>
+</datasources>
Added: trunk/jsfunit/testdata/datasources/testFiles/DeleteLocalTXExistingFile-ds.xml
===================================================================
--- trunk/jsfunit/testdata/datasources/testFiles/DeleteLocalTXExistingFile-ds.xml
(rev 0)
+++
trunk/jsfunit/testdata/datasources/testFiles/DeleteLocalTXExistingFile-ds.xml 2009-03-10
19:09:32 UTC (rev 199)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>DeleteLocalTXExistingFile</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>35000</blocking-timeout-millis>
+ <idle-timeout-minutes>20</idle-timeout-minutes>
+ <prefill>false</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <local-transaction/>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </local-tx-datasource>
+</datasources>
Added: trunk/jsfunit/testdata/datasources/testFiles/DeleteNoTXExistingFile-ds.xml
===================================================================
--- trunk/jsfunit/testdata/datasources/testFiles/DeleteNoTXExistingFile-ds.xml
(rev 0)
+++ trunk/jsfunit/testdata/datasources/testFiles/DeleteNoTXExistingFile-ds.xml 2009-03-10
19:09:32 UTC (rev 199)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<datasources>
+ <no-tx-datasource>
+ <jndi-name>DeleteNoTXExistingFile</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>55000</blocking-timeout-millis>
+ <idle-timeout-minutes>60</idle-timeout-minutes>
+ <prefill>true</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <interleaving/>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </no-tx-datasource>
+</datasources>
Added: trunk/jsfunit/testdata/datasources/testFiles/DeleteXAExistingFile-ds.xml
===================================================================
--- trunk/jsfunit/testdata/datasources/testFiles/DeleteXAExistingFile-ds.xml
(rev 0)
+++ trunk/jsfunit/testdata/datasources/testFiles/DeleteXAExistingFile-ds.xml 2009-03-10
19:09:32 UTC (rev 199)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<datasources>
+ <xa-datasource>
+ <jndi-name>DeleteXAExistingFile</jndi-name>
+ <rar-name>jboss-xa-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>15</min-pool-size>
+ <max-pool-size>6</max-pool-size>
+ <blocking-timeout-millis>30000</blocking-timeout-millis>
+ <idle-timeout-minutes>15</idle-timeout-minutes>
+ <prefill>false</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <user-name>testUser</user-name>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
+ <xa-resource-timeout>36000</xa-resource-timeout>
+ </xa-datasource>
+</datasources>
Added: trunk/jsfunit/testdata/datasources/testFiles/MultipleDatasources-ds.xml
===================================================================
--- trunk/jsfunit/testdata/datasources/testFiles/MultipleDatasources-ds.xml
(rev 0)
+++ trunk/jsfunit/testdata/datasources/testFiles/MultipleDatasources-ds.xml 2009-03-10
19:09:32 UTC (rev 199)
@@ -0,0 +1,98 @@
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>LocalTX1</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>35000</blocking-timeout-millis>
+ <idle-timeout-minutes>20</idle-timeout-minutes>
+ <prefill>false</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <local-transaction/>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </local-tx-datasource>
+ <no-tx-datasource>
+ <jndi-name>NoTXDeletionTest</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>55000</blocking-timeout-millis>
+ <idle-timeout-minutes>60</idle-timeout-minutes>
+ <prefill>true</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <interleaving/>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </no-tx-datasource>
+ <local-tx-datasource>
+ <jndi-name>LocalTX2</jndi-name>
+ <rar-name>jboss-local-jdbc.rar</rar-name>
+ <use-java-context>true</use-java-context>
+ <connection-definition>javax.sql.DataSource</connection-definition>
+ <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <blocking-timeout-millis>35000</blocking-timeout-millis>
+ <idle-timeout-minutes>20</idle-timeout-minutes>
+ <prefill>false</prefill>
+ <background-validation>false</background-validation>
+ <background-validation-millis>0</background-validation-millis>
+ <validate-on-match>true</validate-on-match>
+
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <allocation-retry>0</allocation-retry>
+ <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+ <metadata>
+ <type-mapping>FirstSQL/J</type-mapping>
+ </metadata>
+ <local-transaction/>
+ <user-name>sa</user-name>
+ <password></password>
+ <prepared-statement-cache-size>0</prepared-statement-cache-size>
+ <share-prepared-statements>false</share-prepared-statements>
+ <set-tx-query-timeout>false</set-tx-query-timeout>
+ <query-timeout>0</query-timeout>
+ <use-try-lock>60000</use-try-lock>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ </local-tx-datasource>
+</datasources>