Package org.jboss.as.cmp.jdbc.metadata

Examples of org.jboss.as.cmp.jdbc.metadata.JDBCApplicationMetaData


                    throw unexpectedElement(reader);
                }
            }
        }

        return new JDBCApplicationMetaData(application, defaults);
    }
View Full Code Here


        inputFactory.setXMLResolver(NoopXMLResolver.create());
        XMLStreamReader xmlReader = null;


        // 1.  Create the initial JDBC App
        JDBCApplicationMetaData jdbcMetaData = new JDBCApplicationMetaData(jarMetaData, module.getClassLoader());

        // 2.  Merge in the defaults from standardjbosscmp-jdbc.xml
        InputStream inputStream = null;
        try {
            inputStream = this.getClass().getClassLoader().getResourceAsStream("standardjbosscmp-jdbc.xml");
            xmlReader = inputFactory.createXMLStreamReader(inputStream);
            jdbcMetaData = JDBCMetaDataParser.parse(xmlReader, jdbcMetaData);
        } catch (Exception e) {
            throw CmpMessages.MESSAGES.failedToParse("standardjbosscmp-jdbc.xml", e);
        } finally {
            VFSUtils.safeClose(inputStream);
        }

        // 3.  Merge in the app provided from jbosscmp-jdbc.xml
        final VirtualFile deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT).getRoot();
        // Locate the descriptor
        final VirtualFile descriptor = deploymentRoot.getChild("META-INF/jbosscmp-jdbc.xml");
        JDBCApplicationMetaData deploymentJdbcApplicationMetaData = null;
        if (descriptor != null && descriptor.exists()) {
            try {
                inputStream = descriptor.openStream();
                xmlReader = inputFactory.createXMLStreamReader(inputStream);
                jdbcMetaData = JDBCMetaDataParser.parse(xmlReader, jdbcMetaData);
View Full Code Here

                    throw unexpectedElement(reader);
                }
            }
        }

        return new JDBCApplicationMetaData(application, defaults);
    }
View Full Code Here

    protected void handleAnnotations(DeploymentUnit deploymentUnit, EEApplicationClasses applicationClasses, DeploymentReflectionIndex deploymentReflectionIndex, Class<?> componentClass, CmpEntityBeanComponentDescription description) throws DeploymentUnitProcessingException {
        // No-op
    }

    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final CmpEntityBeanComponentDescription description) throws DeploymentUnitProcessingException {
        final JDBCApplicationMetaData applicationMetaData = deploymentUnit.getAttachment(Attachments.JDBC_APPLICATION_KEY);
        if(applicationMetaData == null) {
            return;
        }

        final JDBCEntityMetaData entityMetaData = applicationMetaData.getBeanByEjbName(description.getEJBName());
        if(entityMetaData == null) {
            throw new DeploymentUnitProcessingException("No entity metadata for EntityBean: " + description.getEJBName());
        }
        description.setEntityMetaData(entityMetaData);
    }
