Package org.apache.geronimo.common

Examples of org.apache.geronimo.common.DeploymentException


    private final Method method;

    public LightweightOperationDescBuilder(BindingOperation bindingOperation, Method method) throws DeploymentException{
        super(bindingOperation);
        if (bindingOperation == null) {
            throw new DeploymentException("No BindingOperation supplied for method " + method.getName());
        }

        this.method = method;

        operationDesc.setName(operationName);
View Full Code Here


        // Verify we have the right number of args for this method
        Class[] methodParamTypes = method.getParameterTypes();
        List inputParts = input.getOrderedParts(null);
        if (methodParamTypes.length != inputParts.size()) {
            throw new DeploymentException("mismatch in parameter counts: method has " + methodParamTypes.length + " whereas the input message has " + inputParts.size());
        }

        // Map the input parts to method args
        int i = 0;
        for (Iterator parts = inputParts.iterator(); parts.hasNext();) {
            Part part = (Part) parts.next();
            String partName = part.getName();
            QName name = new QName("", partName);
            byte mode = ParameterDesc.IN;
            QName typeQName = part.getTypeName() == null ? part.getElementName() : part.getTypeName();
            Class javaClass = methodParamTypes[i++];
            //lightweight mapping has no parts in headers, so inHeader and outHeader are false
            ParameterDesc parameter = new ParameterDesc(name, mode, typeQName, javaClass, false, false);
            operationDesc.addParameter(parameter);
        }

        // Can't have multiple return values
        if (output != null && output.getParts().size() > 1) {
            throw new DeploymentException("Lightweight mapping has at most one part in the (optional) output message, not: " + output.getParts().size());
        }

        // Map the return message, if there is one
        if (output != null && output.getParts().size() == 1) {
            Part part = (Part) output.getParts().values().iterator().next();
View Full Code Here

        }

        public EjbModule getEjbModule(String moduleId) throws DeploymentException {
            EjbModule ejbModule = ejbModules.get(moduleId);
            if (ejbModule == null) {
                throw new DeploymentException("Ejb  module " + moduleId + " was not found in configured module list " + ejbModules.keySet());
            }
            return ejbModule;
        }
View Full Code Here

        }

        public EjbJarInfo getEjbJar(String moduleId) throws DeploymentException {
            EjbJarInfo ejbJarInfo = ejbJars.get(moduleId);
            if (ejbJarInfo == null) {
                throw new DeploymentException("Ejb jar configuration passed but expected module " +
                        moduleId + " was not found in configured module list " + ejbJars.keySet());
            }
            return ejbJarInfo;
        }
View Full Code Here

            return map;
        } catch (FileNotFoundException e) {
            return Collections.emptyMap();
        } catch (IOException ex) {
            throw new DeploymentException("Unable to read " + wsDDUrl, ex);
        } catch (JAXBException ex) {
            throw new DeploymentException("Unable to parse " + wsDDUrl, ex);
        } catch (Exception ex) {
            throw new DeploymentException("Unknown deployment error", ex);
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                // ignore
View Full Code Here

            try {
                AbstractName sessionManagerName = addSessionManager(clusteringWadiType, webModuleData, moduleContext);
                addSessionHandlerFactory(moduleContext, webModuleData, sessionManagerName);
                addPreHandlerFactory(moduleContext, webModuleData, sessionManagerName);
            } catch (GBeanAlreadyExistsException e) {
                throw new DeploymentException("Duplicate GBean", e);
            }
        }
    }
View Full Code Here

        Configuration configuration = moduleContext.getConfiguration();
        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(), Collections.EMPTY_MAP, Collections.singleton(JettyWebAppContext.class.getName()));
        try {
            return configuration.findGBeanData(webModuleQuery);
        } catch (GBeanNotFoundException e) {
            throw new DeploymentException("Could not locate web module gbean in web app configuration", e);
        }
    }
View Full Code Here

    }

    protected GerClusteringWadiType getWadiClusterConfig(XmlObject container) throws DeploymentException {
        XmlObject[] items = container.selectChildren(CLUSTERING_WADI_QNAME_SET);
        if (items.length > 1) {
            throw new DeploymentException("Unexpected count of clustering elements in geronimo plan " + items.length + " qnameset: " + CLUSTERING_WADI_QNAME_SET);
        }
        if (items.length == 1) {
            return (GerClusteringWadiType) items[0].copy().changeType(GerClusteringWadiType.type);
        }
        return null;
View Full Code Here

     */
    protected static void validateDD(AnnotatedApp annotatedApp) throws DeploymentException {
        try {
            XmlBeansUtil.parse(annotatedApp.toString());
        } catch (XmlException e) {
            throw new DeploymentException("Result of processing web service refs invalid.", e);
        }
    }
View Full Code Here

        GBeanData webServiceContainerFactoryGBean = new GBeanData(webServiceContainerFactoryName, SerializableWebServiceContainerFactoryGBean.GBEAN_INFO);
        webServiceContainerFactoryGBean.setAttribute("webServiceContainer", new MockWebServiceContainer());
        try {
            context.addGBean(webServiceContainerFactoryGBean);
        } catch (GBeanAlreadyExistsException e) {
            throw new DeploymentException("Could not add webServiceContainerFactoryGBean", e);
        }
        targetGBean.setReferencePattern("WebServiceContainerFactory", webServiceContainerFactoryName);
        return true;
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.common.DeploymentException

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.