use of com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeMap in project narayana by jbosstm.
the class JTSObjStoreBrowserTest method startTest.
// create 2 participants, start the action and enlist both participants
private ExtendedCrashRecord[] startTest(TwoPhaseCoordinator A) throws Exception {
ThreadActionData.purgeActions();
ExtendedCrashRecord[] recs = { new ExtendedCrashRecord(ExtendedCrashRecord.CrashLocation.NoCrash, ExtendedCrashRecord.CrashType.Normal), new ExtendedCrashRecord(ExtendedCrashRecord.CrashLocation.CrashInCommit, ExtendedCrashRecord.CrashType.HeuristicHazard) };
RecordTypeManager.manager().add(new RecordTypeMap() {
public Class<? extends AbstractRecord> getRecordClass() {
return ExtendedCrashRecord.class;
}
public int getType() {
return RecordType.USER_DEF_FIRST0;
}
});
A.start();
for (ExtendedCrashRecord rec : recs) A.add(rec);
return recs;
}
Aggregations