Package org.apache.openejb.assembler

Examples of org.apache.openejb.assembler.Deployer.undeploy()


        int exitCode = 0;
        for (Object obj : line.getArgList()) {
            String moduleId = (String) obj;

            try {
                deployer.undeploy(moduleId);

                // TODO make this message
                System.out.println(messages.format("cmd.undeploy.successful", moduleId));
            } catch (UndeployException e) {
                // TODO make this message
View Full Code Here


            properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
            properties.setProperty(Context.PROVIDER_URL, "http://" + LOCALHOST + ":" + configuration.getHttpPort() + "/openejb/ejb");
            InitialContext context = new InitialContext(properties);
            File file = moduleIds.get(archive.getName());
            Deployer deployer = (Deployer) context.lookup("openejb/DeployerBusinessRemote");
            deployer.undeploy(file.getAbsolutePath());

            FileUtils.delete(file.getParentFile()); // "i" folder
        } catch (Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to undeploy", e);
View Full Code Here

            for (final AppInfo info : apps) {
                paths.add(info.path);
            }

            if (paths.contains(path)) { // exact matching
                deployer.undeploy(path);
            } else {
                for (final String proposed : paths) { // exact matching + extension
                    if (path.equals(proposed + ".war") || path.equals(proposed + ".ear") || path.equals(proposed + ".jar")) {
                        deployer.undeploy(proposed);
                        return;
View Full Code Here

            if (paths.contains(path)) { // exact matching
                deployer.undeploy(path);
            } else {
                for (final String proposed : paths) { // exact matching + extension
                    if (path.equals(proposed + ".war") || path.equals(proposed + ".ear") || path.equals(proposed + ".jar")) {
                        deployer.undeploy(proposed);
                        return;
                    }
                }
                for (final String proposed : paths) { // just the app/folder name
                    if (proposed.endsWith("/" + path) || proposed.endsWith("\\" + path)) {
View Full Code Here

                        return;
                    }
                }
                for (final String proposed : paths) { // just the app/folder name
                    if (proposed.endsWith("/" + path) || proposed.endsWith("\\" + path)) {
                        deployer.undeploy(proposed);
                        return;
                    }
                }
            }
        } catch (final OpenEJBException e) {
View Full Code Here

                    path = new File(moduleId).getCanonicalPath();
                } catch (IOException e) {
                }
                if (path != null) {
                    try {
                        deployer.undeploy(path);
                        undeployed = true;
                    } catch (NoSuchApplicationException e) {
                    }
                }
View Full Code Here

                    }
                }

                // If that didn't work, undeploy using just the moduleId
                if (!undeployed) {
                    deployer.undeploy(moduleId);
                }

                // TODO make this message
                System.out.println(messages.format("cmd.undeploy.successful", moduleId));
            } catch (UndeployException e) {
View Full Code Here

public class UnDeployMojo extends AbstractDeployMojo {
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        final Deployer deployer = (Deployer) lookup("openejb/DeployerBusinessRemote");
        try {
            deployer.undeploy(path);
        } catch (OpenEJBException e) {
            throw new TomEEException(e.getMessage(), e);
        }
    }
}
View Full Code Here

public class UnDeployMojo extends AbstractDeployMojo {
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        final Deployer deployer = (Deployer) lookup("openejb/DeployerBusinessRemote");
        try {
            deployer.undeploy(path);
        } catch (OpenEJBException e) {
            throw new TomEEException(e.getMessage(), e);
        }
    }
}
View Full Code Here

public class UnDeployMojo extends AbstractDeployMojo {
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        final Deployer deployer = (Deployer) lookup("openejb/DeployerBusinessRemote");
        try {
            deployer.undeploy(path);
        } catch (OpenEJBException e) {
            throw new TomEEException(e.getMessage(), e);
        }
    }
}
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.