Package net.sf.ehcache.transaction

Examples of net.sf.ehcache.transaction.TransactionTimeoutException


     * @param ignoreTimeout true if commit should proceed no matter the timeout
     */
    public void commit(boolean ignoreTimeout) {
        if (!ignoreTimeout && timedOut()) {
            rollback();
            throw new TransactionTimeoutException("transaction timed out, rolled back on commit");
        }
        if (rollbackOnly) {
            rollback();
            throw new TransactionException("transaction was marked as rollback only, rolled back on commit");
        }
View Full Code Here


                timeoutTimestamp = System.currentTimeMillis() + (defaultTransactionTimeout * MILLISECOND_PER_SECOND);
                transactionToTimeoutMap.put(transaction, timeoutTimestamp);
            }

            if (timeoutTimestamp <= System.currentTimeMillis()) {
                throw new TransactionTimeoutException("transaction timed out");
            }

            return timeoutTimestamp - System.currentTimeMillis();
        } catch (SystemException e) {
            throw new TransactionException("cannot get the current transaction", e);
View Full Code Here

        return currentTransactionContext;
    }

    private void assertNotTimedOut() {
        if (getCurrentTransactionContext().timedOut()) {
            throw new TransactionTimeoutException("transaction [" + getCurrentTransactionContext().getTransactionId() + "] timed out");
        }
        if (Thread.interrupted()) {
            throw new TransactionInterruptedException("transaction [" + getCurrentTransactionContext().getTransactionId() +
                    "] interrupted");
        }
View Full Code Here

TOP

Related Classes of net.sf.ehcache.transaction.TransactionTimeoutException

Copyright © 2018 www.massapicom. 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.