String objectStoreDir = System.getProperty("objectstore.dir");
log.trace("ObjectStoreDir===" + objectStoreDir);
//We must ensure each node has its own object store
String newObjectStore = name + new GUID().toString();
if (objectStoreDir != null)
{
//Delete the old one
//deleteDirectory(new File(objectStoreDir));
newObjectStore = objectStoreDir + "/" + newObjectStore;
}
log.info("Setting com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR to " + newObjectStore);
System.setProperty(com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR, newObjectStore);
//We must also make sure the node identifier is unique for each node
//Otherwise xids might overlap
String arjunanodeId = "TestNodeID-" + new GUID().toString();
log.info("Setting com.arjuna.ats.arjuna.common.Environment.XA_NODE_IDENTIFIER to " + arjunanodeId);
System.setProperty(com.arjuna.ats.arjuna.common.Environment.XA_NODE_IDENTIFIER, arjunanodeId);