Examples of EjbServer


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: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
*/
public class JndiTest extends TestCase {
    public void test() throws Exception {
        EjbServer ejbServer = new EjbServer();

        Properties initProps = new Properties();
        initProps.setProperty("openejb.deployments.classpath.include", "");
        initProps.setProperty("openejb.deployments.classpath.filter.descriptors", "true");
        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

      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

        System.clearProperty("java.security.auth.login.config");
    }

    @Test
    public void invoke() throws Exception {
        final EjbServer ejbServer = new EjbServer();

        OpenEJB.init(new PropertiesBuilder().p(DeploymentsResolver.DEPLOYMENTS_CLASSPATH_PROPERTY, "false").build(), new ServerFederation());
        ejbServer.init(new Properties());

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

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

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

* @version $Rev$ $Date$
*/
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

        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

* @version $Rev$ $Date$
*/
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

    private String name;

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

        final 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
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.