Examples of EjbBundleDescriptor


Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

            EjbContext[] ejbContexts) throws AnnotationProcessorException {

        Interceptors interceptors = (Interceptors) ainfo.getAnnotation();

       
        EjbBundleDescriptor ejbBundle =
            ((EjbDescriptor)ejbContexts[0].getDescriptor()).
                getEjbBundleDescriptor();
       
        // Process each of the interceptor classes.
        for(Class interceptor : interceptors.value()) {
            processInterceptorClass(interceptor, ejbBundle, ainfo);
        }

        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
            // info at the front.  The binding information from the descriptor
            // is ordered, but there is no prescribed order in which the
            // annotations are processed, so all that matters is that it's
            // before the descriptor bindings and that the descriptor binding
            // order is preserved.
            ejbBundle.prependInterceptorBinding(binding);
        }

        return getDefaultProcessedResult();
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

    public static AnnotatedElementHandler createAnnotatedElementHandler(
            BundleDescriptor bundleDesc) {
        AnnotatedElementHandler aeHandler = null;
        if (bundleDesc instanceof EjbBundleDescriptor) {
            EjbBundleDescriptor ejbBundleDesc = (EjbBundleDescriptor)bundleDesc;
            aeHandler = new EjbBundleContext(ejbBundleDesc);
        } else if (bundleDesc instanceof ApplicationClientDescriptor) {
            ApplicationClientDescriptor appClientDesc =
                    (ApplicationClientDescriptor)bundleDesc;
            aeHandler = new AppClientContext(appClientDesc);
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

   
    /**
     * notification of the end of XML parsing for this node
     */
    public void postParsing() {
        EjbBundleDescriptor bd = (EjbBundleDescriptor) getParentNode().getDescriptor();
        if (bd==null) {
            DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
                    new Object[]{descriptor});
            return;
        }
        bd.setCMPResourceReference(descriptor);
    }   
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

       
        if (doneWithNode) {
            ContainerTransaction ct =  new ContainerTransaction(trans_attribute, description);
            for (Iterator methodsIterator = methods.iterator();methodsIterator.hasNext();) {
                MethodDescriptor md = (MethodDescriptor) methodsIterator.next();
                EjbBundleDescriptor bundle = (EjbBundleDescriptor) getParentNode().getDescriptor();
                EjbDescriptor ejb = bundle.getEjbByName(md.getEjbName(), true);
                ejb.getMethodContainerTransactions().put(md, ct);
            }
        }       
        return doneWithNode;
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

            for(Class next : ejbClass.getInterfaces()) {
                if( !excludedFromImplementsClause(next) ) {
                    if( intfName == null ) {
                        intfName = next.getName();
                    } else {
                        EjbBundleDescriptor currentBundle =
                        ((EjbBundleContext)ainfo.getProcessingContext().getHandler()).getDescriptor();
                        log(Level.SEVERE, ainfo,
                            localStrings.getLocalString(
                            "enterprise.deployment.annotation.handlers.ambiguousimplementsclausemdb",
                            "Implements clause for 3.x message driven bean class {0} in {1} declares more than one potential message-listener interface.  In this case, the @MessageDriven.messageListenerInterface() attribute must be used to specify the message listener interface.",
                             new Object[] { ejbClass,
                             currentBundle.getModuleDescriptor().getArchiveUri() }));
                        return getDefaultFailedResult();
                    }
                }
            }
        }
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

    public void setElementValue(XMLElement element, String value) {
        if (WebServicesTagNames.PORT_COMPONENT_NAME.equals
            (element.getQName())) {
            Object parentDesc = getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                EjbBundleDescriptor bundle =
                    ((EjbDescriptor) parentDesc).getEjbBundleDescriptor();
                WebServicesDescriptor webServices = bundle.getWebServices();
                descriptor = webServices.getEndpointByName(value);
            } else if( parentDesc instanceof WebComponentDescriptor) {
                WebBundleDescriptor bundle = ((WebComponentDescriptor) parentDesc).getWebBundleDescriptor();
                WebServicesDescriptor webServices = bundle.getWebServices();
                descriptor = webServices.getEndpointByName(value);
            }
            if (descriptor==null) {
                DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.port_component_name_unknown",               
                    new Object[] { value });                       
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

     * @param parent node to add the runtime xml info
     * @param the ejb endpoint
     */       
    public void writeWebServiceEndpointInfo(Node parent, EjbDescriptor ejb) {
                                           
        EjbBundleDescriptor bundle = ejb.getEjbBundleDescriptor();
        WebServicesDescriptor webServices = bundle.getWebServices();
        Collection endpoints = webServices.getEndpointsImplementedBy(ejb);
        for(Iterator iter = endpoints.iterator(); iter.hasNext();) {
            WebServiceEndpoint next = (WebServiceEndpoint) iter.next();
            writeDescriptor(parent, WebServicesTagNames.WEB_SERVICE_ENDPOINT,
                            next);
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

       

        if (aeHandler instanceof EjbBundleContext) {
            EjbBundleContext ejbBundleContext = (EjbBundleContext)aeHandler;
           
            EjbBundleDescriptor ejbBundle = ejbBundleContext.getDescriptor();

            ApplicationException appExcAnn = (ApplicationException) annotation;

            EjbApplicationExceptionInfo appExcInfo = new
                EjbApplicationExceptionInfo();
            Class annotatedClass = (Class) ae;
            appExcInfo.setExceptionClassName(annotatedClass.getName());
            appExcInfo.setRollback(appExcAnn.rollback());

            ejbBundle.addApplicationException(appExcInfo);

        }

        return getDefaultProcessedResult();
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

    public Node writeDescriptor(Node parent, Descriptor descriptor) {   
        if (! (descriptor instanceof EjbBundleDescriptor)) {
            throw new IllegalArgumentException(getClass() +
                " cannot handles descriptors of type " + descriptor.getClass());
        }
        EjbBundleDescriptor bundleDescriptor = (EjbBundleDescriptor) descriptor;
        Node ejbs = super.writeDescriptor(parent, descriptor);

        // security-role-mapping*
        List<SecurityRoleMapping> roleMappings = bundleDescriptor.getSecurityRoleMappings();
        for (int i = 0; i < roleMappings.size(); i++) {
            SecurityRoleMappingNode srmn = new SecurityRoleMappingNode();
            srmn.writeDescriptor(ejbs, RuntimeTagNames.SECURITY_ROLE_MAPPING, roleMappings.get(i));
        }
 
View Full Code Here

Examples of com.sun.enterprise.deployment.EjbBundleDescriptor

                        (EjbReference) newDescriptor);
        } else if( newDescriptor instanceof
                   MessageDestinationReferenceDescriptor ) {
            MessageDestinationReferenceDescriptor msgDestRef =
                (MessageDestinationReferenceDescriptor) newDescriptor;
            EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor)
                getParentNode().getDescriptor();
            // EjbBundle might not be set yet on EjbInterceptor, so set it
            // explicitly here.
            msgDestRef.setReferringBundleDescriptor(ejbBundle);
            getInterceptor().addMessageDestinationReferenceDescriptor
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.