View Full Code Here

        inputFactory.setXMLResolver(NoopXmlResolver.create());
        XMLStreamReader xmlReader = null;


        // 1.  Create the initial JDBC App
        JDBCApplicationMetaData jdbcMetaData = new JDBCApplicationMetaData(jarMetaData, module.getClassLoader());

        // 2.  Merge in the defaults from standardjbosscmp-jdbc.xml
        InputStream inputStream = null;
        try {
            inputStream = this.getClass().getClassLoader().getResourceAsStream("standardjbosscmp-jdbc.xml");
            xmlReader = inputFactory.createXMLStreamReader(inputStream);
            jdbcMetaData = JDBCMetaDataParser.parse(xmlReader, jdbcMetaData);
        } catch (Exception e) {
            throw new DeploymentUnitProcessingException("Failed to parse 'standardjbosscmp-jdbc.xml'", e);
        } finally {
            VFSUtils.safeClose(inputStream);
        }

        // 3.  Merge in the app provided from jbosscmp-jdbc.xml
        final VirtualFile deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT).getRoot();
        // Locate the descriptor
        final VirtualFile descriptor = deploymentRoot.getChild("META-INF/jbosscmp-jdbc.xml");
        JDBCApplicationMetaData deploymentJdbcApplicationMetaData = null;
        if (descriptor != null && descriptor.exists()) {
            try {
                inputStream = descriptor.openStream();
                xmlReader = inputFactory.createXMLStreamReader(inputStream);
                jdbcMetaData = JDBCMetaDataParser.parse(xmlReader, jdbcMetaData);
View Full Code Here

        inputFactory.setXMLResolver(NoopXMLResolver.create());
        XMLStreamReader xmlReader = null;


        // 1.  Create the initial JDBC App
        JDBCApplicationMetaData jdbcMetaData = new JDBCApplicationMetaData(jarMetaData, module.getClassLoader());

        // 2.  Merge in the defaults from standardjbosscmp-jdbc.xml
        InputStream inputStream = null;
        try {
            inputStream = this.getClass().getClassLoader().getResourceAsStream("standardjbosscmp-jdbc.xml");
            xmlReader = inputFactory.createXMLStreamReader(inputStream);
            jdbcMetaData = JDBCMetaDataParser.parse(xmlReader, jdbcMetaData);
        } catch (Exception e) {
            throw new DeploymentUnitProcessingException("Failed to parse 'standardjbosscmp-jdbc.xml'", e);
        } finally {
            VFSUtils.safeClose(inputStream);
        }

        // 3.  Merge in the app provided from jbosscmp-jdbc.xml
        final VirtualFile deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT).getRoot();
        // Locate the descriptor
        final VirtualFile descriptor = deploymentRoot.getChild("META-INF/jbosscmp-jdbc.xml");
        JDBCApplicationMetaData deploymentJdbcApplicationMetaData = null;
        if (descriptor != null && descriptor.exists()) {
            try {
                inputStream = descriptor.openStream();
                xmlReader = inputFactory.createXMLStreamReader(inputStream);
                jdbcMetaData = JDBCMetaDataParser.parse(xmlReader, jdbcMetaData);
View Full Code Here

                    throw unexpectedElement(reader);
                }
            }
        }

        return new JDBCApplicationMetaData(application, defaults);
    }
View Full Code Here

    protected void handleAnnotations(DeploymentUnit deploymentUnit, EEApplicationClasses applicationClasses, DeploymentReflectionIndex deploymentReflectionIndex, Class<?> componentClass, CmpEntityBeanComponentDescription description) throws DeploymentUnitProcessingException {
        // No-op
    }

    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final CmpEntityBeanComponentDescription description) throws DeploymentUnitProcessingException {
        final JDBCApplicationMetaData applicationMetaData = deploymentUnit.getAttachment(Attachments.JDBC_APPLICATION_KEY);
        if(applicationMetaData == null) {
            return;
        }

        final JDBCEntityMetaData entityMetaData = applicationMetaData.getBeanByEjbName(description.getEJBName());
        if(entityMetaData == null) {
            throw CmpMessages.MESSAGES.noEntityMetaDataForEntity(description.getEJBName());
        }
        description.setEntityMetaData(entityMetaData);
    }
View Full Code Here

        inputFactory.setXMLResolver(NoopXMLResolver.create());
        XMLStreamReader xmlReader = null;


        // 1.  Create the initial JDBC App
        JDBCApplicationMetaData jdbcMetaData = new JDBCApplicationMetaData(jarMetaData, module.getClassLoader());

        // 2.  Merge in the defaults from standardjbosscmp-jdbc.xml
        InputStream inputStream = null;
        try {
            inputStream = this.getClass().getClassLoader().getResourceAsStream("standardjbosscmp-jdbc.xml");
View Full Code Here

TOP

Related Classes of org.jboss.as.cmp.jdbc.metadata.JDBCApplicationMetaData

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.