Package org.apache.openejb.config

Examples of org.apache.openejb.config.RemoteServer$Pipe


            System.setProperty(RemoteServer.SERVER_SHUTDOWN_HOST, configuration.getStopHost());
            if (configuration.isDebug()) {
                System.setProperty(RemoteServer.OPENEJB_SERVER_DEBUG, "true");
                System.setProperty(RemoteServer.SERVER_DEBUG_PORT, Integer.toString(configuration.getDebugPort()));
            }
            container = new RemoteServer();

            container.start();
        } catch (Exception e) {
            logger.log(Level.SEVERE, "Unable to start remote container", e);
            throw new LifecycleException("Unable to start remote container:" + e.getMessage(), e);
View Full Code Here


                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

        if (quickSession) {
            strings.add("-Dopenejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager");
        }

        System.setProperty("server.shutdown.port", Integer.toString(tomeeShutdownPort));
        final RemoteServer server = new RemoteServer(getConnectAttempts(), false);
        addShutdownHooks(server); // some shutdown hooks are always added (see UpdatableTomEEMojo)

        if (getNoShutdownHook()) {
            Runtime.getRuntime().addShutdownHook(new Thread() {
                @Override
                public void run() {
                    server.stop();
                }
            });
        }

        getLog().info("Running '" + getClass().getSimpleName().replace("TomEEMojo", "").toLowerCase(Locale.ENGLISH)
                + "'. Configured TomEE in plugin is " + tomeeHost + ":" + tomeeHttpPort
                + " (plugin shutdown port is " + tomeeShutdownPort + ")");

        serverCmd(server, strings);

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

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

                        .append(configuration.getHttpPort())
                        .append("/tomee/installer");

                installer.addTomEEAdminConfInTomcatUsers(true);

                RemoteServer tmpContainer = new RemoteServer();
                tmpContainer.start();

                URL url = new URL(baseUrl.toString());
                URLConnection uc = url.openConnection();
                // dG9tZWU6dG9tZWU= --> Base64 of tomee:tomee
                String authorizationString = "Basic dG9tZWU6dG9tZWU=";
                uc.setRequestProperty ("Authorization", authorizationString);
                InputStream is = uc.getInputStream();
                org.apache.openejb.loader.IO.slurp(is);
                is.close();

                tmpContainer.stop();
            }

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

            System.setProperty(RemoteServer.SERVER_SHUTDOWN_HOST, configuration.getStopHost());
            if (configuration.isDebug()) {
                System.setProperty(RemoteServer.OPENEJB_SERVER_DEBUG, "true");
                System.setProperty(RemoteServer.SERVER_DEBUG_PORT, Integer.toString(configuration.getDebugPort()));
            }
            container = new RemoteServer();

            container.setAdditionalClasspath(addOneLineFormatter(tomeeHome));
            container.start(args(), "start", true);
            container.killOnExit();
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.openejb.config.RemoteServer$Pipe

Copyright © 2018 www.massapicom. 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.