Package com.sun.enterprise.deployment.deploy.shared

Examples of com.sun.enterprise.deployment.deploy.shared.FileArchive.open()


            if (isDeploy) {
                // If this is deployment scenario, we should process JavaEE
                // annotations and all deployment descriptors should be loaded
                // from module root directory

                archive.open(moduleRootDirectory.getAbsolutePath());
                Archivist moduleArchivist =
                    ArchivistFactory.getArchivistForArchive(archive);
                moduleArchivist.setAnnotationProcessingRequested(true);
                moduleArchivist.setClassLoader(moduleClassLoader);
                return ApplicationArchivist.openArchive(moduleArchivist,
View Full Code Here


                // process JavaEE annotations again. The application
                // deployment descriptors will be loaded from
                // moduleScratchDirectory and persistence descriptors from
                // moduleRootDirectory

                archive.open(moduleScratchDirectory.getAbsolutePath());
                Archivist moduleArchivist =
                    ArchivistFactory.getArchivistForArchive(archive);
                ClassLoader tcl = (moduleClassLoader instanceof InstrumentableClassLoader) ?  InstrumentableClassLoader.class.cast(moduleClassLoader).copy() : moduleClassLoader;
                moduleArchivist.setClassLoader(tcl);
                Application application = ApplicationArchivist.openArchive(
View Full Code Here

                }
                // we need to read persistence descriptors separately
                // because they are read from appDir as oppsed to xmlDir.
                FileArchive archive2 = new FileArchive();
                try {
                    archive2.open(moduleRootDirectory.getAbsolutePath());
                    ApplicationArchivist.readPersistenceDeploymentDescriptorsRecursively(archive2, application);
                } finally {
                    archive2.close();
                }
                return application;
View Full Code Here

      ConnectorArchivist connectorArchivist = new ConnectorArchivist();
      connectorArchivist.setXMLValidation(validateXml);
            connectorArchivist.setClassLoader(cl);
     
            FileArchive archive = new FileArchive();
            archive.open(modDir);
            // Try to load the app from the serialized descriptor file.
            SerializedDescriptorHelper.Loader sdLoader = SerializedDescriptorHelper.load(modId, this);
            Application deserializedApplication = sdLoader.getApplication();
            if (deserializedApplication != null) {
                application = deserializedApplication;
View Full Code Here

            String moduleDir ) {

  ConnectorDescriptor connectorDescriptor = null ;
        FileArchive fa = new FileArchive();
  try {
            fa.open( moduleDir )// directory where rar is exploded
            ConnectorArchivist archivist = new ConnectorArchivist();
            connectorDescriptor = (ConnectorDescriptor)
            archivist.open(fa);
  } catch( Exception ioe ) {
      ioe.printStackTrace();
View Full Code Here

                SerializedDescriptorHelper.load(appID, this);
        try {
            // partially load the deployment descriptor...
            ApplicationArchivist archivist = new ApplicationArchivist();
            FileArchive appArchive = new FileArchive();
            appArchive.open(getLocation(appID));

            //for upgrade senario, we still load from the original
            //application repository for application.xml first
            if (!archivist.hasStandardDeploymentDescriptor(appArchive)) {
                //read from generated/xml location
View Full Code Here

            //for upgrade senario, we still load from the original
            //application repository for application.xml first
            if (!archivist.hasStandardDeploymentDescriptor(appArchive)) {
                //read from generated/xml location
                appArchive.open(getGeneratedXMLLocation(appID));
            }

            deserializedApplication = sdLoader.getApplication();
            if (deserializedApplication != null &&
                sdLoader.lastModified() > DOLLoadingContext.defaultWebXMLLastModified()) {
View Full Code Here

        AbstractArchive moduleArchive = null;
        String key = null;
        String keyPrefix = null;

        FileArchive archive = new FileArchive();
        archive.open(RelativePathResolver.resolvePath(
                        getGeneratedAppLocation(request)));

        for (Iterator it = app.getWebServiceDescriptors().iterator();
                it.hasNext();) {
            WebService webService = (WebService) it.next();
View Full Code Here

    private static void createJar(String sourcePath, String destinationPath)
            throws IOException {
        FileArchive source = new FileArchive();
        OutputJarArchive destination = new OutputJarArchive();
        try {
            source.open(sourcePath);
            destination.create(destinationPath);
            for (Enumeration entries = source.entries();
                 entries.hasMoreElements();) {
                String entry = String.class.cast(entries.nextElement());
                InputStream is = null;
View Full Code Here

    private void createJar(String sourcePath, String destinationPath)
    throws IOException {
        FileArchive source = new FileArchive();
        OutputJarArchive destination = new OutputJarArchive();
        try {
            source.open(sourcePath);
            Enumeration entries = source.entries();
            destination.create(destinationPath);
            while(entries.hasMoreElements()) {
                String entry = String.class.cast(entries.nextElement());
                InputStream is = null;
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.