Package org.apache.openejb

Examples of org.apache.openejb.SystemException


        try {

            context.clientTx = context.getTransactionManager().suspend();
        } catch (javax.transaction.SystemException se) {
            throw new SystemException(se);
        }
        context.currentTx = null;

    }
View Full Code Here


            context.clientTx = context.getTransactionManager().getTransaction();
            context.currentTx = context.clientTx;

        } catch (javax.transaction.SystemException se) {
            throw new SystemException(se);
        }
    }
View Full Code Here

                throw new ApplicationException(new RemoteException("Transactions not supported"));
            }

        } catch (javax.transaction.SystemException se) {
            logger.error("Exception during getTransaction()", se);
            throw new SystemException(se);
        }
    }
View Full Code Here

                    txLogger.info("TX " + policyToString() + ": setRollbackOnly() on transaction " + tx);
                }
            }
        } catch (javax.transaction.SystemException se) {
            logger.error("Exception during setRollbackOnly()", se);
            throw new SystemException(se);
        }
    }
View Full Code Here

                txLogger.info("TX " + policyToString() + ": Suspended transaction " + tx);
            }
            return tx;
        } catch (javax.transaction.SystemException se) {
            logger.error("Exception during suspend()", se);
            throw new SystemException(se);
        }
    }
View Full Code Here

                context.getTransactionManager().resume(tx);
            }
        } catch (InvalidTransactionException ite) {

            txLogger.error("Could not resume the client's transaction, the transaction is no longer valid: " + ite.getMessage());
            throw new SystemException(ite);
        } catch (IllegalStateException e) {

            txLogger.error("Could not resume the client's transaction: " + e.getMessage());
            throw new SystemException(e);
        } catch (javax.transaction.SystemException e) {

            txLogger.error("Could not resume the client's transaction: The transaction reported a system exception: " + e.getMessage());
            throw new SystemException(e);
        }
    }
View Full Code Here

            txLogger.info("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back: " + e.getMessage());

        } catch (SecurityException e) {

            txLogger.error("The current thread is not allowed to commit the transaction: " + e.getMessage());
            throw new SystemException(e);

        } catch (IllegalStateException e) {

            txLogger.error("The current thread is not associated with a transaction: " + e.getMessage());
            throw new SystemException(e);

        } catch (javax.transaction.SystemException e) {
            txLogger.error("The Transaction Manager has encountered an unexpected error condition while attempting to commit the transaction: " + e.getMessage());

            throw new SystemException(e);
        }
    }
View Full Code Here

                tx.rollback();
            }
        } catch (IllegalStateException e) {

            logger.error("The TransactionManager reported an exception while attempting to rollback the transaction: " + e.getMessage());
            throw new SystemException(e);

        } catch (javax.transaction.SystemException e) {

            logger.error("The TransactionManager reported an exception while attempting to rollback the transaction: " + e.getMessage());
            throw new SystemException(e);
        }
    }
View Full Code Here

        }
    }

    private Instance obtainInstance(Object primaryKey, ThreadContext callContext) throws OpenEJBException {
        if (primaryKey == null) {
            throw new SystemException(new NullPointerException("Cannot obtain an instance of the stateful session bean with a null session id"));
        }

        Transaction currentTransaction = getTransaction(callContext);

        // Find the instance
        Instance instance = checkedOutInstances.get(primaryKey);
        if (instance == null) {
            try {
                instance = cache.checkOut(primaryKey);
            } catch (OpenEJBException e) {
                throw e;
            } catch (Exception e) {
                throw new SystemException("Unexpected load exception", e);
            }

            // Did we find the instance?
            if (instance == null) {
                throw new InvalidateReferenceException(new NoSuchObjectException("Not Found"));
View Full Code Here

            } else {
                sessionDirectory = new File(System.getProperty("java.io.tmpdir", File.separator + "tmp"));
            }
            logger.info("Using directory " + sessionDirectory + " for stateful session passivation");
        } catch (java.io.IOException e) {
            throw new SystemException(getClass().getName() + ".init(): can't use directory prefix " + dir + ":" + e, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.SystemException

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.