Examples of Deployer


Examples of com.sun.enterprise.deployment.backend.Deployer

        // redeploys the app if already deployed
        req.setForced(true);

        // does the actual deployment
        Deployer deployer = DeployerFactory.getDeployer(req);
        deployer.doRequest();

        // any clean up other than cleaner thread invocation
        deployer.cleanup();

        return req;
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.Deployer

    }

    protected final synchronized void deployFile( final String name, final File file )
        throws Exception
    {
        final Deployer deployer = (Deployer)getEmbeddorComponent( Deployer.ROLE );
        deployer.deploy( name, file.toURL() );
    }
View Full Code Here

Examples of org.apache.axis2.deployment.Deployer

                try {
                    deployerClass = bundleContext.getBundle().loadClass(deployerConfig.getClassStr());
                } catch (ClassNotFoundException e) {
                    deployerClass = Class.forName(deployerConfig.getClassStr());
                }
                Deployer deployer = (Deployer) deployerClass.newInstance();
                String directory = deployerConfig.getDirectory();
                String extension = deployerConfig.getExtension();
                deployer.setDirectory(directory);
                deployer.setExtension(extension);

                Dictionary propsMap = new Hashtable(2);
                propsMap.put(DeploymentConstants.DIRECTORY, directory);
                propsMap.put(DeploymentConstants.EXTENSION, extension);
                propsMap.put(CarbonConstants.AXIS2_CONFIG_SERVICE, Deployer.class.getName());
View Full Code Here

