static synchronized void getXARecoveryResourceMBeans(UidWrapper uidWrapper) { if (xaRecoveryResourceMBeans == null) { xaRecoveryResourceMBeans = new ArrayList<XARecoveryResourceMBean>(); List<UidWrapper> wrappers = uidWrapper.probe(XAResourceRecord.typeName()); if (wrappers != null) { for (UidWrapper w : wrappers) { OSEntryBean bean = w.getMBean(); if (bean != null && bean instanceof XARecoveryResourceMBean) xaRecoveryResourceMBeans.add((XARecoveryResourceMBean) bean); } } } }
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
OSEntryBean p = recuids.get(i).getMBean();
private JTAActionBean getTransactionBean(ObjStoreBrowser osb, TransactionImple tx, boolean present) { // there should be one MBean corresponding to the Transaction tx UidWrapper w = osb.findUid(tx.get_uid()); if (!present) { assertNull(w); return null; } assertNotNull(w); OSEntryBean ai = w.getMBean(); assertNotNull(ai); // the MBean should wrap a JTAActionBean assertTrue(ai instanceof JTAActionBean); return (JTAActionBean) ai; }
@Test @BMScript("commitMarkableResourceFailAfterPrepare") public void testObjStoreBrowser() throws Exception { final DataSource dataSource = new JdbcDataSource(); ObjStoreBrowser osb = new ObjStoreBrowser(); Uid uid = generateCMRRecord(dataSource); osb.start(); osb.probe(); // there should be one MBean corresponding to the Transaction UidWrapper w = osb.findUid(uid); assertNotNull("ObjStoreBrowser could not find CMR uid wrapper", w); OSEntryBean ai = w.getMBean(); assertNotNull("ObjStoreBrowser could not find CMR uid", ai); assertEquals("ObjStoreBrowser found the wrong uid", ai.getUid(), uid); checkCMRRecovery(dataSource); w = osb.findUid(uid); assertNotNull("CMR uid still exists after a recovery can", w); } }