[jboss-cvs] JBossAS SVN: r105716 - in branches/JBPAPP_5_1/testsuite: src/main/org/jboss/test/jbossts/ASCrashRecovery01 and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jun 4 07:56:56 EDT 2010
Author: istudens at redhat.com
Date: 2010-06-04 07:56:55 -0400 (Fri, 04 Jun 2010)
New Revision: 105716
Added:
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/JPACrashHelperRem.java
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-xa-ds.xml
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-xa-ds.xml
Removed:
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-1-xa-ds.xml
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-2-xa-ds.xml
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac1-xa-ds.xml
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac2-xa-ds.xml
Modified:
branches/JBPAPP_5_1/testsuite/imports/config/tests-crash-recovery.xml
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/ASCrashRecovery01/TestWithJPA.java
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/CrashHelper.java
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/jms/JMSCrashHelper.java
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/recovery/CommonCrashHelper.java
branches/JBPAPP_5_1/testsuite/src/resources/jbossts/scripts/as-tests.xml
Log:
fixed tests for Oracle 11g RAC with two XA data-sources, JBQA-2176
Modified: branches/JBPAPP_5_1/testsuite/imports/config/tests-crash-recovery.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/imports/config/tests-crash-recovery.xml 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/imports/config/tests-crash-recovery.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -48,7 +48,8 @@
| <security-domain>CrashRecoveryDomain0</security-domain>
| <recover-security-domain>CrashRecoveryDomain</recover-security-domain>
|
- | Note: If you want to force the wiping out any txs in doubt from DB before the test you can use the property -DwipeOutTxsInDoubtBeforeTest=true.
+ | Note 1: The 'jbossts.credentials' prop is useless in connection with -Djbossts.db=[oracle_rac|oracle_rac_r2].
+ | Note 2: If you want to force the wiping out any txs in doubt from DB before the test you can use the property -DwipeOutTxsInDoubtBeforeTest=true.
-->
<target name="tests-ts-crash-recovery" depends="tests-ts-crash-recovery-jpa"
description="Runs JBossTS crash recovery tests" />
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/ASCrashRecovery01/TestWithJPA.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/ASCrashRecovery01/TestWithJPA.java 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/ASCrashRecovery01/TestWithJPA.java 2010-06-04 11:56:55 UTC (rev 105716)
@@ -21,12 +21,12 @@
package org.jboss.test.jbossts.ASCrashRecovery01;
import org.jboss.test.jbossts.recovery.ASFailureSpec;
-import org.jboss.test.jbossts.recovery.CrashHelperRem;
import org.jboss.test.jbossts.recovery.RecoveredXid;
import org.jboss.test.jbossts.taskdefs.JUnitClientTest;
import org.jboss.test.jbossts.taskdefs.TransactionLog;
import org.jboss.test.jbossts.taskdefs.Utils;
import org.jboss.test.jbossts.crash.CrashHelper;
+import org.jboss.test.jbossts.crash.JPACrashHelperRem;
import org.jboss.test.jbossts.crash.CrashRem;
import org.jboss.test.jbossts.crash.TestEntity;
import org.jboss.test.jbossts.crash.TestEntityHelper;
@@ -73,6 +73,7 @@
private TransactionLog store;
private int existingUids;
private Set<RecoveredXid> existingXidsInDoubt;
+ private String recoveryDatasource = null;
private String serverName = "default";
@@ -124,6 +125,8 @@
wipeOutTxsInDoubtBeforeTest = val.equalsIgnoreCase("true");
else if ("wipeOutTxsInDoubtAfterTest".equals(key))
wipeOutTxsInDoubtAfterTest = val.equalsIgnoreCase("true");
+ else if ("recoveryDatasource".equals(key))
+ recoveryDatasource = val;
}
sb.insert(0, ":\n").insert(0, getName()).insert(0, "Executing test ");
@@ -162,7 +165,7 @@
if (wipeOutTxsInDoubtBeforeTest)
wipeOutTxsInDoubt();
- existingXidsInDoubt = lookupCrashHelper().checkXidsInDoubt();
+ existingXidsInDoubt = lookupCrashHelper().checkXidsInDoubt(recoveryDatasource);
if (existingXidsInDoubt.size() > 0)
print(existingXidsInDoubt.size() + " txs in doubt in database before test run");
@@ -184,7 +187,7 @@
print("checkDatabase result: " + dbChanged);
}
- Set<RecoveredXid> xidsInDoubtAfterTest = lookupCrashHelper().checkXidsInDoubt();
+ Set<RecoveredXid> xidsInDoubtAfterTest = lookupCrashHelper().checkXidsInDoubt(recoveryDatasource);
if (wipeOutTxsInDoubt || wipeOutTxsInDoubtAfterTest)
wipeOutTxsInDoubt(existingXidsInDoubt, xidsInDoubtAfterTest);
@@ -274,7 +277,7 @@
print("wiping out txs in doubt");
try
{
- lookupCrashHelper().wipeOutTxsInDoubt(xidsToRecover);
+ lookupCrashHelper().wipeOutTxsInDoubt(recoveryDatasource, xidsToRecover);
}
catch (Exception e)
{
@@ -321,9 +324,9 @@
return (CrashRem) config.getNamingContext(serverName).lookup(name);
}
- private CrashHelperRem lookupCrashHelper() throws Exception
+ private JPACrashHelperRem lookupCrashHelper() throws Exception
{
- return (CrashHelperRem) config.getNamingContext(serverName).lookup(CrashHelper.REMOTE_JNDI_NAME);
+ return (JPACrashHelperRem) config.getNamingContext(serverName).lookup(CrashHelper.REMOTE_JNDI_NAME);
}
private UserTransaction startTx() throws NamingException, SystemException, NotSupportedException
@@ -431,7 +434,7 @@
pendingUids = getPendingUids();
try
{
- xidsInDoubtAfterTest = lookupCrashHelper().checkXidsInDoubt();
+ xidsInDoubtAfterTest = lookupCrashHelper().checkXidsInDoubt(recoveryDatasource);
}
catch (Exception e)
{
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/CrashHelper.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/CrashHelper.java 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/CrashHelper.java 2010-06-04 11:56:55 UTC (rev 105716)
@@ -22,12 +22,15 @@
package org.jboss.test.jbossts.crash;
import java.sql.SQLException;
+import java.util.Set;
import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
import javax.transaction.xa.XAResource;
import org.jboss.test.jbossts.recovery.CommonCrashHelper;
-import org.jboss.test.jbossts.recovery.CrashHelperRem;
+import org.jboss.test.jbossts.recovery.RecoveredXid;
/**
@@ -37,30 +40,54 @@
* @version $Revision: 1.1 $
*/
@Stateless
-public class CrashHelper extends CommonCrashHelper implements CrashHelperRem
+public class CrashHelper extends CommonCrashHelper implements JPACrashHelperRem
{
public static final String REMOTE_JNDI_NAME = CrashHelper.class.getSimpleName() + "/remote";
/**
- * JNDI name of crash recovery datasource.
+ * Default JNDI name of recovery datasource.
*/
public static final String DS_JNDI_NAME = "CrashRecoveryDS";
public static final String DS_USER_NAME = "crashrec";
public static final String DS_PASSWORD = "crashrec";
+ private String datasourceName = DS_JNDI_NAME;
+
+ @Override
+ @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
+ public Set<RecoveredXid> checkXidsInDoubt(String datasourceName)
+ {
+ setDatasourceName(datasourceName);
+ return super.checkXidsInDoubt();
+ }
+
+ @Override
+ @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
+ public boolean wipeOutTxsInDoubt(String datasourceName, Set<RecoveredXid> xidsToRecover)
+ {
+ setDatasourceName(datasourceName);
+ return super.wipeOutTxsInDoubt(xidsToRecover);
+ }
+
+ private void setDatasourceName(String datasourceName)
+ {
+ if (datasourceName != null && datasourceName.length() > 0)
+ this.datasourceName = datasourceName;
+ }
+
/**
* Gets XAResource for a datasource with name ({@link #DS_JNDI_NAME}).
*/
@Override
- protected XAResource getNewXAResource()
+ protected XAResource getNewXAResource() throws Exception
{
XAResource xares = null;
try
{
AppServerJDBCXARecovery appServerRecovery = new AppServerJDBCXARecovery();
- if (appServerRecovery.initialise("jndiname=" + DS_JNDI_NAME))
+ if (appServerRecovery.initialise("jndiname=" + datasourceName))
{
if (appServerRecovery.hasMoreResources())
{
@@ -71,6 +98,7 @@
catch (SQLException e)
{
log.error("Cannot get any XAResource by AppServerJDBCXARecovery", e);
+ throw e;
}
return xares;
@@ -81,5 +109,5 @@
{
// Nothing to do here. Is it alright?
}
-
+
}
Added: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/JPACrashHelperRem.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/JPACrashHelperRem.java (rev 0)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/crash/JPACrashHelperRem.java 2010-06-04 11:56:55 UTC (rev 105716)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.jbossts.crash;
+
+import java.util.Set;
+
+import javax.ejb.Remote;
+
+import org.jboss.test.jbossts.recovery.RecoveredXid;
+
+ at Remote
+public interface JPACrashHelperRem
+{
+ public boolean wipeOutTxsInDoubt(String datasourceName, Set<RecoveredXid> xidsToRecover);
+ public Set<RecoveredXid> checkXidsInDoubt(String datasourceName);
+}
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/jms/JMSCrashHelper.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/jms/JMSCrashHelper.java 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/jms/JMSCrashHelper.java 2010-06-04 11:56:55 UTC (rev 105716)
@@ -47,7 +47,7 @@
private XAConnection xaConnection = null;
@Override
- protected XAResource getNewXAResource()
+ protected XAResource getNewXAResource() throws Exception
{
try
{
@@ -66,7 +66,7 @@
catch (Exception e)
{
log.warn("Cannot create new XA resource", e);
- throw new EJBException("Cannot create new XA resource: " + e.getMessage());
+ throw e;
}
}
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/recovery/CommonCrashHelper.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/recovery/CommonCrashHelper.java 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jbossts/recovery/CommonCrashHelper.java 2010-06-04 11:56:55 UTC (rev 105716)
@@ -118,6 +118,11 @@
log.error("Cannot finish recovering on xares", e);
}
}
+ catch (Exception e)
+ {
+ log.error("Cannot get a new XA resource", e);
+ throw new EJBException("Cannot get a new XA resource: " + e.getMessage());
+ }
finally
{
closeXAResource();
@@ -170,6 +175,11 @@
}
}
}
+ catch (Exception e)
+ {
+ log.error("Cannot get a new XA resource", e);
+ throw new EJBException("Cannot get a new XA resource: " + e.getMessage());
+ }
finally
{
closeXAResource();
@@ -190,7 +200,7 @@
}
- protected abstract XAResource getNewXAResource();
+ protected abstract XAResource getNewXAResource() throws Exception;
// Should not throw out any exception.
protected abstract void closeXAResource();
Deleted: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-1-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-1-xa-ds.xml 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-1-xa-ds.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- JBoss Server Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
-
-<!-- ===================================================================== -->
-<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
-<!-- ===================================================================== -->
-
-<datasources>
-
- <xa-datasource>
- <jndi-name>CrashRecoveryDS</jndi-name>
- <track-connection-by-tx>true</track-connection-by-tx>
- <isSameRM-override-value>false</isSameRM-override-value>
- <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg27-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
- <xa-datasource-property name="User">crashrec0</xa-datasource-property>
- <xa-datasource-property name="Password">crashrec0</xa-datasource-property>
- <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
- <!-- Checks the Oracle error codes and messages for fatal errors -->
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
- <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
- <no-tx-separate-pools/>
-
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
- <metadata>
- <type-mapping>Oracle9i</type-mapping>
- </metadata>
- </xa-datasource>
-
-</datasources>
Deleted: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-2-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-2-xa-ds.xml 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-2-xa-ds.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- JBoss Server Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
-
-<!-- ===================================================================== -->
-<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
-<!-- ===================================================================== -->
-
-<datasources>
-
- <xa-datasource>
- <jndi-name>RecoveryDS</jndi-name>
- <track-connection-by-tx>true</track-connection-by-tx>
- <isSameRM-override-value>false</isSameRM-override-value>
- <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg28-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
- <xa-datasource-property name="User">crashrec</xa-datasource-property>
- <xa-datasource-property name="Password">crashrec</xa-datasource-property>
- <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
- <!-- Checks the Oracle error codes and messages for fatal errors -->
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
- <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
- <no-tx-separate-pools/>
-
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
- <metadata>
- <type-mapping>Oracle9i</type-mapping>
- </metadata>
- </xa-datasource>
-
-</datasources>
Copied: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-xa-ds.xml (from rev 105621, branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-1-xa-ds.xml)
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-xa-ds.xml (rev 0)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-r2-xa-ds.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- JBoss Server Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
+<!-- ===================================================================== -->
+
+<datasources>
+
+ <xa-datasource>
+ <jndi-name>CrashRecoveryDS</jndi-name>
+ <track-connection-by-tx>true</track-connection-by-tx>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+ <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg27-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+ <xa-datasource-property name="User">crashrec0</xa-datasource-property>
+ <xa-datasource-property name="Password">crashrec0</xa-datasource-property>
+ <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
+ <!-- Checks the Oracle error codes and messages for fatal errors -->
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+ <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+ <no-tx-separate-pools/>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Oracle9i</type-mapping>
+ </metadata>
+ </xa-datasource>
+
+ <xa-datasource>
+ <jndi-name>RecoveryDS</jndi-name>
+ <track-connection-by-tx>true</track-connection-by-tx>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+ <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg28-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+ <xa-datasource-property name="User">crashrec</xa-datasource-property>
+ <xa-datasource-property name="Password">crashrec</xa-datasource-property>
+ <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
+ <!-- Checks the Oracle error codes and messages for fatal errors -->
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+ <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+ <no-tx-separate-pools/>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Oracle9i</type-mapping>
+ </metadata>
+ </xa-datasource>
+
+</datasources>
Copied: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-xa-ds.xml (from rev 105621, branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac1-xa-ds.xml)
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-xa-ds.xml (rev 0)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac-xa-ds.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- JBoss Server Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
+<!-- ===================================================================== -->
+
+<datasources>
+
+ <xa-datasource>
+ <jndi-name>CrashRecoveryDS</jndi-name>
+ <track-connection-by-tx>true</track-connection-by-tx>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+ <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg24-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+ <xa-datasource-property name="User">crashrec0</xa-datasource-property>
+ <xa-datasource-property name="Password">crashrec0</xa-datasource-property>
+ <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
+ <!-- Checks the Oracle error codes and messages for fatal errors -->
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+ <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+ <no-tx-separate-pools/>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Oracle9i</type-mapping>
+ </metadata>
+ </xa-datasource>
+
+ <xa-datasource>
+ <jndi-name>RecoveryDS</jndi-name>
+ <track-connection-by-tx>true</track-connection-by-tx>
+ <isSameRM-override-value>false</isSameRM-override-value>
+ <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+ <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg25-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+ <xa-datasource-property name="User">crashrec</xa-datasource-property>
+ <xa-datasource-property name="Password">crashrec</xa-datasource-property>
+ <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
+ <!-- Checks the Oracle error codes and messages for fatal errors -->
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+ <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+ <no-tx-separate-pools/>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Oracle9i</type-mapping>
+ </metadata>
+ </xa-datasource>
+
+</datasources>
Deleted: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac1-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac1-xa-ds.xml 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac1-xa-ds.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- JBoss Server Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
-
-<!-- ===================================================================== -->
-<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
-<!-- ===================================================================== -->
-
-<datasources>
-
- <xa-datasource>
- <jndi-name>CrashRecoveryDS</jndi-name>
- <track-connection-by-tx>true</track-connection-by-tx>
- <isSameRM-override-value>false</isSameRM-override-value>
- <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg24-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
- <xa-datasource-property name="User">crashrec0</xa-datasource-property>
- <xa-datasource-property name="Password">crashrec0</xa-datasource-property>
- <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
- <!-- Checks the Oracle error codes and messages for fatal errors -->
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
- <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
- <no-tx-separate-pools/>
-
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
- <metadata>
- <type-mapping>Oracle9i</type-mapping>
- </metadata>
- </xa-datasource>
-
-</datasources>
Deleted: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac2-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac2-xa-ds.xml 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/resources/oracle-rac2-xa-ds.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- JBoss Server Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
-
-<!-- ===================================================================== -->
-<!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
-<!-- ===================================================================== -->
-
-<datasources>
-
- <xa-datasource>
- <jndi-name>RecoveryDS</jndi-name>
- <track-connection-by-tx>true</track-connection-by-tx>
- <isSameRM-override-value>false</isSameRM-override-value>
- <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg25-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
- <xa-datasource-property name="User">crashrec</xa-datasource-property>
- <xa-datasource-property name="Password">crashrec</xa-datasource-property>
- <!-- 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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
- <!-- Checks the Oracle error codes and messages for fatal errors -->
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
- <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
- <no-tx-separate-pools/>
-
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
- <metadata>
- <type-mapping>Oracle9i</type-mapping>
- </metadata>
- </xa-datasource>
-
-</datasources>
Modified: branches/JBPAPP_5_1/testsuite/src/resources/jbossts/scripts/as-tests.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jbossts/scripts/as-tests.xml 2010-06-04 11:39:05 UTC (rev 105715)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jbossts/scripts/as-tests.xml 2010-06-04 11:56:55 UTC (rev 105716)
@@ -270,8 +270,9 @@
<target name="call-tests-for-oracle_rac" if="want.oracle_rac">
<antcall target="${call.target}">
<param name="dbdriver" value="${driver.name.oracle_11_rac}"/>
- <param name="datasource" value="oracle-rac1-xa-ds.xml" />
+ <param name="datasource" value="oracle-rac-xa-ds.xml" />
<param name="dbname" value="oracle_rac" />
+ <param name="recovery.datasource" value="RecoveryDS" />
</antcall>
</target>
@@ -286,8 +287,9 @@
<target name="call-tests-for-oracle_rac_r2" if="want.oracle_rac_r2">
<antcall target="${call.target}">
<param name="dbdriver" value="${driver.name.oracle_11_rac}"/>
- <param name="datasource" value="oracle-rac-r2-1-xa-ds.xml" />
+ <param name="datasource" value="oracle-rac-r2-xa-ds.xml" />
<param name="dbname" value="oracle_rac_r2" />
+ <param name="recovery.datasource" value="RecoveryDS" />
</antcall>
</target>
@@ -453,6 +455,8 @@
</condition>
<property name="storeType" value="StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction" />
+ <property name="recovery.datasource" value="CrashRecoveryDS" />
+
<deploy-datasource-and-set-credentials from="${product.dir}/resources/${datasource}" to="${jboss.home}/server/crashrecovery-${tstype}/deploy/${datasource}" />
<astest:server method="start" serverName="crashrecovery-${tstype}" >
<deploy from="dbdrivers/${dbdriver}" to="lib/${dbdriver}" />
@@ -472,6 +476,7 @@
<param key="debug" value="true" />
<param key="reportFile" value="${build.reports}/TEST-org.jboss.test.jbossts.ASCrashRecovery01.TestWithJPA-${dbname}-${testname}.xml" />
<param key="testTime" value="${testTime}" />
+ <param key="recoveryDatasource" value="${recovery.datasource}" />
</astest:action>
<astest:server method="stop" serverName="crashrecovery-${tstype}" >
<undeploy from="deploy/${astest.app.jar.name}" />
@@ -590,9 +595,9 @@
</sequential>
</macrodef>
- <target name="hack-before-astest-run" depends="hack-before-astest-run-for-db2_9.7, hack-before-astest-run-for-oracle_rac, hack-before-astest-run-for-oracle_rac_r2" />
+ <target name="hack-before-astest-run" depends="hack-before-astest-run-for-db2_9.7" />
- <target name="hack-after-astest-run" depends="hack-after-astest-run-for-db2_9.7, hack-after-astest-run-for-oracle_rac, hack-after-astest-run-for-oracle_rac_r2" />
+ <target name="hack-after-astest-run" depends="hack-after-astest-run-for-db2_9.7" />
<target name="hack-before-astest-run-for-db2_9.7" if="want.db2_9.7">
<!-- prepare hacked astest jar -->
@@ -623,34 +628,8 @@
</target>
<target name="hack-after-astest-run-for-db2_9.7" if="want.db2_9.7">
+ <!-- nothing to do here -->
</target>
-
-
- <target name="hack-before-astest-run-for-oracle_rac" if="want.oracle_rac">
- <antcall target="hack-before-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac2-xa-ds.xml"/></antcall>
- </target>
-
- <target name="hack-after-astest-run-for-oracle_rac" if="want.oracle_rac">
- <antcall target="hack-after-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac2-xa-ds.xml"/></antcall>
- </target>
-
- <target name="hack-before-astest-run-for-oracle_rac_r2" if="want.oracle_rac_r2">
- <antcall target="hack-before-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac-r2-2-xa-ds.xml"/></antcall>
- </target>
-
- <target name="hack-after-astest-run-for-oracle_rac_r2" if="want.oracle_rac_r2">
- <antcall target="hack-after-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac-r2-2-xa-ds.xml"/></antcall>
- </target>
-
- <target name="hack-before-astest-run-for-oracle_racs">
- <!-- deploy the second DS configuration -->
- <deploy-datasource-and-set-credentials from="${product.dir}/resources/${oracle_rac_second_ds}" to="${jboss.home}/server/crashrecovery-${tstype}/deploy/${oracle_rac_second_ds}" />
- </target>
-
- <target name="hack-after-astest-run-for-oracle_racs">
- <!-- undeploy the second DS configuration -->
- <delete file="${jboss.home}/server/crashrecovery-${tstype}/deploy/${oracle_rac_second_ds}" />
- </target>
<!--
@@ -774,11 +753,13 @@
dest="${driver.home}/${driver.name.oracle_11_rac}"/>
</target>
<target name="get.driver.mssql_2005" unless="have.dbdriver.mssql_2005" if="want.mssql_2005">
- <get src="${driver.url}/mssql2005/jdbc3/sqljdbc.jar"
+ <!--get src="${driver.url}/mssql2005/jdbc4/sqljdbc4.jar"-->
+ <get src="http://reports.qa.atl.jboss.com/jdbc-drivers/maven2/com/microsoft/sqlserver/msjdbc/2.0.1008.2/msjdbc-2.0.1008.2-4.jar"
dest="${driver.home}/${driver.name.mssql_2005}"/>
</target>
<target name="get.driver.mssql_2008" unless="have.dbdriver.mssql_2008" if="want.mssql_2008">
- <get src="${driver.url}/mssql2008/jdbc4/sqljdbc4.jar"
+ <!--get src="${driver.url}/mssql2008/jdbc4/sqljdbc4.jar"-->
+ <get src="http://reports.qa.atl.jboss.com/jdbc-drivers/maven2/com/microsoft/sqlserver/msjdbc/2.0.1008.2/msjdbc-2.0.1008.2-4.jar"
dest="${driver.home}/${driver.name.mssql_2008}"/>
</target>
<target name="get.driver.psql_8.4" unless="have.dbdriver.psql_8.4" if="want.psql_8.4">
More information about the jboss-cvs-commits
mailing list