Examples of RemoteServer


Examples of org.apache.openejb.config.RemoteServer

        }

        System.out.println(currentFile);
        writeToFile(currentFile, archive);

        server = new RemoteServer(100, true);
        try {
            server.start();
        } catch (RuntimeException e) {
            e.printStackTrace();
            throw e;
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

                for (Map.Entry<Object, Object> entry : map.entrySet()) {
                    System.out.printf("%s = %s\n", entry.getKey(), entry.getValue());
                }
            }

            container = new RemoteServer();
            container.start();
        } catch (Exception e) {
            throw new LifecycleException("Unable to start remote container", e);
        }
    }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

        try {

            configure();

            container = new RemoteServer();

            container.start();
        } catch (Exception e) {
            throw new LifecycleException("Unable to start remote container", e);
        }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

        }
        if (getNoShutdownHook()) {
            strings.add("-Dtomee.noshutdownhook=true");
        }

        final RemoteServer server = new RemoteServer(getConnectAttempts(), false);
        if (!getNoShutdownHook()) {
            Runtime.getRuntime().addShutdownHook(new Thread() {
                @Override public void run() {
                    server.stop();
                }
            });
        }

        server.start(strings, getCmd(), false);

        if (!getNoShutdownHook()) {
            try {
                server.getServer().waitFor(); // connect attempts = 0
            } catch (InterruptedException e) {
                // ignored
            }
        }
    }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

            throw new RuntimeException(e);
        }
    }
    public ContainersImplTomEE() {
        System.out.println("Initialized ContainersImplTomEE " + (++count));
        server = new RemoteServer();
    }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

        }
    }
    public ContainersImplTomEE() {
        System.out.println("ContainersImpl=" + ContainersImplTomEE.class.getName());
        System.out.println("Initialized ContainersImplTomEE " + (++count));
        server = new RemoteServer();
    }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

    public boolean deploy(InputStream archive, String name) throws IOException {
        currentFile = new File(WEBAPP_DIR, name);
        System.out.println(currentFile);
        writeToFile(currentFile, archive);

        server = new RemoteServer(100, true);
        try {
            server.start();
        } catch (RuntimeException e) {
            e.printStackTrace();
            throw e;
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

            final QuickServerXmlParser parser = QuickServerXmlParser.parse(new File(home, "conf/server.xml"));
            final String remoteEjb = System.getProperty(Context.PROVIDER_URL, "http://" + parser.host() + ":" + parser.http() + "/tomee/ejb");

            try {
                instance = new RemoteTomEEEJBContainer();
                instance.container = new RemoteServer();
                instance.container.setPortStartup(Integer.parseInt(parser.http()));
                instance.container.start();
                instance.context = new InitialContext(new Properties() {{
                    setProperty(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName());
                    setProperty(Context.PROVIDER_URL, remoteEjb);
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

            System.setProperty("openejb.home", distribOutput.getAbsolutePath());
            System.setProperty("server.shutdown.port", parser.stop());
            System.setProperty("server.shutdown.command", config.getProperty("shutdownCommand"));

            final RemoteServer server = new RemoteServer();
            server.setPortStartup(Integer.parseInt(parser.http()));

            if (config.containsKey("additionalClasspath")) {
                server.setAdditionalClasspath(config.getProperty("additionalClasspath"));
            }

            final List<String> jvmArgs = new LinkedList<String>();
            if (additionalArgs != null) {
                Collections.addAll(jvmArgs, additionalArgs.split(" "));
            }
            for (final String k : config.stringPropertyNames()) {
                if (k.startsWith("jvmArg.")) {
                    jvmArgs.add(config.getProperty(k));
                }
            }

            if ("run".equals(args[0])) {
                args[0] = "start";
            }
            server.start(jvmArgs, args[0], true);
            server.getServer().waitFor();
        } else {
            params.add(cmd);
            params.addAll(asList(args));

            final ProcessBuilder builder = new ProcessBuilder(params.toArray(new String[params.size()])).directory(distribOutput);
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

            System.setProperty("server.debug.port", Integer.toString(debugPort));
        }
        System.setProperty("server.shutdown.port", Integer.toString(tomeeShutdownPort));
        System.setProperty("server.shutdown.command", tomeeShutdownCommand);

        server = new RemoteServer(getConnectAttempts(), false);
        server.setAdditionalClasspath(getAdditionalClasspath());

        addShutdownHooks(server); // some shutdown hooks are always added (see UpdatableTomEEMojo)

        if (TOM_EE.equals(container)) {
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.