Package org.apache.openejb.assembler.classic

Examples of org.apache.openejb.assembler.classic.AppInfo


                    AppModule app = new AppModule(this.getClass().getClassLoader(), "test");
                    app.getEjbModules().add(module(expected));
                    app.getEjbModules().add(module(actual));

                    AppInfo appInfo = factory.configureApplication(app);

                    List<ContainerTransaction> expectedList = expected.getAssemblyDescriptor().getContainerTransaction();
                    List<ContainerTransaction> actualList = actual.getAssemblyDescriptor().getContainerTransaction();

                    assertEquals(expectedList.size(), actualList.size());
View Full Code Here


        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatelessBean(TestBeanC.class));
        ejbJar.addEnterpriseBean(new SingletonBean(TestBeanD.class));
        app.getEjbModules().add(new EjbModule(ejbJar));

        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);

    InitialContext context = new InitialContext();

    String[] beans = new String[]{"TestBeanCLocal", "TestBeanDLocal"};
View Full Code Here

        AppModule app = new AppModule(this.getClass().getClassLoader(), "testclassasynch");
        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new SingletonBean(TestBeanA.class));
        app.getEjbModules().add(new EjbModule(ejbJar));

        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);

        InitialContext context = new InitialContext();
        TestBean test = (TestBean)context.lookup("TestBeanALocal");
View Full Code Here

        AppModule app = new AppModule(this.getClass().getClassLoader(), "testcanceltask");
        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatelessBean(TestBeanB.class));
        app.getEjbModules().add(new EjbModule(ejbJar));

        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);

        InitialContext context = new InitialContext();
        TestBean test = (TestBean) context.lookup("TestBeanBLocal");
View Full Code Here

                try {
                    location = destFile.getCanonicalPath();
                } catch (IOException e) {
                    throw new OpenEJBException(messages.format("cmd.deploy.fileNotFound", path));
                }
                AppInfo appInfo = deployer.deploy(location);

                System.out.println(messages.format("cmd.deploy.successful", path, appInfo.path));

                if (line.hasOption("quiet")) {
                    continue;
View Full Code Here

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new MessageDrivenBean(EmailBean.class));
        app.getEjbModules().add(new EjbModule(ejbJar));

        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);

        InitialContext initialContext = new InitialContext();

        EmailResourceAdapter ra = (EmailResourceAdapter) initialContext.lookup("java:openejb/Resource/email-raRA");
View Full Code Here

        AppModule app = new AppModule(this.getClass().getClassLoader(), "app");
        app.getEjbModules().add(new EjbModule(ejbJar));
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));

        AppInfo appInfo = config.configureApplication(app);

        EjbJarInfo ejbJarInfo = appInfo.ejbJars.get(0);
        EnterpriseBeanInfo beanInfo = ejbJarInfo.enterpriseBeans.get(0);
        JndiEncInfo enc = beanInfo.jndiEnc;
View Full Code Here

        // Add the persistence.xml to the "ear"
        appModule.getPersistenceModules().add(new PersistenceModule("root", new Persistence(unit)));

        // Configure and assemble the ear -- aka. deploy it
        AppInfo info = config.configureApplication(appModule);
        assembler.createApplication(info);
    }
View Full Code Here

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new MessageDrivenBean(CronBean.class));
        app.getEjbModules().add(new EjbModule(ejbJar));

        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);


        assertTrue(CronBean.latch.await(5, TimeUnit.SECONDS));
View Full Code Here

    public AppInfoBuilder(ConfigurationFactory configFactory) {
        this.configFactory = configFactory;
    }

    public AppInfo build(AppModule appModule) throws OpenEJBException {
        final AppInfo appInfo = new AppInfo();
        appInfo.appId = appModule.getModuleId();
        appInfo.path = appModule.getJarLocation();
        appInfo.standaloneModule = appModule.isStandaloneModule();
        appInfo.watchedResources.addAll(appModule.getWatchedResources());
        appInfo.jmx = appModule.getMBeans();
View Full Code Here

TOP

Related Classes of org.apache.openejb.assembler.classic.AppInfo

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.