[jboss-cvs] JBoss Messaging SVN: r6069 - in trunk: tests/src/org/jboss/messaging/tests/integration/jms/bridge and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 12 09:57:25 EDT 2009
Author: jmesnil
Date: 2009-03-12 09:57:24 -0400 (Thu, 12 Mar 2009)
New Revision: 6069
Modified:
trunk/src/main/org/jboss/messaging/jms/bridge/impl/BridgeImpl.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeReconnectionTest.java
Log:
bridge tests cleanup
* uncommented tests using XA
* in BridgeImpl.cleanUp(), delist the XA resources and rollback the tx *before* closing the connections so that the XA command Packets can be sent to the source & target servers (provided they're up & running)
Modified: trunk/src/main/org/jboss/messaging/jms/bridge/impl/BridgeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/bridge/impl/BridgeImpl.java 2009-03-11 23:06:16 UTC (rev 6068)
+++ trunk/src/main/org/jboss/messaging/jms/bridge/impl/BridgeImpl.java 2009-03-12 13:57:24 UTC (rev 6069)
@@ -1001,29 +1001,6 @@
private void cleanup()
{
-
- //Close the old objects
- try
- {
- sourceConn.close();
- }
- catch (Throwable ignore)
- {
- if (trace) { log.trace("Failed to close source connection", ignore); }
- }
- try
- {
- if (targetConn != null)
- {
- targetConn.close();
- }
- }
- catch (Throwable ignore)
- {
- if (trace) { log.trace("Failed to close target connection", ignore); }
- }
-
-
if (tx != null)
{
try
@@ -1043,7 +1020,28 @@
{
if (trace) { log.trace("Failed to rollback", ignore); }
}
- }
+ }
+
+ //Close the old objects
+ try
+ {
+ sourceConn.close();
+ }
+ catch (Throwable ignore)
+ {
+ if (trace) { log.trace("Failed to close source connection", ignore); }
+ }
+ try
+ {
+ if (targetConn != null)
+ {
+ targetConn.close();
+ }
+ }
+ catch (Throwable ignore)
+ {
+ if (trace) { log.trace("Failed to close target connection", ignore); }
+ }
}
private void pause(long interval)
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeReconnectionTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeReconnectionTest.java 2009-03-11 23:06:16 UTC (rev 6068)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeReconnectionTest.java 2009-03-12 13:57:24 UTC (rev 6069)
@@ -43,12 +43,12 @@
// Once and only once
- public void _testCrashAndReconnectDestBasic_OnceAndOnlyOnce_P() throws Exception
+ public void testCrashAndReconnectDestBasic_OnceAndOnlyOnce_P() throws Exception
{
testCrashAndReconnectDestBasic(QualityOfServiceMode.ONCE_AND_ONLY_ONCE, true);
}
- public void _testCrashAndReconnectDestBasic_OnceAndOnlyOnce_NP() throws Exception
+ public void testCrashAndReconnectDestBasic_OnceAndOnlyOnce_NP() throws Exception
{
testCrashAndReconnectDestBasic(QualityOfServiceMode.ONCE_AND_ONLY_ONCE, false);
}
@@ -79,12 +79,12 @@
// Crash tests specific to XA transactions
- public void _testCrashAndReconnectDestCrashBeforePrepare_P() throws Exception
+ public void testCrashAndReconnectDestCrashBeforePrepare_P() throws Exception
{
testCrashAndReconnectDestCrashBeforePrepare(true);
}
- public void _testCrashAndReconnectDestCrashBeforePrepare_NP() throws Exception
+ public void testCrashAndReconnectDestCrashBeforePrepare_NP() throws Exception
{
testCrashAndReconnectDestCrashBeforePrepare(false);
}
More information about the jboss-cvs-commits
mailing list