Package org.apache.openejb

Examples of org.apache.openejb.SystemException


    }

    protected BeanEntry getBeanEntry(ThreadContext callContext) throws OpenEJBException {
        Object primaryKey = callContext.getPrimaryKey();
        if (primaryKey == null) {
            throw new SystemException(new NullPointerException("The primary key is null. Cannot get the bean entry"));
        }
        BeanEntry entry = getBeanIndex(callContext).get(primaryKey);
        if (entry == null) {
            Object bean = this.obtainInstance(primaryKey, ThreadContext.getThreadContext());
            this.poolInstance(callContext, bean);
View Full Code Here


        try {
            if (tx != null) {
                tx.setRollbackOnly();
            }
        } catch (javax.transaction.SystemException se) {
            throw new SystemException(se);
        }
    }
View Full Code Here

        MdbInstanceFactory instanceFactory = endpointFactory.getInstanceFactory();
        Instance instance = null;
        try {
            instance = (Instance) instanceFactory.createInstance(true);
        } catch (UnavailableException e) {
            throw new SystemException("Unable to create instance for invocation", e);
        }

        try {
            beforeDelivery(deploymentInfo, instance, method, null);
            Object value = invoke(instance, method, args);
View Full Code Here

                    transaction.enlistResource(xaResource);
                }
            }
        } catch (ApplicationException e) {
            ThreadContext.exit(oldContext);
            throw new SystemException("Should never get an Application exception", e);
        } catch (SystemException e) {
            ThreadContext.exit(oldContext);
            throw e;
        } catch (Exception e) {
            ThreadContext.exit(oldContext);
            throw new SystemException("Unable to enlist xa resource in the transaction", e);
        }
    }
View Full Code Here

        // invoke the tx after method
        try {
            mdbCallContext.txPolicy.afterInvoke(instance, mdbCallContext.txContext);
        } catch (ApplicationException e) {
            throw new SystemException("Should never get an Application exception", e);
        } finally {
            ThreadContext.exit(mdbCallContext.oldCallContext);
        }
    }
View Full Code Here

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

        } catch (javax.transaction.SystemException se) {
            throw new SystemException(se);
        }

    }
View Full Code Here

            } else {
                rollbackTransaction(context, context.currentTx);
            }

        } catch (javax.transaction.SystemException se) {
            throw new SystemException(se);
        } finally {
            if (context.clientTx != null) {
                resumeTransaction(context, context.clientTx);
            } else if (txLogger.isInfoEnabled()) {
                txLogger.info("TX " + policyToString() + ": No transaction to resume");
View Full Code Here

            context.currentTx = context.clientTx;

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

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

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

                rollbackTransaction(context, context.currentTx);
            }

        } catch (javax.transaction.SystemException se) {
            logger.error("Exception during getTransaction()", se);
            throw new SystemException(se);
        }
    }
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.