Examples of TransactionException


Examples of org.ow2.easybeans.tests.common.exception.TransactionException

    public boolean getRollbackOnly() throws TransactionException {
        boolean bolResult;
        try {
            bolResult = ctx.getRollbackOnly();
        } catch (IllegalStateException e) {
            throw new TransactionException("There was an exception in the getRollbackOnly", e);
        }
        return bolResult;
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.exception.TransactionException

        try {
            UserTransaction utx = TransactionHelper.getUserTransaction();
            utx.begin();
            utx.commit();
        } catch (Exception e) {
            throw new TransactionException("The bean cannot get the user transaction with the JNDI", e);
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.exception.TransactionException

        try {
            UserTransaction utx = ctx.getUserTransaction();
            utx.begin();
            utx.commit();
        } catch (Exception e) {
            throw new TransactionException("The bean cannot get the user transaction with the EJBContext", e);
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.exception.TransactionException

                tableManager.deleteTable(TABLE);
            }
            utx.commit();
        } catch (Exception e) {
            utx.rollback();
            throw new TransactionException("Error during commit.", e);
        }

    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.exception.TransactionException

                tableManager.deleteTable(TABLE);
            }
            utx.commit();
        } catch (Exception e) {
            utx.rollback();
            throw new TransactionException("Error during commit.", e);
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.exception.TransactionException

                tableManager.insertTable(TABLE);
            }
            utx.commit();
        } catch (Exception e) {
            utx.rollback();
            throw new TransactionException("Error during commit.", e);
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.exception.TransactionException

        } catch (Exception e) {
            utxNested.rollback();
            if (this.getTransactionStatus() != Status.STATUS_NO_TRANSACTION) {
                utx.rollback();
            }
            throw new TransactionException("Error during commit.", e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

            boolean initial = handle.getConnection().getAutoCommit();
            localStuff.put(handle, new LocalStuff(initial));
            handle.getConnection().setAutoCommit(false);
        }
        catch (SQLException e) {
            throw new TransactionException("Failed to start transaction", e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

                handle.getConnection().setAutoCommit(stuff.getInitialAutocommit());
                stuff.getCheckpoints().clear();
            }
        }
        catch (SQLException e) {
            throw new TransactionException("Failed to commit transaction", e);
        }
        finally {
            // prevent memory leak if commit throws an exception
            if (localStuff.containsKey(handle)) {
                localStuff.remove(handle);
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

                handle.getConnection().setAutoCommit(stuff.getInitialAutocommit());
                stuff.getCheckpoints().clear();
            }
        }
        catch (SQLException e) {
            throw new TransactionException("Failed to rollback transaction", e);
        }
        finally {
            // prevent memory leak if rollback throws an exception
            if (localStuff.containsKey(handle)) {
                localStuff.remove(handle);
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.