use of com.arjuna.wst.UnknownTransactionException in project narayana by jbosstm.
the class MultiParticipantParticipantCompletionParticipantCloseTest method run.
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// ignore
}
String serviceURL1;
serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
if (serviceURL1 == null) {
serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
}
addDefaultBinding("service1", serviceURL1);
UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
try {
ba.begin();
} catch (WrongStateException e) {
exception = e;
} catch (SystemException e) {
exception = e;
}
if (exception != null) {
error("txbegin failure " + exception);
return;
}
List<String> resultsList;
String participantId;
List<String> commands = new ArrayList<String>();
List<String> results = new ArrayList<String>();
commands.add("block");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P1");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P2");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P3");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("completed");
commands.add("{P1}");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("completed");
commands.add("{P2}");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("completed");
commands.add("{P3}");
commands.add("endblock");
try {
processCommands(commands, results);
} catch (Exception e) {
exception = e;
}
if (exception != null) {
error("test failure " + exception);
return;
}
try {
ba.close();
} catch (TransactionRolledBackException e) {
exception = e;
} catch (UnknownTransactionException e) {
exception = e;
} catch (SystemException e) {
exception = e;
} catch (WrongStateException e) {
exception = e;
}
if (exception != null) {
error("commit failure " + exception);
}
message("completed");
isSuccessful = (exception == null);
}
use of com.arjuna.wst.UnknownTransactionException in project narayana by jbosstm.
the class MultiServiceCoordinatorCompletionParticipantCloseTest method run.
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// ignore
}
String serviceURL1;
String serviceURL2;
String serviceURL3;
serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
if (serviceURL1 == null) {
serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
}
if (serviceURL2 == null) {
serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
}
if (serviceURL3 == null) {
serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
}
addDefaultBinding("service1", serviceURL1);
addDefaultBinding("service2", serviceURL2);
addDefaultBinding("service3", serviceURL3);
UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
try {
ba.begin();
} catch (WrongStateException e) {
exception = e;
} catch (SystemException e) {
exception = e;
}
if (exception != null) {
error("txbegin failure " + exception);
return;
}
List<String> resultsList;
String participantId;
List<String> commands = new ArrayList<String>();
List<String> results = new ArrayList<String>();
commands.add("block");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistCoordinatorCompletion");
commands.add("complete");
commands.add("close");
commands.add("next");
commands.add("serve");
commands.add("{service2}");
commands.add("enlistCoordinatorCompletion");
commands.add("complete");
commands.add("close");
commands.add("next");
commands.add("serve");
commands.add("{service3}");
commands.add("enlistCoordinatorCompletion");
commands.add("complete");
commands.add("close");
commands.add("endblock");
try {
processCommands(commands, results);
} catch (Exception e) {
exception = e;
}
if (exception != null) {
error("test failure " + exception);
return;
}
try {
ba.close();
} catch (TransactionRolledBackException e) {
exception = e;
} catch (UnknownTransactionException e) {
exception = e;
} catch (SystemException e) {
exception = e;
} catch (WrongStateException e) {
exception = e;
}
if (exception != null) {
error("commit failure " + exception);
}
error("completed");
isSuccessful = (exception == null);
}
use of com.arjuna.wst.UnknownTransactionException in project narayana by jbosstm.
the class MultiServiceParticipantCompletionParticipantCloseTest method run.
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// ignore
}
String serviceURL1;
String serviceURL2;
String serviceURL3;
serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
if (serviceURL1 == null) {
serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
}
if (serviceURL2 == null) {
serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
}
if (serviceURL3 == null) {
serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
}
addDefaultBinding("service1", serviceURL1);
addDefaultBinding("service2", serviceURL2);
addDefaultBinding("service3", serviceURL3);
UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
try {
ba.begin();
} catch (WrongStateException e) {
exception = e;
} catch (SystemException e) {
exception = e;
}
if (exception != null) {
error("txbegin failure " + exception);
return;
}
List<String> resultsList;
String participantId;
List<String> commands = new ArrayList<String>();
List<String> results = new ArrayList<String>();
commands.add("block");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P1");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service2}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P2");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service3}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P3");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("completed");
commands.add("{P1}");
commands.add("next");
commands.add("serve");
commands.add("{service2}");
commands.add("completed");
commands.add("{P2}");
commands.add("next");
commands.add("serve");
commands.add("{service3}");
commands.add("completed");
commands.add("{P3}");
commands.add("endblock");
try {
processCommands(commands, results);
} catch (Exception e) {
exception = e;
}
if (exception != null) {
error("test failure " + exception);
return;
}
try {
ba.close();
} catch (TransactionRolledBackException e) {
exception = e;
} catch (UnknownTransactionException e) {
exception = e;
} catch (SystemException e) {
exception = e;
} catch (WrongStateException e) {
exception = e;
}
if (exception != null) {
error("commit failure " + exception);
}
message("completed");
isSuccessful = (exception == null);
}
use of com.arjuna.wst.UnknownTransactionException in project narayana by jbosstm.
the class SingleParticipantCompletionParticipantCloseTest method run.
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// ignore
}
String serviceURL1;
serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
if (serviceURL1 == null) {
serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
}
addDefaultBinding("service1", serviceURL1);
UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
try {
ba.begin();
} catch (WrongStateException e) {
exception = e;
} catch (SystemException e) {
exception = e;
}
if (exception != null) {
error("txbegin failure " + exception);
return;
}
List<String> resultsList;
String participantId;
List<String> commands = new ArrayList<String>();
List<String> results = new ArrayList<String>();
commands.add("block");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P1");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("completed");
commands.add("{P1}");
commands.add("endblock");
try {
processCommands(commands, results);
} catch (Exception e) {
exception = e;
}
if (exception != null) {
error("test failure " + exception);
return;
}
try {
ba.close();
} catch (TransactionRolledBackException e) {
exception = e;
} catch (UnknownTransactionException e) {
exception = e;
} catch (SystemException e) {
exception = e;
} catch (WrongStateException e) {
exception = e;
}
if (exception != null) {
error("close failure " + exception);
}
message("finished");
isSuccessful = (exception == null);
}
use of com.arjuna.wst.UnknownTransactionException in project narayana by jbosstm.
the class MultiParticipantParticipantCompletionParticipantCloseTest method run.
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// ignore
}
String serviceURL1;
String subserviceURL1;
serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
if (serviceURL1 == null) {
serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
}
subserviceURL1 = System.getProperty(XTSServiceTest.SUBORDINATE_SERVICE_URL1_KEY);
if (subserviceURL1 == null) {
subserviceURL1 = "http://localhost:8080/xtstest/xtssubordinateservicetest1";
}
addDefaultBinding("service1", serviceURL1);
addDefaultBinding("subservice1", subserviceURL1);
UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
try {
ba.begin();
} catch (WrongStateException e) {
exception = e;
} catch (SystemException e) {
exception = e;
}
if (exception != null) {
error("txbegin failure " + exception);
return;
}
List<String> resultsList;
String participantId;
List<String> commands = new ArrayList<String>();
List<String> results = new ArrayList<String>();
commands.add("block");
commands.add("serve");
commands.add("{service1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P1");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{subservice1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P2");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{subservice1}");
commands.add("enlistParticipantCompletion");
commands.add("close");
commands.add("bindings");
commands.add("bind");
commands.add("P3");
commands.add("0");
commands.add("next");
commands.add("serve");
commands.add("{service1}");
commands.add("completed");
commands.add("{P1}");
commands.add("next");
commands.add("serve");
commands.add("{subservice1}");
commands.add("completed");
commands.add("{P2}");
commands.add("next");
commands.add("serve");
commands.add("{subservice1}");
commands.add("completed");
commands.add("{P3}");
commands.add("endblock");
try {
processCommands(commands, results);
} catch (Exception e) {
exception = e;
}
if (exception != null) {
error("test failure " + exception);
return;
}
try {
ba.close();
} catch (TransactionRolledBackException e) {
exception = e;
} catch (UnknownTransactionException e) {
exception = e;
} catch (SystemException e) {
exception = e;
} catch (WrongStateException e) {
exception = e;
}
if (exception != null) {
error("commit failure " + exception);
}
message("completed");
isSuccessful = (exception == null);
}
Aggregations