Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.InterceptorBindingDescriptor


         for(EjbContext next : ejbContexts) {

            EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();

            // Create binding information. 
            InterceptorBindingDescriptor binding =
                new InterceptorBindingDescriptor();

            binding.setEjbName(ejbDescriptor.getName());

            binding.setExcludeDefaultInterceptors(true);
           
            if(ElementType.METHOD.equals(ainfo.getElementType())) {
                Method m = (Method) ainfo.getAnnotatedElement();
                MethodDescriptor md =
                    new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
                binding.setBusinessMethod(md);
            }

            ejbBundle.prependInterceptorBinding(binding);
        }
View Full Code Here


        for(EjbContext next : ejbContexts) {

            EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();

            // Create binding information. 
            InterceptorBindingDescriptor binding =
                new InterceptorBindingDescriptor();

            binding.setEjbName(ejbDescriptor.getName());

            for(Class interceptor : interceptors.value()) {
                binding.appendInterceptorClass(interceptor.getName());
            }
           
            if(ElementType.METHOD.equals(ainfo.getElementType())) {
                Method m = (Method) ainfo.getAnnotatedElement();
                MethodDescriptor md =
                    new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
                binding.setBusinessMethod(md);
            }

            // All binding information processed from annotations should go
            // before the binding information processed from the descriptors.
            // Since descriptors are processed first, always place the binding
View Full Code Here

         for(EjbContext next : ejbContexts) {

            EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();

            // Create binding information. 
            InterceptorBindingDescriptor binding =
                new InterceptorBindingDescriptor();

            binding.setEjbName(ejbDescriptor.getName());
            binding.setExcludeClassInterceptors(true);

            // Annotation can only be defined at the method level.
            Method m = (Method) ainfo.getAnnotatedElement();
            MethodDescriptor md =
                new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
            binding.setBusinessMethod(md);

            ejbBundle.prependInterceptorBinding(binding);
        }

        return getDefaultProcessedResult();
View Full Code Here

     */
    public boolean endElement(XMLElement element) {

        if (EjbTagNames.INTERCEPTOR_ORDER.equals(element.getQName())) {

            InterceptorBindingDescriptor desc = (InterceptorBindingDescriptor)
                getDescriptor();
            desc.setIsTotalOrdering(true);

        } else if (EjbTagNames.METHOD_PARAMS.equals(element.getQName())) {
            // this means we have an empty method-params element
            // which means this method has no input parameter
            if (businessMethod.getParameterClassNames() == null) {
                businessMethod.setEmptyParameterClassNames();
            }
        }else if( EjbTagNames.METHOD.equals(element.getQName()) ) {

            InterceptorBindingDescriptor bindingDesc =
                (InterceptorBindingDescriptor) getDescriptor();
            businessMethod.setEjbClassSymbol(MethodDescriptor.EJB_BEAN);
            bindingDesc.setBusinessMethod(businessMethod);
           
            if( needsOverloadResolution ) {
                bindingDesc.setNeedsOverloadResolution(true);
            }

            businessMethod = null;
            needsOverloadResolution = false;

View Full Code Here

                for(Method ejbClassMethod : ejbClass.getDeclaredMethods()) {

                    if( ejbClassMethod.getName().equals(methodName) ) {

                        InterceptorBindingDescriptor newInterceptorBinding =
                            new InterceptorBindingDescriptor();

                        MethodDescriptor newMethodDesc = new MethodDescriptor
                            (ejbClassMethod, MethodDescriptor.EJB_BEAN);
                       
                        newInterceptorBinding.setEjbName(ejbName);
                        newInterceptorBinding.setBusinessMethod
                            (newMethodDesc);
                        for(String interceptorClass :
                                next.getInterceptorClasses()) {
                            newInterceptorBinding.appendInterceptorClass
                                (interceptorClass);
                        }
                        newInterceptorBinding.setIsTotalOrdering
                            (next.getIsTotalOrdering());
                        newInterceptorBinding.setExcludeDefaultInterceptors
                            (next.getExcludeDefaultInterceptors());
                        newInterceptorBinding.setExcludeClassInterceptors
                            (next.getExcludeClassInterceptors());
                       
                        newBindings.add(newInterceptorBinding);

                    }
View Full Code Here

     */
    public boolean endElement(XMLElement element) {

        if (EjbTagNames.INTERCEPTOR_ORDER.equals(element.getQName())) {

            InterceptorBindingDescriptor desc = (InterceptorBindingDescriptor)
                getDescriptor();
            desc.setIsTotalOrdering(true);

        } else if (EjbTagNames.METHOD_PARAMS.equals(element.getQName())) {
            // this means we have an empty method-params element
            // which means this method has no input parameter
            if (businessMethod.getParameterClassNames() == null) {
                businessMethod.setEmptyParameterClassNames();
            }
        }else if( EjbTagNames.METHOD.equals(element.getQName()) ) {

            InterceptorBindingDescriptor bindingDesc =
                (InterceptorBindingDescriptor) getDescriptor();
            businessMethod.setEjbClassSymbol(MethodDescriptor.EJB_BEAN);
            bindingDesc.setBusinessMethod(businessMethod);
           
            if( needsOverloadResolution ) {
                bindingDesc.setNeedsOverloadResolution(true);
            }

            businessMethod = null;
            needsOverloadResolution = false;

View Full Code Here

         for(EjbContext next : ejbContexts) {

            EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();

            // Create binding information. 
            InterceptorBindingDescriptor binding =
                new InterceptorBindingDescriptor();

            binding.setEjbName(ejbDescriptor.getName());

            binding.setExcludeDefaultInterceptors(true);
           
            if(ElementType.METHOD.equals(ainfo.getElementType())) {
                Method m = (Method) ainfo.getAnnotatedElement();
                MethodDescriptor md =
                    new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
                binding.setBusinessMethod(md);
            }

            ejbBundle.prependInterceptorBinding(binding);
        }
View Full Code Here

        for(EjbContext next : ejbContexts) {

            EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();

            // Create binding information. 
            InterceptorBindingDescriptor binding =
                new InterceptorBindingDescriptor();

            binding.setEjbName(ejbDescriptor.getName());

            for(Class interceptor : interceptors.value()) {
                binding.appendInterceptorClass(interceptor.getName());
            }
           
            if(ElementType.METHOD.equals(ainfo.getElementType())) {
                Method m = (Method) ainfo.getAnnotatedElement();
                MethodDescriptor md =
                    new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
                binding.setBusinessMethod(md);
            }

            // All binding information processed from annotations should go
            // before the binding information processed from the descriptors.
            // Since descriptors are processed first, always place the binding
View Full Code Here

         for(EjbContext next : ejbContexts) {

            EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();

            // Create binding information. 
            InterceptorBindingDescriptor binding =
                new InterceptorBindingDescriptor();

            binding.setEjbName(ejbDescriptor.getName());
            binding.setExcludeClassInterceptors(true);

            // Annotation can only be defined at the method level.
            Method m = (Method) ainfo.getAnnotatedElement();
            MethodDescriptor md =
                new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
            binding.setBusinessMethod(md);

            ejbBundle.prependInterceptorBinding(binding);
        }

        return getDefaultProcessedResult();
View Full Code Here

TOP

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

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.