Package org.apache.geronimo.xbeans.javaee6

Examples of org.apache.geronimo.xbeans.javaee6.HandlerType


            mainClas = mainClas.getSuperclass();
        }

        // Get the callback-handler from the deployment descriptor
        if (appClient.isSetCallbackHandler()) {
            FullyQualifiedClassType cls = appClient.getCallbackHandler();
            Class<?> clas;
            try {
                clas = bundle.loadClass(cls.getStringValue().trim());
            }
            catch (ClassNotFoundException e) {
                throw new DeploymentException("AppClientModuleBuilder: Could not load callback-handler class: " + cls.getStringValue(), e);
            }
            classes.add(clas);
        }

        return new ClassFinder(classes);
View Full Code Here


                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
View Full Code Here

    protected static void configureInjectionTarget(InjectionTargetType injectionTarget, Method method, Field field) {

        String injectionJavaType = getInjectionJavaType(method, field);
        String injectionClass = getInjectionClass(method, field);

        FullyQualifiedClassType qualifiedClass = injectionTarget.addNewInjectionTargetClass();
        JavaIdentifierType javaType = injectionTarget.addNewInjectionTargetName();
        qualifiedClass.setStringValue(injectionClass);
        javaType.setStringValue(injectionJavaType);
    }
View Full Code Here

        //------------------------------------------------------------------------------------
        List<Class> classes = new ArrayList<Class>();
        // Get all the servlets from the deployment descriptor
        ServletType[] servlets = webApp.getServletArray();
        for (ServletType servlet : servlets) {
            FullyQualifiedClassType cls = servlet.getServletClass();
            if (cls != null) { // Don't try this for JSPs
                Class<?> clas;
                try {
                    clas = bundle.loadClass(cls.getStringValue());
                } catch (ClassNotFoundException e) {
                    throw new DeploymentException("AbstractWebModuleBuilder: Could not load servlet class: " + cls.getStringValue(), e);
                }
                addClass(classes, clas);
            }
        }
        // Get all the listeners from the deployment descriptor
        ListenerType[] listeners = webApp.getListenerArray();
        for (ListenerType listener : listeners) {
            FullyQualifiedClassType cls = listener.getListenerClass();
            Class<?> clas;
            try {
                clas = bundle.loadClass(cls.getStringValue());
            } catch (ClassNotFoundException e) {
                throw new DeploymentException("AbstractWebModuleBuilder: Could not load listener class: " + cls.getStringValue(), e);
            }
            addClass(classes, clas);
        }
        // Get all the filters from the deployment descriptor
        FilterType[] filters = webApp.getFilterArray();
        for (FilterType filter : filters) {
            FullyQualifiedClassType cls = filter.getFilterClass();
            Class<?> clas;
            try {
                clas = bundle.loadClass(cls.getStringValue());
            } catch (ClassNotFoundException e) {
                throw new DeploymentException("AbstractWebModuleBuilder: Could not load filter class: " + cls.getStringValue(), e);
            }
            addClass(classes, clas);
        }
        // see https://issues.apache.org/jira/browse/GERONIMO-3421 .
        // if the user has botched her classloader config (perhaps by
View Full Code Here

            }
            if (handlerChain.getProtocolBindings() != null) {
                serviceRefHandlerChain.setProtocolBindings(handlerChain.getProtocolBindings());
            }
            for (PortComponentHandlerType srcHandler : handlerChain.getHandlerArray()) {
                HandlerType serviceRefHandler = serviceRefHandlerChain.addNewHandler();
                serviceRefHandler.setId(srcHandler.getId());
                //Copy HandlerName
                org.apache.geronimo.xbeans.javaee.String srcHandlerName = srcHandler.getHandlerName();
                org.apache.geronimo.xbeans.javaee6.String desHandlerName = serviceRefHandler.addNewHandlerName();
                desHandlerName.setStringValue(srcHandlerName.getStringValue());
                desHandlerName.setId(srcHandlerName.getId());
                //Copy HandlerClass
                org.apache.geronimo.xbeans.javaee.String srcHandlerClass = srcHandler.getHandlerClass();
                org.apache.geronimo.xbeans.javaee6.String desHandlerClass = serviceRefHandler.addNewHandlerClass();
                desHandlerClass.setId(srcHandlerClass.getId());
                desHandlerClass.setStringValue(srcHandlerClass.getStringValue());
                //Copy DescriptionArray
                for (org.apache.geronimo.xbeans.javaee.DescriptionType srcDescription : srcHandler.getDescriptionArray()) {
                    DescriptionType desDescription = serviceRefHandler.addNewDescription();
                    desDescription.setStringValue(srcDescription.getStringValue());
                    desDescription.setId(srcDescription.getId());
                }
                //Copy InitParamArray
                for (org.apache.geronimo.xbeans.javaee.ParamValueType srcParamValue : srcHandler.getInitParamArray()) {
                    ParamValueType desParamValue = serviceRefHandler.addNewInitParam();
                    srcParamValue.setId(desParamValue.getId());
                    desParamValue.addNewParamName().setStringValue(srcParamValue.getParamName().getStringValue());
                    desParamValue.addNewParamValue().setStringValue(srcParamValue.getParamValue().getStringValue());
                    for (org.apache.geronimo.xbeans.javaee.DescriptionType srcDescription : srcParamValue.getDescriptionArray()) {
                        DescriptionType desDescription = desParamValue.addNewDescription();
                        desDescription.setId(srcDescription.getId());
                        desDescription.setStringValue(srcDescription.getStringValue());
                    }
                }
                //Copy SoapHeaderArray
                for (org.apache.geronimo.xbeans.javaee.XsdQNameType srcSOAPHeader : srcHandler.getSoapHeaderArray()) {
                    XsdQNameType desSOAPHeader = serviceRefHandler.addNewSoapHeader();
                    desSOAPHeader.setId(srcSOAPHeader.getId());
                    desSOAPHeader.setQNameValue(srcSOAPHeader.getQNameValue());
                }
                //Copy SoapRoleArray
                for (org.apache.geronimo.xbeans.javaee.String srcSOAPRole : srcHandler.getSoapRoleArray()) {
                    org.apache.geronimo.xbeans.javaee6.String desSOAPRole = serviceRefHandler.addNewSoapRole();
                    desSOAPRole.setId(srcSOAPRole.getId());
                    desSOAPRole.setStringValue(srcSOAPRole.getStringValue());
                }
            }
        }
View Full Code Here

                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
View Full Code Here

                            EnvEntryTypeValuesType envEntryType = envEntry.addNewEnvEntryType();
                            envEntryType.setStringValue(resourceType.getCanonicalName());
                        }                        
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = envEntry.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <env-entry> optional elements:
View Full Code Here

        String injectionJavaType = getInjectionJavaType(method, field);
        String injectionClass = getInjectionClass(method, field);

        FullyQualifiedClassType qualifiedClass = injectionTarget.addNewInjectionTargetClass();
        JavaIdentifierType javaType = injectionTarget.addNewInjectionTargetName();
        qualifiedClass.setStringValue(injectionClass);
        javaType.setStringValue(injectionJavaType);
    }
View Full Code Here

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
View Full Code Here

        //------------------------------------------------------------------------------
        // <persistence-unit-ref> required elements:
        //------------------------------------------------------------------------------

        // persistence-unit-ref-name
        JndiNameType unitRefName = persistenceUnitRef.addNewPersistenceUnitRefName();
        unitRefName.setStringValue(persistenceUnitRefName);

        //------------------------------------------------------------------------------
        // <persistence-unit-ref> optional elements:
        //------------------------------------------------------------------------------
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.javaee6.HandlerType

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.