public TransactionRecoveryModule () { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("TransactionRecoveryModule created"); } if (_recoveryStore == null) { _recoveryStore = StoreManager.getRecoveryStore(); } }
private static Set<Uid> getUids(Set<Uid> uids, String type) { try { RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); InputObjectState states = new InputObjectState(); if (recoveryStore.allObjUids(type, states) && states.notempty()) { boolean finished = false; do { Uid uid = UidHelper.unpackFrom(states); if (uid.notEquals(Uid.nullUid())) { uids.add(uid); } else { finished = true; } } while (!finished); } } catch (Exception e) { e.printStackTrace(); } return uids; }
private Collection<Uid> getUids(String type) { Collection<Uid> uids = new ArrayList<Uid>(); ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), type); while (true) { Uid u = iter.iterate(); if (u == null || Uid.nullUid().equals(u)) break; uids.add(u); } return uids; }
Uid u = theXid.getTransactionUid(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Checking whether Xid " + theXid + " exists in ObjectStore."); if (!u.equals(Uid.nullUid())) { RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); String transactionType = SubordinateAtomicAction.getType(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Looking for " + u + " and " + transactionType); InputObjectState states = new InputObjectState(); try { if (recoveryStore.allObjUids(transactionType, states) && (states.notempty())) { Stack values = new Stack(); boolean finished = false; uid = UidHelper.unpackFrom(states); } catch (IOException ex) { ex.printStackTrace(); if (uid.notEquals(Uid.nullUid())) { SubordinateAtomicAction tx = new SubordinateAtomicAction(uid, true); XidImple transactionXid = (XidImple) tx.getXid(); if (transactionXid != null && transactionXid.isSameTransaction(recoveredResourceXid)) { if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Found record for " + theXid);
private Collection<String> getTypes() { Collection<String> allTypes = new ArrayList<String>(); InputObjectState types = new InputObjectState(); try { if (StoreManager.getRecoveryStore().allTypes(types)) { while (true) { try { String typeName = types.unpackString(); if (typeName.length() == 0) break; allTypes.add(typeName); } catch (IOException e1) { break; } } } } catch (ObjectStoreException e) { if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace(e.toString()); } return allTypes; } }
public static boolean getTransactions (InputObjectState os, int status) { RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); try { return recoveryStore.allObjUids(com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.typeName(), os, status); } catch (NullPointerException ex) { } catch (ObjectStoreException e) { e.printStackTrace(); } return false; }
protected AtomicActionRecoveryModule (String type) { if (tsLogger.logger.isDebugEnabled()) { tsLogger.logger.debug("AtomicActionRecoveryModule created"); } if (_recoveryStore == null) { _recoveryStore = StoreManager.getRecoveryStore(); } _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ; _transactionType = type; }
Uid u = theXid.getTransactionUid(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Checking whether Xid " + theXid + " exists in ObjectStore."); if (!u.equals(Uid.nullUid())) { RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); String transactionType = SubordinateAtomicAction.getType(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Looking for " + u + " and " + transactionType); InputObjectState states = new InputObjectState(); try { if (recoveryStore.allObjUids(transactionType, states) && (states.notempty())) { Stack values = new Stack(); boolean finished = false; uid = UidHelper.unpackFrom(states); } catch (IOException ex) { ex.printStackTrace();
private final void listLogs (String type) throws IOException { InputObjectState buff = new InputObjectState(); try { if (StoreManager.getRecoveryStore().allObjUids(type, buff)) { Uid u = null; do { u = UidHelper.unpackFrom(buff); if (Uid.nullUid().notEquals(u)) { System.out.println("Log: " + u); } } while (Uid.nullUid().notEquals(u)); } } catch (final ObjectStoreException ex) { throw new IOException(); } }
private Collection<Uid> getUids(String type) { Collection<Uid> uids = new ArrayList<Uid>(); ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), type); while (true) { Uid u = iter.iterate(); if (u == null || Uid.nullUid().equals(u)) break; uids.add(u); } return uids; }
private Collection<String> getTypes() { Collection<String> allTypes = new ArrayList<String>(); InputObjectState types = new InputObjectState(); try { if (StoreManager.getRecoveryStore().allTypes(types)) { while (true) { try { String typeName = types.unpackString(); if (typeName.length() == 0) break; allTypes.add(typeName); } catch (IOException e1) { break; } } } } catch (ObjectStoreException e) { if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace(e.toString()); } return allTypes; } }
public AtomicActionRecoveryModule() { if (tsLogger.logger.isDebugEnabled()) { tsLogger.logger.debug("AtomicActionRecoveryModule created"); } if (_recoveryStore == null) { _recoveryStore = StoreManager.getRecoveryStore(); } _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ; }
Uid u = theXid.getTransactionUid(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Checking whether Xid " + theXid + " exists in ObjectStore."); if (!u.equals(Uid.nullUid())) { RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); String transactionType = SubordinateAtomicAction.getType(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Looking for " + u + " and " + transactionType); InputObjectState states = new InputObjectState(); try { if (recoveryStore.allObjUids(transactionType, states) && (states.notempty())) { Stack values = new Stack(); boolean finished = false; uid = UidHelper.unpackFrom(states); } catch (IOException ex) { jtaLogger.i18NLogger.warn_unpacking_xid_state(theXid, recoveryStore, transactionType, ex); if (uid.notEquals(Uid.nullUid())) { SubordinateAtomicAction tx = new SubordinateAtomicAction(uid, true); XidImple transactionXid = (XidImple) tx.getXid(); if (transactionXid != null && transactionXid.isSameTransaction(recoveredResourceXid)) { if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Found record for " + theXid);
private final void listLogs (String type) throws IOException { InputObjectState buff = new InputObjectState(); try { if (StoreManager.getRecoveryStore().allObjUids(type, buff)) { Uid u = null; do { u = UidHelper.unpackFrom(buff); if (Uid.nullUid().notEquals(u)) { System.out.println("Log: " + u); } } while (Uid.nullUid().notEquals(u)); } } catch (final ObjectStoreException ex) { throw new IOException(); } }
private Collection<Uid> getUids(String type) { Collection<Uid> uids = new ArrayList<Uid>(); ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), type); while (true) { Uid u = iter.iterate(); if (u == null || Uid.nullUid().equals(u)) break; uids.add(u); } return uids; }
private Collection<String> getTypes() { Collection<String> allTypes = new ArrayList<String>(); InputObjectState types = new InputObjectState(); try { if (StoreManager.getRecoveryStore().allTypes(types)) { while (true) { try { String typeName = types.unpackString(); if (typeName.length() == 0) break; allTypes.add(typeName); } catch (IOException e1) { break; } } } } catch (ObjectStoreException e) { if (tsLogger.logger.isTraceEnabled()) tsLogger.logger.trace(e.toString()); } return allTypes; } }
protected AtomicActionRecoveryModule (String type) { if (tsLogger.logger.isDebugEnabled()) { tsLogger.logger.debug("AtomicActionRecoveryModule created"); } if (_recoveryStore == null) { _recoveryStore = StoreManager.getRecoveryStore(); } _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ; _transactionType = type; }
Uid u = theXid.getTransactionUid(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Checking whether Xid " + theXid + " exists in ObjectStore."); if (!u.equals(Uid.nullUid())) { RecoveryStore recoveryStore = StoreManager.getRecoveryStore(); String transactionType = SubordinateAtomicAction.getType(); if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Looking for " + u + " and " + transactionType); InputObjectState states = new InputObjectState(); try { if (recoveryStore.allObjUids(transactionType, states) && (states.notempty())) { Stack values = new Stack(); boolean finished = false; uid = UidHelper.unpackFrom(states); } catch (IOException ex) { jtaLogger.i18NLogger.warn_unpacking_xid_state(theXid, recoveryStore, transactionType, ex); if (uid.notEquals(Uid.nullUid())) { SubordinateAtomicAction tx = new SubordinateAtomicAction(uid, true); XidImple transactionXid = (XidImple) tx.getXid(); if (transactionXid != null && transactionXid.isSameTransaction(recoveredResourceXid)) { if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug("Found record for " + theXid);
private final void listLogs (String type) throws IOException { InputObjectState buff = new InputObjectState(); try { if (StoreManager.getRecoveryStore().allObjUids(type, buff)) { Uid u = null; do { u = UidHelper.unpackFrom(buff); if (Uid.nullUid().notEquals(u)) { System.out.println("Log: " + u); } } while (Uid.nullUid().notEquals(u)); } } catch (final ObjectStoreException ex) { throw new IOException(); } }
private Collection<Uid> getUids(String type) throws MBeanException { Collection<Uid> uids = new ArrayList<Uid>(); try { ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), type); while (true) { Uid u = iter.iterate(); if (u == null || Uid.nullUid().equals(u)) break; uids.add(u); } } catch (ObjectStoreException | IOException e) { throw new MBeanException(e); } return uids; }