Package org.apache.openejb.assembler.classic

Examples of org.apache.openejb.assembler.classic.Assembler.createApplication()


        ejbModule.getOpenejbJar().addEjbDeployment(new EjbDeployment(null, "foo/bar/baz/Green", "GreenBean"));
        ejbModule.getOpenejbJar().addEjbDeployment(new EjbDeployment(null, "foo/bar/baz/Red", "RedBean"));

        EjbJarInfo info = config.configureApplication(ejbModule);
        assembler.createApplication(info);

        InitialContext initialContext = new InitialContext();
        Color green = (Color) initialContext.lookup("foo/bar/baz/GreenLocal");
        Color red = (Color) initialContext.lookup("foo/bar/baz/RedLocal");
View Full Code Here


        assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(subBeanC, interceptorA));
        assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(subBeanC, interceptorB));
        assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(subBeanC, interceptorC));

        EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);
        assembler.createApplication(ejbJarInfo);
        InitialContext context = new InitialContext();

        List<Call> expectedResult = Arrays.asList(Call.INTERCEPTOR_BEFORE_AROUNDTIMEOUT, Call.INTERCEPTOR_BEFORE_AROUNDTIMEOUT, Call.INTERCEPTOR_BEFORE_AROUNDTIMEOUT, Call.BEAN_BEFORE_AROUNDTIMEOUT,
                Call.BEAN_TIMEOUT, Call.BEAN_AFTER_AROUNDTIMEOUT, Call.INTERCEPTOR_AFTER_AROUNDTIMEOUT, Call.INTERCEPTOR_AFTER_AROUNDTIMEOUT, Call.INTERCEPTOR_AFTER_AROUNDTIMEOUT);
View Full Code Here

        ClientModule clientModule = new ClientModule(null, app.getClassLoader(), app.getJarLocation(), null, null);
        clientModule.getLocalClients().add(this.getClass().getName());

        app.getClientModules().add(clientModule);
       
        assembler.createApplication(config.configureApplication(app));
    }

    public void test() throws Exception {

        Properties properties = new Properties();
View Full Code Here

        ejbJar.addEnterpriseBean(subBeanC);

        StatefulBean subBeanM = new StatefulBean(SubBeanM.class);
        ejbJar.addEnterpriseBean(subBeanM);
        EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);
        assembler.createApplication(ejbJarInfo);

        countDownLatch.await(1L, TimeUnit.MINUTES);

        //A better way for validation ?
        int beforeAroundInvocationCount = 0;
View Full Code Here

        ejbDeployment.getJndi().add(new Jndi("anothername", "Remote"));
        ejbDeployment.getJndi().add(new Jndi("loldstyle", "LocalHome"));
        ejbDeployment.getJndi().add(new Jndi("roldstyle", "RemoteHome"));
        ejbModule.getOpenejbJar().addEjbDeployment(ejbDeployment);

        assembler.createApplication(config.configureApplication(ejbModule));

        InitialContext initialContext = new InitialContext();
        assertName(initialContext, Orange.class, "thename");
        assertName(initialContext, Red.class, "anothername");
        assertName(initialContext, LHYellow.class, "loldstyle");
View Full Code Here

        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("loldstyle", "LocalHome"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("roldstyle", "RemoteHome"));
        v2.getEnterpriseBeans().add(ejbDeployment);
        ejbModule.getAltDDs().put("openejb-jar.xml", v2);

        assembler.createApplication(config.configureApplication(ejbModule));

        InitialContext initialContext = new InitialContext();
        assertName(initialContext, Orange.class, "thename");
        assertName(initialContext, Red.class, "anothername");
        assertName(initialContext, LHYellow.class, "loldstyle");
View Full Code Here

                final Assembler assembler = SystemInstance.get().getComponent(Assembler.class);

                final AppContext appContext;

                try {
                    appContext = assembler.createApplication(appInfo, appModule.getClassLoader());
                } catch (ValidationException ve) {
                    throw ve;
                } catch (Exception e) {
                    throw new AssembleApplicationException(e);
                }
View Full Code Here

        app.getClientModules().add(clientModule);
       
        AppInfo appInfo = config.configureApplication(app);
       
        assembler.createApplication(appInfo);
       
        ClientInfo clientInfo = appInfo.clients.get(0);
        Assert.assertNotNull(clientInfo);
        Assert.assertEquals(MyMainClass.class.getName(), clientInfo.mainClass);
    }
View Full Code Here

        bean.setLocalBean(new Empty());

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(bean);

        assembler.createApplication(config.configureApplication(ejbJar));

    }

    private static String join(String delimeter, List items) {
        StringBuffer sb = new StringBuffer();
View Full Code Here

        // Setup the descriptor information

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new SingletonBean(MySingleton.class));

        assembler.createApplication(config.configureApplication(ejbJar));
    }

    public void testSuccess() throws Exception {
        Context context = new InitialContext();
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.