Package org.jboss.as.ee.deployment.spi

Examples of org.jboss.as.ee.deployment.spi.DeploymentMetaData


        URL descriptorURL = getClass().getClassLoader().getResource("jsr88/" + jbossDescriptorName);
        File jbossDescriptorFile = new File(descriptorURL.getPath());
        JarUtils.addJarEntry(plan, "!/" + jbossDescriptorName, new FileInputStream(jbossDescriptorFile));

        // Setup deployment plan meta data with propriatary descriptor
        DeploymentMetaData metaData = new DeploymentMetaData(deploymentFile);

        String[] strs = jbossDescriptorName.split("/");
        metaData.addEntry(deploymentFile, strs[strs.length - 1]);

        // Add the meta data to the deployment plan
        String metaStr = metaData.toXMLString();
        JarUtils.addJarEntry(plan, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));

        plan.flush();
        plan.close();
View Full Code Here


        URL descriptorURL = getClass().getClassLoader().getResource(DeploymentTestCase.class.getPackage().getName().replace(".", "/") + "/" + jbossDescriptorName);
        File jbossDescriptorFile = new File(descriptorURL.getPath());
        JarUtils.addJarEntry(plan, "!/" + (webInf ? "WEB-INF/" : "META-INF/") + jbossDescriptorName, new FileInputStream(jbossDescriptorFile));

        // Setup deployment plan meta data with propriatary descriptor
        DeploymentMetaData metaData = new DeploymentMetaData(deploymentFile);

        metaData.addEntry(deploymentFile, jbossDescriptorName);

        // Add the meta data to the deployment plan
        String metaStr = metaData.toXMLString();
        JarUtils.addJarEntry(plan, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));

        plan.flush();
        plan.close();
View Full Code Here

    public void save(OutputStream stream) throws ConfigurationException {
        JarOutputStream jos;

        // Setup deployment plan meta data with proprietary descriptor (jboss-web.xml)
        DeploymentMetaData metaData = new DeploymentMetaData("WRONG.war");

        try {
            jos = new JarOutputStream(stream);
        } catch (Exception e) {
            return;
        }
        if (jos == null)
            return;

        Iterator setIterator = configBeans.keySet().iterator();
        while (setIterator.hasNext()) {
            String key = (String) setIterator.next();
            JBossConfigBeanProxy val = (JBossConfigBeanProxy) configBeans.get(key);
            val.save(jos, metaData);
        }
        String metaStr = metaData.toXMLString();
        try {
            JarUtils.addJarEntry(jos, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));
            jos.flush();
            jos.close();
        } catch (Exception e) {
View Full Code Here

    public void save(OutputStream stream) throws ConfigurationException {
        JarOutputStream jos = null;

        // Setup deployment plan meta data with propriatary descriptor (jboss-web.xml)
        DeploymentMetaData metaData = new DeploymentMetaData("WRONG.war");

        try {
            jos = new JarOutputStream(stream);
        } catch (Exception e) {
            return;
        }
        if (jos == null)
            return;

        Iterator setIterator = configBeans.keySet().iterator();
        while (setIterator.hasNext()) {
            String key = (String) setIterator.next();
            JBossConfigBeanProxy val = (JBossConfigBeanProxy) configBeans.get(key);
            val.save(jos, metaData);
        }
        try {
            String metaStr = metaData.toXMLString();
            JarUtils.addJarEntry(jos, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));
            jos.flush();
            jos.close();
        } catch (Exception e) {
            System.out.println("config IO exception error: " + e.getMessage());
View Full Code Here

TOP

Related Classes of org.jboss.as.ee.deployment.spi.DeploymentMetaData

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.