Search in sources :

Example 6 with RecordTypeMap

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;
}
Also used : ExtendedCrashRecord(com.hp.mwtests.ts.jta.jts.common.ExtendedCrashRecord) RecordTypeMap(com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeMap) AbstractRecord(com.arjuna.ats.arjuna.coordinator.AbstractRecord) BeforeClass(org.junit.BeforeClass) AfterClass(org.junit.AfterClass)

Aggregations

RecordTypeMap (com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeMap)6 AbstractRecord (com.arjuna.ats.arjuna.coordinator.AbstractRecord)4 Test (org.junit.Test)4 AtomicAction (com.arjuna.ats.arjuna.AtomicAction)2 Uid (com.arjuna.ats.arjuna.common.Uid)2 XARecoveryModule (com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule)2 XidImple (com.arjuna.ats.jta.xa.XidImple)2 BasicAction (com.arjuna.ats.arjuna.coordinator.BasicAction)1 RecoverAtomicAction (com.arjuna.ats.arjuna.recovery.RecoverAtomicAction)1 ActionBean (com.arjuna.ats.arjuna.tools.osb.mbean.ActionBean)1 LogRecordWrapper (com.arjuna.ats.arjuna.tools.osb.mbean.LogRecordWrapper)1 OSEntryBean (com.arjuna.ats.arjuna.tools.osb.mbean.OSEntryBean)1 ObjStoreBrowser (com.arjuna.ats.arjuna.tools.osb.mbean.ObjStoreBrowser)1 UidWrapper (com.arjuna.ats.arjuna.tools.osb.mbean.UidWrapper)1 AtomicActionRecoveryModule (com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule)1 JTANodeNameXAResourceOrphanFilter (com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter)1 XAResourceRecord (com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord)1 AtomicAction (com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)1 TransactionManagerImple (com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple)1 SubordinateTransaction (com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinateTransaction)1