Package com.sun.enterprise.deployment.io

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


                ModuleDescriptor aModule = (ModuleDescriptor) modules.next();
                Archivist moduleArchivist = ArchivistFactory.getArchivistForType(aModule.getModuleType());
                if (aModule.getAlternateDescriptor()!=null) {
                    // the application is using alternate deployment descriptors
                    String runtimeDDPath = "sun-" + aModule.getAlternateDescriptor();
                    DeploymentDescriptorFile ddFile = moduleArchivist.getConfigurationDDFile();
                    if (ddFile!=null) {
                        OutputStream os = out.putNextEntry(runtimeDDPath);
                        ddFile.write(aModule.getDescriptor(), os);
                        out.closeEntry();
                    }
                } else {
                    AbstractArchive moduleArchive = out.getEmbeddedArchive(aModule.getArchiveUri());
                    write(aModule.getDescriptor(),  moduleArchivist, moduleArchive);
View Full Code Here


                if (aModule.getAlternateDescriptor()!=null) {
                    // the application is using alternate deployment descriptors

                    // write or copy standard deployment descriptor
                    String ddPath = aModule.getAlternateDescriptor();
                    DeploymentDescriptorFile ddFile =
                        moduleArchivist.getStandardDDFile();           
                    
                    BundleDescriptor bundle =
                            (BundleDescriptor)aModule.getDescriptor();
                    if (!bundle.isFullFlag()) {
                        if (ddFile != null) {
                            OutputStream os = out.putNextEntry(ddPath);
                            ddFile.write(bundle, os);
                            out.closeEntry();
                        }
                    } else {
                        if (aModule.getModuleType().equals(ModuleType.WAR)) {
                            WebBundleDescriptor webBundle =
                                (WebBundleDescriptor) aModule.getDescriptor();
                            if (webBundle.hasWebServices()) {
                                if (ddFile != null) {
                                    OutputStream os = out.putNextEntry(ddPath);
                                    ddFile.write(webBundle, os);
                                    out.closeEntry();
                                }
                            } else {
                                Archivist.copyAnEntry(in, out, ddPath);
                            }
                        } else {
                            Archivist.copyAnEntry(in, out, ddPath);
                        }
                    }

                    String runtimeDDPath = "sun-" + ddPath;
                    DeploymentDescriptorFile confDDFile = moduleArchivist.getConfigurationDDFile();
                    if (confDDFile!=null) {
                        OutputStream os = out.putNextEntry(runtimeDDPath);
                        confDDFile.write(aModule.getDescriptor(), os);
                        out.closeEntry();
                    }
                } else {
                    String archiveUri = in.getArchiveUri();
                    String moduleUri = aModule.getArchiveUri();
View Full Code Here

        try {
            // apply the runtime settings if any
            is = archive.getEntry(ddFileEntryName);

            DeploymentDescriptorFile confDD = new SipRuntimeDDFile();

            if (archive.getArchiveUri() != null) {
                confDD.setErrorReportingString(archive.getArchiveUri());
            }

            if ((is != null) && (confDD != null)) {
                confDD.setXMLValidation(super.getRuntimeXMLValidation());
                confDD.setXMLValidationLevel(super.getRuntimeXMLValidationLevel());
                confDD.read(sbd, is);
            }
        } catch (SAXParseException spe) {
            String msg = newLocalStrings.getString(
                    "enterprise.deployment.backend.sip.saxparseexception") +
                spe.getMessage();
View Full Code Here

        try {
            // apply the runtime settings if any
            is = archive.getEntry(ddFileEntryName);

            DeploymentDescriptorFile confDD = new SipDeploymentDescriptorFile();

            if (archive.getArchiveUri() != null) {
                confDD.setErrorReportingString(archive.getArchiveUri());
            }

            if ((is != null) && (confDD != null)) {
                confDD.setXMLValidation(super.getRuntimeXMLValidation());
                confDD.setXMLValidationLevel(super.getRuntimeXMLValidationLevel());
                SipApplication sipApplication = (SipApplication) confDD.read(is);
                this.sbd = (SipBundleDescriptor) sipApplication.getReferringDescriptor();
            }
        } catch (SAXParseException spe) {
           String msg =
                   newLocalStrings.getString("enterprise.deployment.backend.sip.saxparseexception")
View Full Code Here

        String dd = "unavailable";
        ByteArrayOutputStream out = null;
        try
        {
            final Archivist moduleArchivist = archivistFactory.getArchivist(bundleDesc.getModuleDescriptor().getModuleType());
            final DeploymentDescriptorFile ddFile =  moduleArchivist.getStandardDDFile();
           
            out = new ByteArrayOutputStream();
            ddFile.write(bundleDesc, out);
            final String charsetName = "UTF-8";
            dd = out.toString(charsetName);
        }
        catch( final Exception e )
        {
View Full Code Here

        String dd = "unavailable";
        ByteArrayOutputStream out = null;
        try
        {
            final Archivist moduleArchivist = archivistFactory.getArchivist(bundleDesc.getModuleDescriptor().getModuleType());
            final DeploymentDescriptorFile ddFile =  moduleArchivist.getStandardDDFile();
           
            out = new ByteArrayOutputStream();
            ddFile.write(bundleDesc, out);
            final String charsetName = "UTF-8";
            dd = out.toString(charsetName);
        }
        catch( final Exception e )
        {
View Full Code Here

        String dd = "unavailable";
        ByteArrayOutputStream out = null;
        try
        {
            final Archivist moduleArchivist = archivistFactory.getArchivist(bundleDesc.getModuleDescriptor().getModuleType());
            final DeploymentDescriptorFile ddFile =  moduleArchivist.getStandardDDFile();
           
            out = new ByteArrayOutputStream();
            ddFile.write(bundleDesc, out);
            final String charsetName = "UTF-8";
            dd = out.toString(charsetName);
        }
        catch( final Exception e )
        {
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

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.