Examples of ConnectorDocument


Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

                SchemaConversionUtils.validateDD(connectorDoc);
                specConnnector = connectorDoc.getConnector();
            } catch (XmlException ignore) {
                // that didn't work try 1.5
                try {
                    ConnectorDocument connectorDoc = ConnectorDocument.Factory.parse(callback.getRaDD());
                    SchemaConversionUtils.validateDD(connectorDoc);
                    specConnnector = connectorDoc.getConnector();
                } catch (XmlException e) {
                    throw new DeploymentException("Unable to parse " +
                        (null == module.getAltSpecDD() ?
                            "META-INF/ra.xml":
                                module.getAltSpecDD().toString()), e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

    private XmlOptions xmlOptions;
    private List errors;

    public void testLoadJ2eeDeploymentDescriptor() throws Exception {
        InputStream j2eeInputStream = j2eeDD.openStream();
        ConnectorDocument connectorDocument = ConnectorDocument.Factory.parse(j2eeInputStream);
        assertNotNull(connectorDocument.getConnector().getResourceadapter());
        if (!connectorDocument.validate(xmlOptions)) {
            fail(errors.toString());
        }
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

    }

    public void testLoadJ2eeDeploymentDescriptor() throws Exception {
        URL srcXml = classLoader.getResource("connector_1_5/ra.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        ConnectorDocument connectorDocument = (ConnectorDocument) plan.changeType(ConnectorDocument.type);
        assertNotNull(connectorDocument.getConnector().getResourceadapter());
        XmlBeansUtil.validateDD(connectorDocument);
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

        }
        //we found ra.xml, if it won't parse it's an error.
        try {
            // parse it
            XmlObject xmlObject = XmlBeansUtil.parse(specDD);
            ConnectorDocument connectorDoc = convertToConnectorSchema(xmlObject);
            connector = connectorDoc.getConnector();
        } catch (XmlException e) {
            throw new DeploymentException("Could not parse ra.xml descriptor", e);
        }
        GerConnectorType gerConnector = null;
        try {
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

    public void testLoadJ2eeDeploymentDescriptor() throws Exception {
        File j2eeDD = new File(basedir, "src/test-data/connector_1_5/ra.xml");
        assertTrue(j2eeDD.exists());
        XmlObject plan = XmlBeansUtil.parse(j2eeDD.toURL());
        ConnectorDocument connectorDocument = (ConnectorDocument) plan.changeType(ConnectorDocument.type);
        assertNotNull(connectorDocument.getConnector().getResourceadapter());
        SchemaConversionUtils.validateDD(connectorDocument);
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

        }
        //we found ra.xml, if it won't parse it's an error.
        try {
            // parse it
            XmlObject xmlObject = XmlBeansUtil.parse(specDD);
            ConnectorDocument connectorDoc = SchemaConversionUtils.convertToConnectorSchema(xmlObject);
            connector = connectorDoc.getConnector();
        } catch (XmlException e) {
            throw new DeploymentException("Could not parse ra.xml descriptor", e);
        }
        GerConnectorType gerConnector = null;
        try {
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

        }
        //we found ra.xml, if it won't parse it's an error.
        try {
            // parse it
            XmlObject xmlObject = XmlBeansUtil.parse(specDD);
            ConnectorDocument connectorDoc = convertToConnectorSchema(xmlObject);
            connector = connectorDoc.getConnector();
        } catch (XmlException e) {
            throw new DeploymentException("Could not parse ra.xml descriptor", e);
        }
        GerConnectorType gerConnector = null;
        try {
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

        }
        //we found ra.xml, if it won't parse it's an error.
        try {
            // parse it
            XmlObject xmlObject = SchemaConversionUtils.parse(specDD);
            ConnectorDocument connectorDoc = SchemaConversionUtils.convertToConnectorSchema(xmlObject);
            connector = connectorDoc.getConnector();
        } catch (XmlException e) {
            throw new DeploymentException("Could not parse ra.xml descriptor", e);
        }
        GerConnectorType gerConnector = null;
        try {
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument

    public void testLoadJ2eeDeploymentDescriptor() throws Exception {
        File j2eeDD = new File(basedir, "src/test-data/connector_1_5/ra.xml");
        assertTrue(j2eeDD.exists());
        XmlObject plan = SchemaConversionUtils.parse(j2eeDD.toURL());
        ConnectorDocument connectorDocument = (ConnectorDocument) plan.changeType(ConnectorDocument.type);
        assertNotNull(connectorDocument.getConnector().getResourceadapter());
        SchemaConversionUtils.validateDD(connectorDocument);
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.connector_1_0.ConnectorDocument

    public RAR_1_0ConfigBuilder(Kernel kernel, Repository repository, ObjectName connectionTrackerNamePattern) {
        super(kernel, repository, connectionTrackerNamePattern);
    }

    protected XmlObject getConnectorDocument(JarInputStream jarInputStream) throws XmlException, IOException, DeploymentException {
        ConnectorDocument connectorDocument = ConnectorDocument.Factory.parse(new UnclosableInputStream(jarInputStream));
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setLoadLineNumbers();
        Collection errors = new ArrayList();
        xmlOptions.setErrorListener(errors);
        if (!connectorDocument.validate(xmlOptions)) {
            throw new DeploymentException("Invalid deployment descriptor: errors: " + errors);
        }
        return connectorDocument;
    }
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.