Examples of RemoteServer


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();
        server.setPortStartup(this.port);
    }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

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

        final int port = ServerLocal.getPort(-1);
        if (port > 0) {
            server = new RemoteServer(100, true);
            server.setPortStartup(port);
        } else {
            throw new OpenEJBTCKRuntimeException("Please set the tomee port using the system property 'server.http.port'");
        }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

                final String baseUrl = "http://" + configuration.getHost() + ":" + httpPort + "/tomee/installer";

                assert installer != null;
                installer.addTomEEAdminConfInTomcatUsers(true);

                final RemoteServer tmpContainer = new RemoteServer();
                tmpContainer.setPortStartup(httpPort);
                tmpContainer.start();

                final URL url = new URL(baseUrl);
                logger.info("Calling TomEE Installer Servlet on " + url);

                for (int i = 0; i < 3; i++) {
                    final URLConnection uc = url.openConnection();
                    // dG9tZWU6dG9tZWU= --> Base64 of tomee:tomee
                    final String authorizationString = "Basic dG9tZWU6dG9tZWU=";
                    uc.setRequestProperty("Authorization", authorizationString);
                    try {
                        final InputStream is = uc.getInputStream();
                        org.apache.openejb.loader.IO.slurp(is);
                        is.close();
                        break;
                    } catch (final Exception e) {
                        logger.warning(e.getMessage());
                        Thread.sleep(1000);
                    }
                }

                tmpContainer.stop();
                tmpContainer.getServer().waitFor();
            }

            container = new RemoteServer();
            container.setPortStartup(httpPort);
            container.start(Arrays.asList("-Dorg.apache.openejb.servlet.filters=" + ArquillianFilterRunner.class.getName() + "=" + ServletMethodExecutor.ARQUILLIAN_SERVLET_MAPPING), "start", true);
            container.killOnExit();
        } catch (final Exception e) {
            throw new LifecycleException("Unable to start remote container", e);
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

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

            container = new RemoteServer();
            container.setPortStartup(httpPort);
            container.start(args(), "start", true);
            container.killOnExit();

            if (configuration.getProperties() != null) {
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

                final String baseUrl = "http://" + configuration.getHost() + ":" + httpPort + "/tomee/installer";

                assert installer != null;
                installer.addTomEEAdminConfInTomcatUsers(true);

                final RemoteServer tmpContainer = new RemoteServer();
                tmpContainer.setPortStartup(httpPort);
                tmpContainer.start();

                final URL url = new URL(baseUrl);
                logger.info("Calling TomEE Installer Servlet on " + url);

                for (int i = 0; i < 3; i++) {
                    final URLConnection uc = url.openConnection();
                    // dG9tZWU6dG9tZWU= --> Base64 of tomee:tomee
                    final String authorizationString = "Basic dG9tZWU6dG9tZWU=";
                    uc.setRequestProperty("Authorization", authorizationString);
                    try {
                        final InputStream is = uc.getInputStream();
                        org.apache.openejb.loader.IO.slurp(is);
                        is.close();
                        break;
                    } catch (final Exception e) {
                        logger.warning(e.getMessage());
                        Thread.sleep(1000);
                    }
                }

                tmpContainer.stop();
                tmpContainer.getServer().waitFor();
            }

            container = new RemoteServer();
            container.setPortStartup(httpPort);
            container.start(Arrays.asList("-Dorg.apache.openejb.servlet.filters=" + ArquillianFilterRunner.class.getName() + "=" + ServletMethodExecutor.ARQUILLIAN_SERVLET_MAPPING), "start", true);
            container.killOnExit();
        } catch (final Exception e) {
            throw new LifecycleException("Unable to start remote container", e);
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

            final String remoteEjb = System.getProperty(Context.PROVIDER_URL, "http://" + parser.host() + ":" + parser.http() + "/tomee/ejb");
            System.setProperty(RemoteServer.SERVER_SHUTDOWN_PORT, parser.stop());

            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("server.debug.port", Integer.toString(debugPort));
        }
        System.setProperty("server.shutdown.port", Integer.toString(tomeeShutdownPort));
        System.setProperty("server.shutdown.command", tomeeShutdownCommand);

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

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

        if (TOM_EE.equals(container)) {
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) + ", wait port = " + port);
        server = new RemoteServer();
        server.setPortStartup(this.port);
    }
View Full Code Here

Examples of org.apache.openejb.config.RemoteServer

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

            container = new RemoteServer();
            container.setPortStartup(httpPort);
            container.start(args(), "start", true);
            container.killOnExit();

            if (configuration.getProperties() != null) {
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.