public class AllObjUidsTest extends Test
{
public void run (String[] args)
{
ObjectStore objStore = TxControl.getStore();
boolean passed = false;
InputObjectState ios = new InputObjectState();
String type = "/StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction/ArjunaMSXAAtomicAction";
for (int i = 0; i < args.length; i++)
{
if (args[i].equals("-help"))
{
System.err.println("Usage: [-help] [-type <type name>]");
System.exit(0);
}
if (args[i].equals("-type"))
{
type = args[i+1];
objStore = new ObjectStore();
}
}
try
{
if (objStore.allObjUids(type, ios, ObjectStore.OS_UNKNOWN))
{
Uid id = new Uid(Uid.nullUid());
do
{
try
{
id.unpack(ios);
}
catch (Exception ex)
{
id = Uid.nullUid();
}
if (id.notEquals(Uid.nullUid()))
System.err.println("Got UNKNOWN "+id);
passed = true;
} while (id.notEquals(Uid.nullUid()));
}
System.err.println("\n");
if (objStore.allObjUids(type, ios, ObjectStore.OS_COMMITTED))
{
Uid id = new Uid(Uid.nullUid());
do
{
try
{
id.unpack(ios);
}
catch (Exception ex)
{
id = Uid.nullUid();
}
if (id.notEquals(Uid.nullUid()))
System.err.println("Got COMMITTED "+id);
passed = true;
} while (id.notEquals(Uid.nullUid()));
}
System.err.println("\n");
if (objStore.allObjUids(type, ios, ObjectStore.OS_UNCOMMITTED))
{
Uid id = new Uid(Uid.nullUid());
do
{