/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded */ public String remove() { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); i.remove(); } try { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded */ public String remove() { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); i.remove(); } try { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded */ public String remove() { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); i.remove(); } try { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded * @throws MBeanException */ public String remove() throws MBeanException { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); int removeCount = 0; int participantCount = participants.size(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); if (w.isRemoved()) removeCount += 1; i.remove(); } try { if (removeCount == participantCount) { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); } return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded * @throws MBeanException */ public String remove() throws MBeanException { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); int removeCount = 0; int participantCount = participants.size(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); if (w.isRemoved()) removeCount += 1; i.remove(); } try { if (removeCount == participantCount) { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); } return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded * @throws MBeanException */ public String remove() throws MBeanException { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); int removeCount = 0; int participantCount = participants.size(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); if (w.isRemoved()) removeCount += 1; i.remove(); } try { if (removeCount == participantCount) { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); } return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded * @throws MBeanException */ public String remove() throws MBeanException { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); int removeCount = 0; int participantCount = participants.size(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); if (w.isRemoved()) removeCount += 1; i.remove(); } try { if (removeCount == participantCount) { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); } return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded * @throws MBeanException */ public String remove() throws MBeanException { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); int removeCount = 0; int participantCount = participants.size(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); if (w.isRemoved()) removeCount += 1; i.remove(); } try { if (removeCount == participantCount) { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); } return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded * @throws MBeanException */ public String remove() throws MBeanException { // first unregister each participant of this action Iterator<LogRecordWrapper> i = participants.iterator(); int removeCount = 0; int participantCount = participants.size(); while (i.hasNext()) { LogRecordWrapper w = i.next(); w.remove(false); if (w.isRemoved()) removeCount += 1; i.remove(); } try { if (removeCount == participantCount) { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; _uidWrapper.unregister(); } return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } finally { _uidWrapper.probe(); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().endsWith("ArjunaTransactionImple"); // Participants in a JTS transaction are represented by entries in the ObjectStore List<UidWrapper> recuids = null; if (isJTS) { try { Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(JMXServer.AJT_WRAPPER_TYPE); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * for JTS actions the participants will have entries in the ObjectStore. * these entries will be associated with the current MBean (refer to * the method findParticipants below for details) */ recuids = w.probe(JMXServer.AJT_RECORD_TYPE, JMXServer.AJT_XAREC_TYPE); } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
/** * Remove this AtomicAction from the ObjectStore * @return a textual indication of whether the remove operation succeeded */ public String remove() { try { if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType())) return "Attempt to remove transaction failed"; else w.probe(); return "Transaction successfully removed"; } catch (ObjectStoreException e) { return "Unable to remove transaction: " + e.getMessage(); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }
public ActionBean(UidWrapper w) { super(w); boolean isJTS = JMXServer.isJTS() && w.getType().contains("ArjunaTransactionImple"); if (isJTS) { try { UidWrapper.setRecordWrapperTypeName(w.getType()); Class<ActionBeanWrapperInterface> cl = (Class<ActionBeanWrapperInterface>) Class.forName(w.getClassName()); Constructor<ActionBeanWrapperInterface> constructor = cl.getConstructor(ActionBean.class, UidWrapper.class); ra = constructor.newInstance(this, w); ra.activate(); } catch (Exception e) { // ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace("Error constructing " + JMXServer.AJT_WRAPPER_TYPE + ": " + e); ra = createWrapper(w, true); } /* * For JTS we also store participant details under "CosTransactions/XAResourceRecord" * We may at some point want to augment the beans created in findParticipants below with * w.probe(JMXServer.AJT_RECORD_TYPE); */ } else { ra = createWrapper(w, true); // com.arjuna.ats.arjuna.coordinator.abstractrecord.RecordTypeManager.manager() } sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType()); for (ParticipantStatus lt : ParticipantStatus.values()) { findParticipants(recuids, ra.getRecords(lt), lt); } }