Package bitronix.tm.recovery

Examples of bitronix.tm.recovery.RecoveryException


     * {@inheritDoc}
     */
    public XAResourceHolderState startRecovery() throws RecoveryException {
        synchronized (xaResourceHolders) {
            if (recoveryXAResourceHolder != null) {
                throw new RecoveryException("recovery already in progress on " + this);
            }

            if (xaResourceHolders.isEmpty()) {
                throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
            }

            recoveryXAResourceHolder = new RecoveryXAResourceHolder((XAResourceHolder) xaResourceHolders.get(0));
            return new XAResourceHolderState(recoveryXAResourceHolder, this);
        }
View Full Code Here


    /* XAResourceProducer implementation */

    public XAResourceHolderState startRecovery() throws RecoveryException {
        init();
        if (recoveryConnectionHandle != null)
            throw new RecoveryException("recovery already in progress on " + this);

        try {
            recoveryConnectionHandle = (JdbcConnectionHandle) pool.getConnectionHandle(false);
            recoveryXAResourceHolder = recoveryConnectionHandle.getPooledConnection().createRecoveryXAResourceHolder();
            return new XAResourceHolderState(recoveryConnectionHandle.getPooledConnection(), this);
        } catch (Exception ex) {
            throw new RecoveryException("cannot start recovery on " + this, ex);
        }
    }
View Full Code Here

        try {
            if (log.isDebugEnabled()) log.debug("recovery xa resource is being closed: " + recoveryXAResourceHolder);
            recoveryConnectionHandle.close();
        } catch (Exception ex) {
            throw new RecoveryException("error ending recovery on " + this, ex);
        }
        finally {
            recoveryConnectionHandle = null;

            // the recoveryXAResourceHolder actually wraps the recoveryConnectionHandle so closing it
View Full Code Here

    /* XAResourceProducer implementation */

    public XAResourceHolderState startRecovery() throws RecoveryException {
        init();
        if (recoveryPooledConnection != null)
            throw new RecoveryException("recovery already in progress on " + this);

        try {
            recoveryConnectionHandle = (JmsConnectionHandle) pool.getConnectionHandle(false);
            recoveryPooledConnection = recoveryConnectionHandle.getPooledConnection();
            recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
            return new XAResourceHolderState(recoveryXAResourceHolder, recoveryPooledConnection.getPoolingConnectionFactory());
        } catch (Exception ex) {
            throw new RecoveryException("error starting recovery", ex);
        }
    }
View Full Code Here

            if (recoveryConnectionHandle != null) {
                try {
                    if (log.isDebugEnabled()) log.debug("recovery connection handle is being closed: " + recoveryConnectionHandle);
                    recoveryConnectionHandle.close();
                } catch (Exception ex) {
                    throw new RecoveryException("error ending recovery", ex);
                }
            }

            if (recoveryXAResourceHolder != null) {
                try {
                    if (log.isDebugEnabled()) log.debug("recovery xa resource is being closed: " + recoveryXAResourceHolder);
                    recoveryXAResourceHolder.close();
                } catch (Exception ex) {
                    throw new RecoveryException("error ending recovery", ex);
                }
            }
        }
        finally {
            recoveryConnectionHandle = null;
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public XAResourceHolderState startRecovery() throws RecoveryException {
        if (recoveryXAResourceHolder != null) {
            throw new RecoveryException("recovery already in progress on " + this);
        }

        if (xaResourceHolders.isEmpty()) {
            throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
        }

        recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
        return new XAResourceHolderState(recoveryXAResourceHolder, this);
    }
View Full Code Here

    /* XAResourceProducer implementation */

    public XAResourceHolderState startRecovery() throws RecoveryException {
        init();
        if (recoveryConnectionHandle != null)
            throw new RecoveryException("recovery already in progress on " + this);

        try {
            recoveryConnectionHandle = (Connection) pool.getConnectionHandle(false);
            PooledConnectionProxy pooledConnection = (PooledConnectionProxy) recoveryConnectionHandle;
            recoveryXAResourceHolder = pooledConnection.getPooledConnection().createRecoveryXAResourceHolder();
            return new XAResourceHolderState(pooledConnection.getPooledConnection(), this);
        } catch (Exception ex) {
            throw new RecoveryException("cannot start recovery on " + this, ex);
        }
    }
View Full Code Here

        try {
            if (log.isDebugEnabled()) { log.debug("recovery xa resource is being closed: " + recoveryXAResourceHolder); }
            recoveryConnectionHandle.close();
        } catch (Exception ex) {
            throw new RecoveryException("error ending recovery on " + this, ex);
        }
        finally {
            recoveryConnectionHandle = null;

            // the recoveryXAResourceHolder actually wraps the recoveryConnectionHandle so closing it
View Full Code Here

    /* XAResourceProducer implementation */

    public XAResourceHolderState startRecovery() throws RecoveryException {
        init();
        if (recoveryPooledConnection != null)
            throw new RecoveryException("recovery already in progress on " + this);

        try {
            recoveryConnectionHandle = (JmsConnectionHandle) pool.getConnectionHandle(false);
            recoveryPooledConnection = recoveryConnectionHandle.getPooledConnection();
            recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
            return new XAResourceHolderState(recoveryXAResourceHolder, recoveryPooledConnection.getPoolingConnectionFactory());
        } catch (Exception ex) {
            throw new RecoveryException("error starting recovery", ex);
        }
    }
View Full Code Here

            if (recoveryConnectionHandle != null) {
                try {
                    if (log.isDebugEnabled()) { log.debug("recovery connection handle is being closed: " + recoveryConnectionHandle); }
                    recoveryConnectionHandle.close();
                } catch (Exception ex) {
                    throw new RecoveryException("error ending recovery", ex);
                }
            }

            if (recoveryXAResourceHolder != null) {
                try {
                    if (log.isDebugEnabled()) { log.debug("recovery xa resource is being closed: " + recoveryXAResourceHolder); }
                    recoveryXAResourceHolder.close();
                } catch (Exception ex) {
                    throw new RecoveryException("error ending recovery", ex);
                }
            }
        }
        finally {
            recoveryConnectionHandle = null;
View Full Code Here

TOP

Related Classes of bitronix.tm.recovery.RecoveryException

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.