use of com.arjuna.ats.internal.jta.tools.osb.mbean.jts.JCAServerTransactionHeaderReader in project narayana by jbosstm.
the class NewTypeTest method testInstrumentNewType.
@Test
public void testInstrumentNewType() throws MBeanException {
OSBTypeHandler osbTypeHandler = new OSBTypeHandler(true, "com.arjuna.ats.internal.jta.tools.osb.mbean.jts.ArjunaTransactionImpleWrapper", "com.arjuna.ats.internal.jta.tools.osb.mbean.jts.JTSActionBean", "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/ServerTransaction/JCA", JCAServerTransactionHeaderReader.class.getName());
JCAServerTransactionHeaderReader headerStateReader = (JCAServerTransactionHeaderReader) osbTypeHandler.getHeaderStateReader();
// , new XidImple(new Uid()))
RecoveringSubordinateServerTransaction txn = new RecoveringSubordinateServerTransaction(new Uid());
ObjStoreBrowser osb = createObjStoreBrowser(false);
osb.registerHandler(osbTypeHandler);
generatedHeuristicHazard(txn);
osb.probe();
UidWrapper w = osb.findUid(txn.get_uid());
assertNotNull(w);
assertTrue(headerStateReader.isWasInvoked());
}
Aggregations