Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.EjbInterceptor


        }
        return false;
    }

    public void addInterceptor(EjbInterceptor interceptor) {
        EjbInterceptor ic =
            getInterceptorByClassName(interceptor.getInterceptorClassName());
        if (ic == null) {
            interceptor.setEjbBundleDescriptor(this);
            interceptors.put(interceptor.getInterceptorClassName(), interceptor);
        }                
View Full Code Here


            }
        }

        if (hasAroundInvokeMethod()) {

            EjbInterceptor interceptorInfo = new EjbInterceptor();
            interceptorInfo.setFromBeanClass(true);
            interceptorInfo.addAroundInvokeDescriptors(getAroundInvokeDescriptors());
            interceptorInfo.setInterceptorClassName(getEjbImplClassName());

            aroundInvokeInterceptors.add(interceptorInfo);
        }

        return aroundInvokeInterceptors;
View Full Code Here

            }
        }

        if (hasAroundTimeoutMethod()) {

            EjbInterceptor interceptorInfo = new EjbInterceptor();
            interceptorInfo.setFromBeanClass(true);
            interceptorInfo.addAroundTimeoutDescriptors(getAroundTimeoutDescriptors());
            interceptorInfo.setInterceptorClassName(getEjbImplClassName());

            aroundTimeoutInterceptors.add(interceptorInfo);
        }

        return aroundTimeoutInterceptors;
View Full Code Here

            if (next.getCallbackDescriptors(type).size() > 0) {
                callbackInterceptors.add(next);
            }
        }

        EjbInterceptor beanClassCallbackInfo = null;

        switch (type) {
            case POST_CONSTRUCT:

                if (hasPostConstructMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors
                            (type, getPostConstructDescriptors());
                }
                break;

            case PRE_DESTROY:

                if (hasPreDestroyMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors
                            (type, getPreDestroyDescriptors());
                }
                break;

            case PRE_PASSIVATE:

                if (((EjbSessionDescriptor) this).hasPrePassivateMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors(type,
                            ((EjbSessionDescriptor) this).getPrePassivateDescriptors());
                }

                break;

            case POST_ACTIVATE:

                if (((EjbSessionDescriptor) this).hasPostActivateMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors(type,
                            ((EjbSessionDescriptor) this).getPostActivateDescriptors());
                }

                break;
               
            default:
                throw new IllegalStateException(localStrings.getLocalString(
                    "enterprise.deployment.invalidcallbacktype",
                    "Invalid callback type: [{0}]", type));
        }

        if (beanClassCallbackInfo != null) {

            beanClassCallbackInfo.setInterceptorClassName
                    (getEjbImplClassName());
            callbackInterceptors.add(beanClassCallbackInfo);

        }
View Full Code Here

    }

    @Override
    public EjbInterceptor getDescriptor() {
        if (descriptor==null) {
            descriptor = new EjbInterceptor();
            descriptor.setEjbBundleDescriptor((EjbBundleDescriptor)getParentNode().getDescriptor());
        }
        return descriptor;
    }
View Full Code Here

    }

    @Override
    public EjbInterceptor getDescriptor() {
        if (descriptor==null) {
            descriptor = new EjbInterceptor();
            descriptor.setEjbBundleDescriptor((EjbBundleDescriptor)getParentNode().getDescriptor());
        }
        return descriptor;
    }
View Full Code Here

            }
        }

        if (hasAroundInvokeMethod()) {

            EjbInterceptor interceptorInfo = new EjbInterceptor();
            interceptorInfo.setFromBeanClass(true);
            interceptorInfo.addAroundInvokeDescriptors(getAroundInvokeDescriptors());
            interceptorInfo.setInterceptorClassName(getEjbImplClassName());

            aroundInvokeInterceptors.add(interceptorInfo);
        }

        return aroundInvokeInterceptors;
View Full Code Here

            }
        }

        if (hasAroundTimeoutMethod()) {

            EjbInterceptor interceptorInfo = new EjbInterceptor();
            interceptorInfo.setFromBeanClass(true);
            interceptorInfo.addAroundTimeoutDescriptors(getAroundTimeoutDescriptors());
            interceptorInfo.setInterceptorClassName(getEjbImplClassName());

            aroundTimeoutInterceptors.add(interceptorInfo);
        }

        return aroundTimeoutInterceptors;
View Full Code Here

            if (next.getCallbackDescriptors(type).size() > 0) {
                callbackInterceptors.add(next);
            }
        }

        EjbInterceptor beanClassCallbackInfo = null;

        switch (type) {
            case AROUND_CONSTRUCT:
                break;

            case POST_CONSTRUCT:

                if (hasPostConstructMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors
                            (type, getPostConstructDescriptors());
                }
                break;

            case PRE_DESTROY:

                if (hasPreDestroyMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors
                            (type, getPreDestroyDescriptors());
                }
                break;

            case PRE_PASSIVATE:

                if (((EjbSessionDescriptor) this).hasPrePassivateMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors(type,
                            ((EjbSessionDescriptor) this).getPrePassivateDescriptors());
                }

                break;

            case POST_ACTIVATE:

                if (((EjbSessionDescriptor) this).hasPostActivateMethod()) {
                    beanClassCallbackInfo = new EjbInterceptor();
                    beanClassCallbackInfo.setFromBeanClass(true);
                    beanClassCallbackInfo.addCallbackDescriptors(type,
                            ((EjbSessionDescriptor) this).getPostActivateDescriptors());
                }

                break;
               
            default:
                throw new IllegalStateException(localStrings.getLocalString(
                    "enterprise.deployment.invalidcallbacktype",
                    "Invalid callback type: [{0}]", type));
        }

        if (beanClassCallbackInfo != null) {

            beanClassCallbackInfo.setInterceptorClassName
                    (getEjbImplClassName());
            callbackInterceptors.add(beanClassCallbackInfo);

        }
View Full Code Here

            if (parentDesc instanceof EjbDescriptor) {
                EjbDescriptor ejbDesc = (EjbDescriptor)parentDesc;
                descriptor.setDefaultLifecycleCallbackClass(
                    ejbDesc.getEjbClassName());
            } else if (parentDesc instanceof EjbInterceptor) {
                EjbInterceptor ejbInterceptor =
                    (EjbInterceptor)parentDesc;
                descriptor.setDefaultLifecycleCallbackClass(
                    ejbInterceptor.getInterceptorClassName());
            }
        }
        return descriptor;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.EjbInterceptor

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.