use of org.omg.CosTransactions.NoTransaction in project narayana by jbosstm.
the class Test05 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
boolean correct = true;
Current current = OTS.get_current();
current.begin();
current.commit(true);
try {
current.commit(true);
correct = false;
} catch (NoTransaction noTransaction) {
}
if (correct) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
} catch (Exception exception) {
System.out.println("Failed");
System.err.println("Test05.main: " + exception);
exception.printStackTrace(System.err);
}
try {
OAInterface.shutdownOA();
ORBInterface.shutdownORB();
} catch (Exception exception) {
System.err.println("Test05.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of org.omg.CosTransactions.NoTransaction in project narayana by jbosstm.
the class Test07 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
boolean correct = true;
Current current = OTS.get_current();
current.begin();
current.commit(true);
try {
current.rollback();
correct = false;
} catch (NoTransaction noTransaction) {
}
if (correct) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
} catch (Exception exception) {
System.out.println("Failed");
System.err.println("Test07.main: " + exception);
exception.printStackTrace(System.err);
}
try {
OAInterface.shutdownOA();
ORBInterface.shutdownORB();
} catch (Exception exception) {
System.err.println("Test07.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of org.omg.CosTransactions.NoTransaction in project narayana by jbosstm.
the class Test09 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
boolean correct = true;
Current current = OTS.get_current();
current.begin();
current.commit(false);
try {
current.commit(true);
correct = false;
} catch (NoTransaction noTransaction) {
}
if (correct) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
} catch (Exception exception) {
System.out.println("Failed");
System.err.println("Test09.main: " + exception);
exception.printStackTrace(System.err);
}
try {
OAInterface.shutdownOA();
ORBInterface.shutdownORB();
} catch (Exception exception) {
System.err.println("Test09.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of org.omg.CosTransactions.NoTransaction in project narayana by jbosstm.
the class Test16 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
boolean correct = true;
Current current = OTS.get_current();
current.begin();
current.rollback();
try {
current.rollback_only();
correct = false;
} catch (NoTransaction noTransaction) {
}
if (correct) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
} catch (Exception exception) {
System.out.println("Failed");
System.err.println("Test16.main: " + exception);
exception.printStackTrace(System.err);
}
try {
OAInterface.shutdownOA();
ORBInterface.shutdownORB();
} catch (Exception exception) {
System.err.println("Test16.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of org.omg.CosTransactions.NoTransaction in project narayana by jbosstm.
the class Test06 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
boolean correct = true;
Current current = OTS.get_current();
current.begin();
current.commit(true);
try {
current.commit(false);
correct = false;
} catch (NoTransaction noTransaction) {
}
if (correct) {
System.out.println("Passed");
} else {
System.out.println("Failed");
}
} catch (Exception exception) {
System.out.println("Failed");
System.err.println("Test06.main: " + exception);
exception.printStackTrace(System.err);
}
try {
OAInterface.shutdownOA();
ORBInterface.shutdownORB();
} catch (Exception exception) {
System.err.println("Test06.main: " + exception);
exception.printStackTrace(System.err);
}
}
Aggregations