Package org.apache.openejb.core

Examples of org.apache.openejb.core.ExceptionType


            ejbLoad_If_No_Transaction(callContext, bean);
            returnValue = runMethod.invoke(bean, args);
            ejbStore_If_No_Transaction(callContext, bean);
            instanceManager.poolInstance(callContext, bean, callContext.getPrimaryKey());
        } catch (java.lang.reflect.InvocationTargetException ite) {// handle enterprise bean exceptions
            ExceptionType type = callContext.getDeploymentInfo().getExceptionType(ite.getTargetException());
            if (type == ExceptionType.SYSTEM) {
                /* System Exception ****************************/

                txPolicy.handleSystemException(ite.getTargetException(), bean, txContext);
            } else {
View Full Code Here


            }

            // update pool
            instanceManager.poolInstance(callContext, bean, primaryKey);
        } catch (java.lang.reflect.InvocationTargetException ite) {// handle enterprise bean exceptions
            ExceptionType type = callContext.getDeploymentInfo().getExceptionType(ite.getTargetException());
            if (type == ExceptionType.SYSTEM) {
                /* System Exception ****************************/
                txPolicy.handleSystemException(ite.getTargetException(), bean, txContext);
            } else {
                /* Application Exception ***********************/
 
View Full Code Here

        } catch (org.apache.openejb.ApplicationException e) {
            txPolicy.handleApplicationException(e.getRootCause(), false, txContext);
        } catch (org.apache.openejb.SystemException se) {
            txPolicy.handleSystemException(se.getRootCause(), bean, txContext);
        } catch (Exception e) {// handle reflection exception
            ExceptionType type = callContext.getDeploymentInfo().getExceptionType(e);
            if (type == ExceptionType.SYSTEM) {
                /* System Exception ****************************/
                txPolicy.handleSystemException(e, bean, txContext);
            } else {
                /* Application Exception ***********************/
 
View Full Code Here

                List<InterceptorData> interceptors = deploymentInfo.getMethodInterceptors(runMethod);
                InterceptorStack interceptorStack = new InterceptorStack(instance.bean, runMethod, Operation.BUSINESS, interceptors, instance.interceptors);
                returnValue = interceptorStack.invoke(args);
            }
        } catch (Throwable re) {// handle reflection exception
            ExceptionType exceptionType = deploymentInfo.getExceptionType(re);
            if (exceptionType == ExceptionType.SYSTEM) {
                /* System Exception ****************************/

                // The bean instance is not put into the pool via instanceManager.poolInstance
                // and therefore the instance will be garbage collected and destroyed.
View Full Code Here

    private void handleException(ThreadContext callContext, TransactionPolicy txPolicy, Throwable e) throws ApplicationException {
        if (e instanceof ApplicationException) {
            throw (ApplicationException) e;
        }

        ExceptionType type = callContext.getDeploymentInfo().getExceptionType(e);
        if (type == SYSTEM) {
            discardInstance(callContext);
            handleSystemException(txPolicy, e, callContext);
        } else {
            handleApplicationException(txPolicy, e, type == APPLICATION_ROLLBACK);
View Full Code Here

        } catch (Throwable e) {
            if (e instanceof InvocationTargetException) {
                e = ((InvocationTargetException) e).getTargetException();
            }

            ExceptionType type = callContext.getDeploymentInfo().getExceptionType(e);
            if (type == ExceptionType.SYSTEM) {
                /* System Exception ****************************/
                handleSystemException(txPolicy, e, callContext);
            } else {
                /* Application Exception ***********************/
 
View Full Code Here

        } catch (Throwable e) {
            if (e instanceof InvocationTargetException) {
                e = ((InvocationTargetException) e).getTargetException();
            }

            ExceptionType type = callContext.getDeploymentInfo().getExceptionType(e);
            if (type == ExceptionType.SYSTEM) {
                /* System Exception ****************************/
                handleSystemException(txPolicy, e, callContext);

            } else {
View Full Code Here

        } catch (Throwable e) {
            if (e instanceof InvocationTargetException) {
                e = ((InvocationTargetException) e).getTargetException();
            }

            ExceptionType type = callContext.getDeploymentInfo().getExceptionType(e);
            if (type == ExceptionType.SYSTEM) {
                /* System Exception ****************************/
                handleSystemException(txPolicy, e, callContext);
            } else {
                /* Application Exception ***********************/
 
View Full Code Here

            afterInvoke(txPolicy, callContext);
        }
    }

    private void handleException(TransactionPolicy txPolicy, Throwable e, ThreadContext callContext, EntityBean bean) throws OpenEJBException {
        ExceptionType type;
        if (e instanceof InvocationTargetException) {
            e = ((InvocationTargetException) e).getTargetException();
            type = callContext.getDeploymentInfo().getExceptionType(e);
        } else if (e instanceof ApplicationException) {
            e = ((ApplicationException) e).getRootCause();
View Full Code Here

                    List<InterceptorData> interceptors = deploymentInfo.getMethodInterceptors(runMethod);
                    InterceptorStack interceptorStack = new InterceptorStack(instance.bean, runMethod, Operation.BUSINESS, interceptors, instance.interceptors);
                    returnValue = interceptorStack.invoke(args);
                }
            } catch (Throwable e) {// handle reflection exception
                ExceptionType type = deploymentInfo.getExceptionType(e);
                if (type == ExceptionType.SYSTEM) {
                    /* System Exception ****************************/

                    // The bean instance is not put into the pool via instanceManager.poolInstance
                    // and therefore the instance will be garbage collected and destroyed.
View Full Code Here

TOP

Related Classes of org.apache.openejb.core.ExceptionType

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.