Examples of TxnManager


Examples of com.sleepycat.je.txn.TxnManager

            throw new XAException(XAException.XAER_INVAL);
        }

        try {
            Transaction txn = getXATransaction(xid);
            TxnManager txnMgr = envImpl.getTxnManager();

            if (flags == XAResource.TMNOFLAGS) {

                /*
                 * If neither RESUME nor JOIN was set, make sure xid doesn't
                 * exist in allXATxns.  Throw XAER_DUPID if it does.
                 */
                if (txn == null) {
                    if (DEBUG) {
                        System.out.println
                            ("Transaction for XID " + xid + " being created");
                    }

                    txn = beginTransaction(null, null);
                    setXATransaction(xid, txn);

                } else {
                    throw new XAException(XAException.XAER_DUPID);
                }
            } else if (tmJoin) {
                if (txn == null) {
                    throw new XAException(XAException.XAER_NOTA);
                }

                if (txnMgr.getTxnForThread() != null ||
                    txn.getPrepared()) {
                    throw new XAException(XAException.XAER_PROTO);
                }
            } else if (tmResume) {
                if (txn == null) {
                    throw new XAException(XAException.XAER_NOTA);
                }

                if (!txn.getTxn().isSuspended()) {
                    throw new XAException(XAException.XAER_PROTO);
                }
                txn.getTxn().setSuspended(false);
            }

            if (DEBUG) {
                System.out.println
                    ("Setting Transaction for " + Thread.currentThread());
            }
            txnMgr.setTxnForThread(txn);
        } catch (DatabaseException DE) {
            if (DEBUG) {
                System.out.println("*** start exception");
            }
            throwNewXAException(DE);
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

            nodeName = envConfig.getNodeName();

            logManager = new SyncedLogManager(this, isReadOnly);

            inMemoryINs = new INList(this);
            txnManager = new TxnManager(this);

            /*
             * Daemons are always made here, but only started after recovery.
             * We want them to exist so we can call them programatically even
             * if the daemon thread is not started.
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

            } else {
                logManager = new SyncedLogManager(this, isReadOnly);
            }

            inMemoryINs = new INList(this);
            txnManager = new TxnManager(this);

            /*
             * Create the file utilization objects before creating the Cleaner
             * or running recovery.
             */
 
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

      throw new XAException(XAException.XAER_INVAL);
  }

  try {
      Transaction txn = getXATransaction(xid);
      TxnManager txnMgr = environmentImpl.getTxnManager();

      if (flags == XAResource.TMNOFLAGS) {

    /*
     * If neither RESUME nor JOIN was set, make sure xid doesn't
     * exist in allXATxns.  Throw XAER_DUPID if it does.
     */
    if (txn == null) {
        if (DEBUG) {
      System.out.println
          ("Transaction for XID " + xid + " being created");
        }

        txn = beginTransaction(null, null);
        setXATransaction(xid, txn);

    } else {
        throw new XAException(XAException.XAER_DUPID);
    }
      } else if (tmJoin) {
    if (txn == null) {
        throw new XAException(XAException.XAER_NOTA);
    }

    if (txnMgr.getTxnForThread() != null) {
        throw new XAException(XAException.XAER_PROTO);
    }
      } else if (tmResume) {
    if (txn == null) {
        throw new XAException(XAException.XAER_NOTA);
    }

    if (!txn.getTxn().isSuspended()) {
        throw new XAException(XAException.XAER_PROTO);
    }
    txn.getTxn().setSuspended(false);
      }

      if (DEBUG) {
    System.out.println
        ("Setting Transaction for " + Thread.currentThread());
      }
      txnMgr.setTxnForThread(txn);
  } catch (DatabaseException DE) {
      if (DEBUG) {
    System.out.println("*** start exception");
      }
      throwNewXAException(DE);
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

            } else {
                logManager = new SyncedLogManager(this, isReadOnly);
            }

            inMemoryINs = new INList(this);
            txnManager = new TxnManager(this);

            /*
             * Daemons are always made here, but only started after recovery.
             * We want them to exist so we can call them programatically even
             * if the daemon thread is not started.
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

      throw new XAException(XAException.XAER_INVAL);
  }

  try {
      Transaction txn = getXATransaction(xid);
      TxnManager txnMgr = environmentImpl.getTxnManager();

      if (flags == XAResource.TMNOFLAGS) {

    /*
     * If neither RESUME nor JOIN was set, make sure xid doesn't
     * exist in allXATxns.  Throw XAER_DUPID if it does.
     */
    if (txn == null) {
        if (DEBUG) {
      System.out.println
          ("Transaction for XID " + xid + " being created");
        }

        txn = beginTransaction(null, null);
        setXATransaction(xid, txn);

    } else {
        throw new XAException(XAException.XAER_DUPID);
    }
      } else if (tmJoin) {
    if (txn == null) {
        throw new XAException(XAException.XAER_NOTA);
    }

    if (txnMgr.getTxnForThread() != null) {
        throw new XAException(XAException.XAER_PROTO);
    }
      } else if (tmResume) {
    if (txn == null) {
        throw new XAException(XAException.XAER_NOTA);
    }

    if (!txn.getTxn().isSuspended()) {
        throw new XAException(XAException.XAER_PROTO);
    }
    txn.getTxn().setSuspended(false);
      }

      if (DEBUG) {
    System.out.println
        ("Setting Transaction for " + Thread.currentThread());
      }
      txnMgr.setTxnForThread(txn);
  } catch (DatabaseException DE) {
      if (DEBUG) {
    System.out.println("*** start exception");
      }
      throwNewXAException(DE);
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

            } else {
                logManager = new SyncedLogManager(this, isReadOnly);
            }

            inMemoryINs = new INList(this);
            txnManager = new TxnManager(this);

            /*
             * Daemons are always made here, but only started after recovery.
             * We want them to exist so we can call them programatically even
             * if the daemon thread is not started.
View Full Code Here

Examples of com.sleepycat.je.txn.TxnManager

            throw new XAException(XAException.XAER_INVAL);
        }

        try {
            Transaction txn = getXATransaction(xid);
            TxnManager txnMgr = envImpl.getTxnManager();

            if (flags == XAResource.TMNOFLAGS) {

                /*
                 * If neither RESUME nor JOIN was set, make sure xid doesn't
                 * exist in allXATxns.  Throw XAER_DUPID if it does.
                 */
                if (txn == null) {
                    if (DEBUG) {
                        System.out.println
                            ("Transaction for XID " + xid + " being created");
                    }

                    txn = beginTransaction(null, null);
                    setXATransaction(xid, txn);

                } else {
                    throw new XAException(XAException.XAER_DUPID);
                }
            } else if (tmJoin) {
                if (txn == null) {
                    throw new XAException(XAException.XAER_NOTA);
                }

                if (txnMgr.getTxnForThread() != null ||
                    txn.getPrepared()) {
                    throw new XAException(XAException.XAER_PROTO);
                }
            } else if (tmResume) {
                if (txn == null) {
                    throw new XAException(XAException.XAER_NOTA);
                }

                if (!txn.getTxn().isSuspended()) {
                    throw new XAException(XAException.XAER_PROTO);
                }
                txn.getTxn().setSuspended(false);
            }

            if (DEBUG) {
                System.out.println
                    ("Setting Transaction for " + Thread.currentThread());
            }
            txnMgr.setTxnForThread(txn);
        } catch (DatabaseException DE) {
            if (DEBUG) {
                System.out.println("*** start exception");
            }
            throwNewXAException(DE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.