Examples of EjbServer


Examples of org.apache.openejb.server.ejbd.EjbServer

    private HttpServer httpServer;
    private String name;

    public void init(Properties props) throws Exception {
        name = props.getProperty("name");
        EjbServer ejbServer = new EjbServer();
        ServerServiceAdapter adapter = new ServerServiceAdapter(ejbServer);

        SystemInstance systemInstance = SystemInstance.get();
        HttpListenerRegistry registry = systemInstance.getComponent(HttpListenerRegistry.class);
        if (registry == null){
            registry = new HttpListenerRegistry();
            systemInstance.setComponent(HttpListenerRegistry.class, registry);
        }

        registry.addHttpListener(adapter, "/ejb/?.*");

        httpServer = new HttpServer(registry);
        httpServer.init(props);
        ejbServer.init(props);
    }
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

      HttpServer httpServer;
        private int port;

        public void init(Properties props) {
            try {
                EjbServer ejbServer = new EjbServer();
                ServerServiceAdapter adapter = new ServerServiceAdapter(ejbServer);
                httpServer = new OpenEJBHttpServer(adapter);

                props.put("openejb.deployments.classpath", "true");
                OpenEJB.init(props, new ServerFederation());
                ejbServer.init(props);
               
                httpServer.init(props);

                // Binding to port 0 means that the OS will
                // randomly pick an *available* port and bind to it
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

        optionalService(properties, "org.apache.tomee.webservices.TomeeJaxRsService");
        optionalService(properties, "org.apache.tomee.webservices.TomeeJaxWsService");

        // Start OpenEJB
        ejbServer = new EjbServer();
        SystemInstance.get().setComponent(EjbServer.class, ejbServer);
        OpenEJB.init(properties, new ServerFederation());

        Properties ejbServerProps = new Properties();
        ejbServerProps.putAll(properties);
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

/**
* @version $Rev: 1090081 $ $Date: 2011-04-08 01:30:11 +0000 (Fri, 08 Apr 2011) $
*/
public class AuthTest extends TestCase {
    public void test() throws Exception {
        EjbServer ejbServer = new EjbServer();

        Properties initProps = new Properties();
        initProps.put(DeploymentsResolver.DEPLOYMENTS_CLASSPATH_PROPERTY, Boolean.toString(false));
        OpenEJB.init(initProps, new ServerFederation());
        ejbServer.init(new Properties());

        ServiceDaemon serviceDaemon = new ServiceDaemon(ejbServer, 0, "localhost");
        serviceDaemon.start();

        int port = serviceDaemon.getPort();
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

        private ServiceDaemon serviceDaemon;
        private int port;

        public void init(Properties props) {
            try {
                EjbServer ejbServer = new EjbServer();
                // classpath should be scanned...
                props.put("openejb.deployments.classpath", "true");
                // ...and only the openejb-itests-beans should be considered as a deployment
                props.put("openejb.deployments.classpath.include", ".*openejb-itests-beans.*");
                // ...and have the openejb-itests-beans included in the deployments (it's a system app)
                props.put("openejb.deployments.classpath.filter.systemapps", "false");
//                props.put("openejb.debuggable-vm-hackery", "true");
                OpenEJB.init(props, new ServerFederation());
                ejbServer.init(props);

                serviceDaemon = new ServiceDaemon(ejbServer, 0, "localhost");

            } catch (Exception e) {
                throw new RuntimeException("Unable to initialize Test Server.", e);
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

/**
* @version $Rev: 1090081 $ $Date: 2011-04-08 01:30:11 +0000 (Fri, 08 Apr 2011) $
*/
public class JndiTest extends TestCase {
    public void test() throws Exception {
        EjbServer ejbServer = new EjbServer();

        Properties initProps = new Properties();
        initProps.put(DeploymentsResolver.DEPLOYMENTS_CLASSPATH_PROPERTY, Boolean.toString(false));
        OpenEJB.init(initProps, new ServerFederation());
        ejbServer.init(new Properties());

        ServiceDaemon serviceDaemon = new ServiceDaemon(ejbServer, 0, "localhost");
        serviceDaemon.start();

        int port = serviceDaemon.getPort();
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

    protected HttpServer httpServer;
    private String name;

    public void init(Properties props) throws Exception {
        name = props.getProperty("name");
        EjbServer ejbServer = new EjbServer();
        ServerServiceAdapter adapter = new ServerServiceAdapter(ejbServer);

        SystemInstance systemInstance = SystemInstance.get();
        HttpListenerRegistry registry = systemInstance.getComponent(HttpListenerRegistry.class);
        if (registry == null){
            registry = new HttpListenerRegistry();
            systemInstance.setComponent(HttpListenerRegistry.class, registry);
        }

        registry.addHttpListener(adapter, "/ejb/?.*");
       
        // register the http server
        systemInstance.setComponent(HttpServer.class, httpServer);

        httpServer.init(props);
        ejbServer.init(props);
    }
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

            Properties properties = new Properties();
            properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
            properties.put(Context.PROVIDER_URL, "ejbd://localhost:2888");
            SystemInstance.init(properties);
           
            ejbServer = new EjbServer();
            SystemInstance.get().setComponent(EjbServer.class, ejbServer);
            OpenEJB.init(properties, new ServerFederation());
            ejbServer.init(properties);
           
            serviceDaemon = new ServiceDaemon(ejbServer, 2888, "localhost");
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

            SystemInstance.get().setComponent(WebAppBuilder.class, tomcatWebAppBuilder);
        }

        SystemInstance.init(props);

        ejbServer = new EjbServer();
        SystemInstance.get().setComponent(EjbServer.class, ejbServer);
        OpenEJB.init(props, new ServerFederation());
        ejbServer.init(props);
    }
View Full Code Here

Examples of org.apache.openejb.server.ejbd.EjbServer

/**
* @version $Rev: 1090081 $ $Date: 2011-04-07 18:30:11 -0700 (Thu, 07 Apr 2011) $
*/
public class AuthTest extends TestCase {
    public void test() throws Exception {
        EjbServer ejbServer = new EjbServer();

        Properties initProps = new Properties();
        initProps.put(DeploymentsResolver.DEPLOYMENTS_CLASSPATH_PROPERTY, Boolean.toString(false));
        OpenEJB.init(initProps, new ServerFederation());
        ejbServer.init(new Properties());

        ServiceDaemon serviceDaemon = new ServiceDaemon(ejbServer, 0, "localhost");
        serviceDaemon.start();

        int port = serviceDaemon.getPort();
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.