Examples of org.apache.catalina.Deployer

        if (appl==null) {

            if (Constants.DEBUG)
                logger.debug("No application for \""+applPath+"\"");

            Deployer deployer=(Deployer)host;
            File file=new File(applName);
            if (!file.isAbsolute()) {
                file=new File(host.getAppBase()+File.separator+applName);
                if (!file.isAbsolute()) {
                     file=new File(System.getProperty("catalina.base"),
                                  host.getAppBase()+File.separator+applName);
                }
            }

            if (!file.exists()) {
                logger.log("Cannot find \""+file.getPath()+"\" for appl. \""+
                           applName+"\" host \""+host.getName()+"\"");
                return(null);
            }

            String path=file.getCanonicalPath();
            URL url=new URL("file",null,path);
            if (path.toLowerCase().endsWith(".war"))
                url=new URL("jar:"+url.toString()+"!/");

            if (Constants.DEBUG)
                logger.debug("Application URL \""+url.toString()+"\"");

            deployer.install(applPath, url);
            StandardContext context=null;
            context=(StandardContext)deployer.findDeployedApp(applPath);
            context.setDebug(connection.getConnector().getDebug());
            return(context);
        } else {
            if (Constants.DEBUG)
                logger.debug("Found application for \""+appl.getName()+"\"");
View Full Code Here

Examples of org.apache.catalina.Deployer

        if (appl==null) {

            if (Constants.DEBUG)
                logger.debug("No application for \""+applPath+"\"");

            Deployer deployer=(Deployer)host;
            File file=new File(host.getAppBase()+File.separator+applName);
            if (!file.isAbsolute()) {
                file=new File(System.getProperty("catalina.base"),
                              host.getAppBase()+File.separator+applName);
            }

            if (!file.exists()) {
                logger.log("Cannot find \""+file.getPath()+"\" for appl. \""+
                           applName+"\" host \""+host.getName()+"\"");
                return(null);
            }

            String path=file.getCanonicalPath();
            URL url=new URL("file",null,path);
            if (path.toLowerCase().endsWith(".war"))
                url=new URL("jar:"+url.toString()+"!/");

            if (Constants.DEBUG)
                logger.debug("Application URL \""+url.toString()+"\"");

            deployer.install(applPath, url);
            StandardContext context=null;
            context=(StandardContext)deployer.findDeployedApp(applPath);
            context.setDebug(connection.getConnector().getDebug());
            return(context);
        } else {
            if (Constants.DEBUG)
                logger.debug("Found application for \""+appl.getName()+"\"");
View Full Code Here

Examples of org.apache.catalina.Deployer

    protected void checkWebXmlLastModified() {

        if (!(host instanceof Deployer))
            return;

        Deployer deployer = (Deployer) host;

        String[] contextNames = deployer.findDeployedApps();

        for (int i = 0; i < contextNames.length; i++) {

            String contextName = contextNames[i];
            Context context = deployer.findDeployedApp(contextName);

            if (!(context instanceof Lifecycle))
                continue;

            try {
View Full Code Here

Examples of org.apache.catalina.Deployer

    protected void checkContextLastModified() {

        if (!(host instanceof Deployer))
            return;

        Deployer deployer = (Deployer) host;

        String[] contextNames = deployer.findDeployedApps();

        for (int i = 0; i < contextNames.length; i++) {

            String contextName = contextNames[i];
            Context context = deployer.findDeployedApp(contextName);

            if (!(context instanceof Lifecycle))
                continue;

            try {
View Full Code Here

Examples of org.apache.catalina.Deployer

     */
    public void begin(String namespace, String name, Attributes attributes)
        throws Exception {

        Context child = (Context) digester.peek(0);
        Deployer parent = (Deployer) digester.peek(1);
        Host host = null;
        if (!(parent instanceof StandardHost)) {
            Method method = parent.getClass().getMethod("getHost", null);
            host = (Host) method.invoke(parent, null);
        } else {
            host = (Host) parent;
        }
        String appBase = host.getAppBase();
View Full Code Here

Examples of org.apache.openejb.assembler.Deployer

        if (!apps.exists()) {
            System.out.println("Directory does not exist: " + apps.getAbsolutePath());
        }

        Deployer deployer = null;
        if (!offline) {
            Properties p = new Properties();
            p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");

            String serverUrl = defaultServerUrl;
            if (line.hasOption(serverUrl)) {
                serverUrl = line.getOptionValue("serverUrl");
            }
            p.put(Context.PROVIDER_URL, serverUrl);

            try {
                InitialContext ctx = new InitialContext(p);
                deployer = (Deployer) ctx.lookup("openejb/DeployerBusinessRemote");
            } catch (javax.naming.ServiceUnavailableException e) {
                System.out.println(e.getCause().getMessage());
                System.out.println(messages.format("cmd.deploy.serverOffline"));
                throw new SystemExitException(-1);
            } catch (javax.naming.NamingException e) {
                System.out.println("openejb/DeployerBusinessRemote does not exist in server '" + serverUrl
                        + "', check the server logs to ensure it exists and has not been removed.");
                throw new SystemExitException(-2);
            }
        }

        boolean undeploy = line.hasOption("undeploy");

        // We increment the exit code once for every failed deploy
        int exitCode = 0;
        for (Object obj : line.getArgList()) {
            String path = (String) obj;

            File file = new File(path);

            File destFile = new File(apps, file.getName());

            try {
                if (shouldUnpack(file)) {
                    File unpacked = unpackedLocation(file, apps);
                    if (undeploy) {
                        undeploy(offline, unpacked, path, deployer);
                    }
                    destFile = unpack(file, unpacked);
                } else {
                    if (undeploy){
                        undeploy(offline, destFile, path, deployer);
                    }
                    checkDest(destFile, file);
                    copyFile(file, destFile);
                }

                if (offline) {
                    System.out.println(messages.format("cmd.deploy.offline", path, apps.getAbsolutePath()));
                    continue;
                }

                String location;
                try {
                    location = destFile.getCanonicalPath();
                } catch (IOException e) {
                    throw new OpenEJBException(messages.format("cmd.deploy.fileNotFound", path));
                }
                AppInfo appInfo = deployer.deploy(location);

                System.out.println(messages.format("cmd.deploy.successful", path, appInfo.jarPath));

                if (line.hasOption("quiet")) {
                    continue;
View Full Code Here

Examples of org.apache.openejb.assembler.Deployer

        if (line.hasOption(serverUrl)) {
            serverUrl = line.getOptionValue("serverUrl");
        }
        p.put(Context.PROVIDER_URL, serverUrl);

        Deployer deployer = null;
        try {
            InitialContext ctx = new InitialContext(p);
            deployer = (Deployer) ctx.lookup("openejb/DeployerBusinessRemote");
        } catch (javax.naming.ServiceUnavailableException e) {
            System.out.println(e.getCause().getMessage());
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.