Package bitronix.tm.internal

Examples of bitronix.tm.internal.BitronixRuntimeException


            XAStatefulHolder xaStatefulHolder = availablePool.poll(remainingTimeMs, TimeUnit.MILLISECONDS);
            if (xaStatefulHolder == null) {
                if (TransactionManagerServices.isTransactionManagerRunning())
                    TransactionManagerServices.getTransactionManager().dumpTransactionContexts();
               
                throw new BitronixRuntimeException("XA pool of resource " + bean.getUniqueName() + " still empty after " + bean.getAcquisitionTimeout() + "s wait time");
            }

            if (expireStatefulHolder(xaStatefulHolder, false)) {
                return getInPool(remainingTimeMs);
            }

            return xaStatefulHolder;
        } catch (InterruptedException e) {
            throw new BitronixRuntimeException("Interrupted while waiting for IN_POOL connection.");
        }
    }
View Full Code Here


        }
        else if (destination instanceof Queue) {
            try {
                return ((Queue) destination).getQueueName();
            } catch (JMSException ex) {
                throw new BitronixRuntimeException("error getting queue name of " + destination, ex);
            }
        }
        else if (destination instanceof Topic) {
            try {
                return ((Topic) destination).getTopicName();
            } catch (JMSException ex) {
                throw new BitronixRuntimeException("error getting topic name of " + destination, ex);
            }
        }
        else throw new IllegalArgumentException("unsupported destination: " + destination);
    }
View Full Code Here

            close();
            init();
            IncrementalRecoverer.recover(xaResourceProducer);
        }
        catch (RecoveryException ex) {
            throw new BitronixRuntimeException("incremental recovery failed when trying to acquire a connection from failed resource '" + bean.getUniqueName() + "'", ex);
        }
        catch (Exception ex) {
            throw new BitronixRuntimeException("pool reset failed when trying to acquire a connection from failed resource '" + bean.getUniqueName() + "'", ex);
        }
    }
View Full Code Here

        Future<?> f = (Future<?>) future;

        try {
            f.get(timeout, TimeUnit.MILLISECONDS);
        } catch (InterruptedException ex) {
            throw new BitronixRuntimeException("job interrupted", ex);
        } catch (ExecutionException ex) {
            throw new BitronixRuntimeException("job execution exception", ex);
        } catch (TimeoutException ex) {
            // ok, just return
        }
    }
View Full Code Here

            if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
                throw new IllegalStateException("no transaction started on current thread");

            return getResources().get(key);
        } catch (SystemException ex) {
            throw new BitronixRuntimeException("cannot get current transaction status", ex);
        }
    }
View Full Code Here

            if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
                throw new IllegalStateException("no transaction started on current thread");

            return currentTransaction().getStatus() == Status.STATUS_MARKED_ROLLBACK;
        } catch (SystemException e) {
            throw new BitronixRuntimeException("cannot get current transaction status");
        }
    }
View Full Code Here

            if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
                return null;

            return currentTransaction().getGtrid();
        } catch (SystemException ex) {
            throw new BitronixRuntimeException("cannot get current transaction status", ex);
        }
    }
View Full Code Here

            if (currentTransaction() == null)
                return Status.STATUS_NO_TRANSACTION;

            return currentTransaction().getStatus();
        } catch (SystemException ex) {
            throw new BitronixRuntimeException("cannot get current transaction status", ex);
        }
    }
View Full Code Here

                if (log.isDebugEnabled()) { log.debug("first resource put in synchronization registry, registering a ClearRegistryResourcesSynchronization"); }
                Synchronization synchronization = new ClearRegistryResourcesSynchronization();
                currentTransaction().getSynchronizationScheduler().add(synchronization, Scheduler.ALWAYS_LAST_POSITION);
            }
        } catch (SystemException ex) {
            throw new BitronixRuntimeException("cannot get current transaction status", ex);
        }
    }
View Full Code Here

                    )
                throw new IllegalStateException("transaction is done, cannot register an interposed synchronization");

            currentTransaction().getSynchronizationScheduler().add(synchronization, Scheduler.DEFAULT_POSITION -1);
        } catch (SystemException ex) {
            throw new BitronixRuntimeException("cannot get current transaction status", ex);
        }
    }
View Full Code Here

TOP

Related Classes of bitronix.tm.internal.BitronixRuntimeException

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.