Refine search
public void unregister() { unregister(getName()); }
public String type() { return getType(); }
/** * Construct an MBean to represent this ObjectStore record. The bean type used * for construct the MBean is provided in the configuration of the @see ObjStoreBrowser * @return */ public OSEntryBean createMBean() { try { Class<OSEntryBean> cl = (Class<OSEntryBean>) Class.forName(beantype); Constructor<OSEntryBean> constructor = cl.getConstructor(UidWrapper.class); mbean = constructor.newInstance(this); } catch (Throwable e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException tsLogger.i18NLogger.info_osb_MBeanCtorFail(e); mbean = new OSEntryBean(this); } mbean.activate(); return mbean; }
public boolean doRemove() { try { if (StoreManager.getRecoveryStore().remove_committed(getUid(), _uidWrapper.getType())) return true; if (tsLogger.logger.isDebugEnabled()) tsLogger.logger.debugf("%s %s", REMOVE_NOK_1, getUid().toString()); return false; } catch (ObjectStoreException e) { if (tsLogger.logger.isDebugEnabled()) tsLogger.logger.debugf("%s %s - %s", REMOVE_NOK_1, getUid().toString(), e.getMessage()); return false; } }
void register() { if (allowRegistration && mbean != null && !registered) { mbean.register(); registered = true; } }
public void unregister() { if (registered && mbean != null) { try { mbean.unregister(); } catch (Exception e) { } registered = false; } }
public StringBuilder toString(String prefix, StringBuilder sb) { return sb.append(prefix).append('\t').append(getId()).append('\n'); } }
public StringBuilder toString(String prefix, StringBuilder sb) { return mbean == null ? sb : mbean.toString(prefix, sb); }
@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); } }
/** * Construct an MBean to represent this ObjectStore record. The bean type used * for construct the MBean is provided in the configuration of the @see ObjStoreBrowser * @return */ public OSEntryBean createMBean() { try { Class<OSEntryBean> cl = (Class<OSEntryBean>) Class.forName(beantype); Constructor<OSEntryBean> constructor = cl.getConstructor(UidWrapper.class); mbean = constructor.newInstance(this); } catch (Throwable e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException tsLogger.i18NLogger.info_osb_MBeanCtorFail(e); mbean = new OSEntryBean(this); } mbean.activate(); return mbean; }
public boolean doRemove() { try { if (StoreManager.getRecoveryStore().remove_committed(getUid(), _uidWrapper.getType())) return true; if (tsLogger.logger.isDebugEnabled()) tsLogger.logger.debugf("%s %s", REMOVE_NOK_1, getUid().toString()); return false; } catch (ObjectStoreException e) { if (tsLogger.logger.isDebugEnabled()) tsLogger.logger.debugf("%s %s - %s", REMOVE_NOK_1, getUid().toString(), e.getMessage()); return false; } }
void register() { if (allowRegistration && mbean != null && !registered) { mbean.register(); registered = true; } }
public void unregister() { if (registered && mbean != null) { try { mbean.unregister(); } catch (Exception e) { } registered = false; } }
public StringBuilder toString(String prefix, StringBuilder sb) { return sb.append(prefix).append('\t').append(getId()).append('\n'); }
public StringBuilder toString(String prefix, StringBuilder sb) { return mbean == null ? sb : mbean.toString(prefix, sb); }
/** * Construct an MBean to represent this ObjectStore record. The bean type used * for construct the MBean is provided in the configuration of the @see ObjStoreBrowser * @return the mbean representation */ public OSEntryBean createMBean() { try { Class<OSEntryBean> cl = (Class<OSEntryBean>) Class.forName(beantype); Constructor<OSEntryBean> constructor = cl.getConstructor(UidWrapper.class); mbean = constructor.newInstance(this); } catch (Throwable e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException tsLogger.i18NLogger.warn_osb_MBeanCtorFail(e); mbean = new OSEntryBean(this); } mbean.activate(); return mbean; }
public boolean doRemove() { try { if (StoreManager.getRecoveryStore().remove_committed(getUid(), _uidWrapper.getType())) return true; if (tsLogger.logger.isDebugEnabled()) tsLogger.logger.debugf("%s %s", REMOVE_NOK_1, getUid().toString()); return false; } catch (ObjectStoreException e) { if (tsLogger.logger.isDebugEnabled()) tsLogger.logger.debugf("%s %s - %s", REMOVE_NOK_1, getUid().toString(), e.getMessage()); return false; } }