Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.LifecycleCallbackDescriptor


        Method annMethod = (Method)ainfo.getAnnotatedElement();
        String pdMethodName = annMethod.getName();
        String pdClassName = annMethod.getDeclaringClass().getName();

        for (ResourceContainerContext rcContext : rcContexts) {
            LifecycleCallbackDescriptor preDestroyDesc =
                   new LifecycleCallbackDescriptor();
            preDestroyDesc.setLifecycleCallbackClass(pdClassName);
            preDestroyDesc.setLifecycleCallbackMethod(pdMethodName);
            preDestroyDesc.setMetadataSource(MetadataSource.ANNOTATION);
            // override by xml is handled in addPreDestroyDescriptor
            rcContext.addPreDestroyDescriptor(preDestroyDesc);
        }

        return getDefaultProcessedResult();
View Full Code Here


        Method annMethod = (Method)ainfo.getAnnotatedElement();
        String pcMethodName = annMethod.getName();
        String pcClassName = annMethod.getDeclaringClass().getName();

        for (ResourceContainerContext rcContext : rcContexts) {
            LifecycleCallbackDescriptor postConstructDesc =
                   new LifecycleCallbackDescriptor();
            postConstructDesc.setLifecycleCallbackClass(pcClassName);
            postConstructDesc.setLifecycleCallbackMethod(pcMethodName);
            postConstructDesc.setMetadataSource(MetadataSource.ANNOTATION);
            // override by xml is handled in addPostConstructDescriptor
            rcContext.addPostConstructDescriptor(postConstructDesc);
        }

        return getDefaultProcessedResult();
View Full Code Here

    * @return the descriptor instance to associate with this XMLNode
    */      
    public Object getDescriptor() {
       
       if (descriptor==null) {
            descriptor = new LifecycleCallbackDescriptor();
            Descriptor parentDesc =
                (Descriptor)getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                EjbDescriptor ejbDesc = (EjbDescriptor)parentDesc;
                descriptor.setDefaultLifecycleCallbackClass(
View Full Code Here

        if (aroundInvokeDescs == null || !aroundInvokeDescs.hasNext())
            return;

        AroundInvokeNode subNode = new AroundInvokeNode();
        for(; aroundInvokeDescs.hasNext();) {
            LifecycleCallbackDescriptor next =
                    (LifecycleCallbackDescriptor) aroundInvokeDescs.next();
            subNode.writeDescriptor(parentNode,
                    EjbTagNames.AROUND_INVOKE_METHOD, next);
        }
View Full Code Here

        if (aroundTimeoutDescs == null || !aroundTimeoutDescs.hasNext())
            return;

        AroundTimeoutNode subNode = new AroundTimeoutNode();
        for(; aroundTimeoutDescs.hasNext();) {
            LifecycleCallbackDescriptor next =
                    (LifecycleCallbackDescriptor) aroundTimeoutDescs.next();
            subNode.writeDescriptor(parentNode,
                    EjbTagNames.AROUND_TIMEOUT_METHOD, next);
        }
View Full Code Here

        validateAnnotatedLifecycleMethod(annMethod);
        String pdMethodName = annMethod.getName();
        String pdClassName = annMethod.getDeclaringClass().getName();

        for (ResourceContainerContext rcContext : rcContexts) {
            LifecycleCallbackDescriptor preDestroyDesc =
                   new LifecycleCallbackDescriptor();
            preDestroyDesc.setLifecycleCallbackClass(pdClassName);
            preDestroyDesc.setLifecycleCallbackMethod(pdMethodName);
            preDestroyDesc.setMetadataSource(MetadataSource.ANNOTATION);
            // override by xml is handled in addPreDestroyDescriptor
            rcContext.addPreDestroyDescriptor(preDestroyDesc);
        }

        return getDefaultProcessedResult();
View Full Code Here

        validateAnnotatedLifecycleMethod(annMethod);
        String pcMethodName = annMethod.getName();
        String pcClassName = annMethod.getDeclaringClass().getName();

        for (ResourceContainerContext rcContext : rcContexts) {
            LifecycleCallbackDescriptor postConstructDesc =
                   new LifecycleCallbackDescriptor();
            postConstructDesc.setLifecycleCallbackClass(pcClassName);
            postConstructDesc.setLifecycleCallbackMethod(pcMethodName);
            postConstructDesc.setMetadataSource(MetadataSource.ANNOTATION);
            // override by xml is handled in addPostConstructDescriptor
            rcContext.addPostConstructDescriptor(postConstructDesc);
        }

        return getDefaultProcessedResult();
View Full Code Here

    private LifecycleCallbackDescriptor descriptor;

    @Override
    public LifecycleCallbackDescriptor getDescriptor() {
       if (descriptor==null) {
            descriptor = new LifecycleCallbackDescriptor();
            Descriptor parentDesc =
                (Descriptor)getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                EjbDescriptor ejbDesc = (EjbDescriptor)parentDesc;
                descriptor.setDefaultLifecycleCallbackClass(
View Full Code Here

    }

    private LifecycleCallbackDescriptor getPostActivateDescriptor(
            AnnotationInfo ainfo) {
        Method annotatedMethod = (Method) ainfo.getAnnotatedElement();
        LifecycleCallbackDescriptor postActivate =
                new LifecycleCallbackDescriptor();
        postActivate.setLifecycleCallbackClass(annotatedMethod.getDeclaringClass().getName());
        postActivate.setLifecycleCallbackMethod(annotatedMethod.getName());
        return postActivate;
    }
View Full Code Here

    }

    private LifecycleCallbackDescriptor getAroundConstructDescriptor(
            AnnotationInfo ainfo) {
        Method annotatedMethod = (Method) ainfo.getAnnotatedElement();
        LifecycleCallbackDescriptor aroundConstruct =
                new LifecycleCallbackDescriptor();
        aroundConstruct.setLifecycleCallbackClass(annotatedMethod.getDeclaringClass().getName());
        aroundConstruct.setLifecycleCallbackMethod(annotatedMethod.getName());
        return aroundConstruct;
    }
View Full Code Here

TOP

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

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.