Examples of IArchive


Examples of org.eclipse.dltk.core.IArchive

                                   */);
        }

        if (pharFile == null || !pharFile.exists())
          return true;
        IArchive archive = null;
        if (PHPToolkitUtil.PHAR_EXTENSTION.equals(extension)) {
          archive = new PharArchiveFile(pharFile);
        } else if (PHPToolkitUtil.ZIP_EXTENSTION.equals(extension)) {
          archive = new ZipArchiveFile(pharFile);
        } else if (PHPToolkitUtil.TAR_EXTENSTION.equals(extension)
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

     */
    public static void enhance(final List<String> classesToEnhance, final TYPE type) throws Exception {

        ClassLoader loader = Thread.currentThread().getContextClassLoader();

        IArchive archive = new ArchiveInMemory(loader, classesToEnhance);

        EasyBeansEjbJarDeployableFactory deployableFactory = new EasyBeansEjbJarDeployableFactory();
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = deployableFactory
                .createDeployableMetadata(EJB3Deployable.class.cast(DeployableHelper.getDeployable(archive)));

View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

        // Get metadata for jar file analyzed
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = deployment.getEjbJarArchiveMetadata();

        // Get Archive
        IArchive archive = deployment.getArchive();

        // Extract URL from archive
        URL url;
        try {
            url = archive.getURL();
        } catch (ArchiveException e) {
            throw new IllegalStateException("Cannot get the URL on the archive '" + archive + "'.", e);
        }

        EZBNamingStrategy namingStrategy = null;
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

                    // Cleanup the previous failure and try again the deployment
                    this.failed.remove(f);
                }

                // Else, get the deployable
                IArchive archive = ArchiveManager.getInstance().getArchive(f);
                if (archive == null) {
                    this.logger.warn("Ignoring invalid file ''{0}''", f);
                    continue;
                }
                IDeployable<?> deployable;
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

                    this.deployed.remove(f);
                    this.failed.add(f);
                }

                // Get a new deployable
                IArchive archive = ArchiveManager.getInstance().getArchive(f);
                if (archive == null) {
                    this.logger.warn("Ignoring invalid file ''{0}''", f);
                    continue;
                }
                IDeployable<?> newDeployable;
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

     * @param container the container to monitor.
     */
    protected void checkContainer(final EZBContainer container) {

        // get archive
        IArchive archive = container.getArchive();

        // Get URL
        URL url = null;
        try {
            url = archive.getURL();
        } catch (ArchiveException e1) {
            this.logger.warn("Cannot get URL on the container {0}", archive.getName());
            return;
        }
        File file = urlToFile(url);
        // No file archive, means that it has been removed
        if (!file.exists()) {
            this.logger.info("Archive ''{0}'' has been removed, then the associated EJB3 container is stopping", archive
                    .getName());
            try {
                container.stop();
                getEmbedded().removeContainer(container);
            } finally {
                this.deployed.remove(file);
            }

            return;
        }

        // container was modified, need to relaunch it
        if (hasBeenUpdated(file)) {
            this.logger.info("Container with archive {0} was modified. Reloading...", archive.getName());
            try {
                container.stop();
                getEmbedded().removeContainer(container);
            } finally {
                this.deployed.remove(file);
            }
            try {
                container.start();
                getEmbedded().addContainer(container);
            } catch (EZBContainerException e) {
                this.deployed.remove(file);
                this.logger.error("Error while restarting archive {0}.", archive.getName(), e);
            }
        }

    }
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

        if (!file.exists()) {
            throw new RuntimeException("The file '" + fileName + "' is not present on the filesystem.");
        }

        // Else, get the deployable
        IArchive archive = ArchiveManager.getInstance().getArchive(file);
        if (archive == null) {
            logger.error("No archive found for the invalid file ''{0}''", file);
            throw new RuntimeException("No archive found for the invalid file '" + file + "'.");
        }
        IDeployable<?> deployable;
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

     * @param file File to undeploy
     * @return The archive created in order to identify the resource, or
     *         null if error
     */
    protected IArchive removeArchiveIfDeployed(final File file) {
        IArchive archive = ArchiveManager.getInstance().getArchive(file);
        if (archive != null) {
            EZBContainer container = this.server.findContainer(archive);
            if (container != null) {
                this.server.removeContainer(container);
            }
View Full Code Here

Examples of org.ow2.util.archive.api.IArchive

    public void deployArchive(final String filename) {
        IDeployerManager deployer = this.server.getDeployerManager();
        if (deployer != null) {
            File file = new File(filename);
            try {
                IArchive archive = removeArchiveIfDeployed(file);

                if (archive != null) {
                    IDeployable deployable = DeployableHelper.getDeployable(archive);
                    if (deployable instanceof EJBDeployable || deployable instanceof EARDeployable) {
                        deployer.deploy(deployable);
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.