Package com.sun.enterprise.deployment.io

Examples of com.sun.enterprise.deployment.io.DeploymentDescriptorFile


        T desc = getDescriptor();

        // Runtime DDs
        if (isHandlingRuntimeInfo()) {
            DeploymentDescriptorFile confDD = getWLConfigurationDDFile();
            if (confDD != null) {
                OutputStream os = out.putNextEntry(
                        confDD.getDeploymentDescriptorPath());
                confDD.write(desc, os);
                out.closeEntry();
            }
        }

        // only bundle descriptor can have web services
View Full Code Here


        InputStream is = null;
        InputStream is2 = null;
        try {
            // apply the runtime settings if any
            is = archive.getEntry(ddFileEntryName);
            DeploymentDescriptorFile confDD = getConfigurationDDFile();
            if (archive.getURI() != null) {
                confDD.setErrorReportingString(archive.getURI().getSchemeSpecificPart());
            }

            DeploymentDescriptorFile sunConfDD = getSunConfigurationDDFile();
            if (sunConfDD != null) {
                is2 = archive.getEntry(sunConfDD.getDeploymentDescriptorPath());
            }

            if (is != null && confDD != null) {
                if (is2 != null && warnIfMultipleDDs) {
                    logger.log(Level.WARNING, "gf.counterpart.configdd.exists",
                        new Object[] {
                        sunConfDD.getDeploymentDescriptorPath(),
                        archive.getURI().getSchemeSpecificPart(),
                        ddFileEntryName});
                }
                confDD.setXMLValidation(getRuntimeXMLValidation());
                confDD.setXMLValidationLevel(runtimeValidationLevel);
                confDD.read(descriptor, is);
            } else {
                // try to read from the legacy sun deployment descriptor
                if (is2 != null && sunConfDD != null) {
                    logger.log(Level.FINE, "sun.configdd.deprecate",
                        new Object[] {
                        sunConfDD.getDeploymentDescriptorPath(),
                        archive.getURI().getSchemeSpecificPart(),
                        ddFileEntryName});

                    if (archive.getURI() != null) {
                        sunConfDD.setErrorReportingString(
                            archive.getURI().getSchemeSpecificPart());
                    }
                    sunConfDD.setXMLValidation(getRuntimeXMLValidation());
                    sunConfDD.setXMLValidationLevel(runtimeValidationLevel);
                    sunConfDD.read(descriptor, is2);
                }
            }
        } finally {
            if (is != null) {
                try {
View Full Code Here

            throws IOException, SAXParseException {

        InputStream is = null;
        try {
            is = planArchive.getEntry(entry);
            DeploymentDescriptorFile confDD = getConfigurationDDFile();
            if (is != null && confDD != null) {
                if (planArchive.getURI() != null) {
                    confDD.setErrorReportingString(planArchive.getURI().getSchemeSpecificPart());
                }
                confDD.setXMLValidation(getXMLValidation());
                confDD.read(descriptor, is);
            }
        } finally {
            if (is != null) {
                try {
                    is.close();
View Full Code Here

        T desc = getDescriptor();

        // Runtime DDs
        if (isHandlingRuntimeInfo()) {
            DeploymentDescriptorFile confDD = getConfigurationDDFile();
            if (confDD != null) {
                OutputStream os = out.putNextEntry(getRuntimeDeploymentDescriptorPath());
                confDD.write(desc, os);
                out.closeEntry();
            }

                // Legacy Sun Runtime DDs
                DeploymentDescriptorFile sunConfDD = getSunConfigurationDDFile();
                if (sunConfDD != null) {
                    OutputStream os = out.putNextEntry(
                            sunConfDD.getDeploymentDescriptorPath());
                    sunConfDD.write(desc, os);
                    out.closeEntry();
                }
            }
        }
View Full Code Here

        T desc = getDescriptor();

        // Runtime DDs
        if (isHandlingRuntimeInfo()) {
            DeploymentDescriptorFile confDD = getWLConfigurationDDFile();
            if (confDD != null) {
                OutputStream os = out.putNextEntry(
                        confDD.getDeploymentDescriptorPath());
                confDD.write(desc, os);
                out.closeEntry();
            }
        }

        // only bundle descriptor can have web services
View Full Code Here

     * writes de configuration deployment descriptor to a new XML file
     *
     * @param os stream to write the configuration deployment descriptors
     */
    public void writeRuntimeDeploymentDescriptors(OutputStream os) throws IOException {
        DeploymentDescriptorFile confDD = getConfigurationDDFile();
        if (confDD != null) {
            confDD.write(getDescriptor(), os);
        }
    }
View Full Code Here

     * @param out the output archive
     */
    protected void writeWebServicesDescriptors(BundleDescriptor desc, WritableArchive out)
            throws IOException {
        if (desc.hasWebServices()) {
            DeploymentDescriptorFile webServicesDD = getWebServicesDDFile(desc);
            OutputStream os = out.putNextEntry(webServicesDD.getDeploymentDescriptorPath());
            webServicesDD.write(desc, os);
            out.closeEntry();
        }
    }
View Full Code Here

     * @param out the output archive
     */
    private void writeWLWebServicesDescriptors(BundleDescriptor desc, WritableArchive out)
            throws IOException {
        if (desc.hasWebServices()) {
            DeploymentDescriptorFile webServicesDD = new WLWebServicesDeploymentDescriptorFile(desc.getWebServices());
            OutputStream os = out.putNextEntry(webServicesDD.getDeploymentDescriptorPath());
            webServicesDD.write(desc.getWebServices(), os);
            out.closeEntry();
        }
    }
View Full Code Here

    /**
     * @return the location of the runtime deployment descriptor file
     *         for a particular type of J2EE Archive
     */
    public String getRuntimeDeploymentDescriptorPath() {
        DeploymentDescriptorFile ddFile = getConfigurationDDFile();
        if (ddFile != null) {
            return ddFile.getDeploymentDescriptorPath();
        } else {
            return null;
        }
    }
View Full Code Here

        // only bundle descriptor can have web services
        if (desc instanceof BundleDescriptor) {
            BundleDescriptor desc2 = (BundleDescriptor) desc;
            if (desc2.hasWebServices()) {
                DeploymentDescriptorFile webServicesDD =
                        getWebServicesDDFile((BundleDescriptor) desc2);
                String anEntry = webServicesDD.getDeploymentDescriptorPath();
                copyAnEntry(in, out, anEntry);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.io.DeploymentDescriptorFile

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.