Package org.apache.openejb.assembler.classic

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


                try {
                    DeploymentLoader deploymentLoader = new DeploymentLoader();
                    AppModule appModule = deploymentLoader.load(file);

                    ConfigurationFactory configurationFactory = new ConfigurationFactory();
                    AppInfo appInfo = configurationFactory.configureApplication(appModule);

                    Assembler assembler = (Assembler) SystemInstance.get().getComponent(Assembler.class);
                    System.out.println(assembler);
                    System.out.println(appInfo);
                    assembler.createApplication(appInfo);
View Full Code Here


            jarFiles.add(URLs.toFile(path));
        }

        List<AppInfo> appInfos = new ArrayList<AppInfo>();
        if (classpathAsEar) {
            AppInfo appInfo = configurationFactory.configureApplication(classLoader, "classpath.ear", jarFiles);
            appInfos.add(appInfo);
        } else {
            for (File jarFile : jarFiles) {
                AppInfo appInfo = configurationFactory.configureApplication(jarFile);
                appInfos.add(appInfo);
            }
        }
        return appInfos;
    }
View Full Code Here

        if (!containsDefaultTarget(targetList)) {
            return new ProgressObjectImpl(CommandType.DISTRIBUTE, Collections.<TargetModuleID>emptySet());
        }

        try {
            AppInfo appInfo = getDeployer().deploy(properties);
            TargetModuleID targetModuleId = toTargetModuleId(appInfo, null);

            return new ProgressObjectImpl(CommandType.DISTRIBUTE, Collections.singleton(targetModuleId));
        } catch (ValidationFailedException e) {
            String s = System.getProperty(ReportValidationResults.VALIDATION_LEVEL, "3");
View Full Code Here

        AppModule app = new AppModule(this.getClass().getClassLoader(), "test-app");
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(unit1, unit2)));

        // Create app

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

        // Check results

        PersistenceUnitInfo orangeUnit = appInfo.persistenceUnits.get(0);
View Full Code Here

        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, null, "orange-id"));

        // Create app
        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);
        PersistenceUnitInfo unitInfo = appInfo.persistenceUnits.get(0);

        //Check results
        assertEquals(supplied.id, unitInfo.jtaDataSource);
View Full Code Here

        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-id"));

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

        // Check results
        ResourceInfo generated = resources.get(1);
        assertEquals(supplied.id + "NonJta", generated.id);
View Full Code Here

        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-id"));

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

        // Check results
        ResourceInfo generated = resources.get(1);
        assertEquals(supplied.id + "Jta", generated.id);
View Full Code Here

        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));

        // Create app
        AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);
        PersistenceUnitInfo unitInfo = appInfo.persistenceUnits.get(0);

        //Check results
        assertEquals(supplied.id, unitInfo.jtaDataSource);
View Full Code Here

        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));

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

        // Check results
        ResourceInfo generated = resources.get(1);
        assertEquals(supplied.id + "NonJta", generated.id);
View Full Code Here

        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));

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

        // Check results
        ResourceInfo generated = resources.get(1);
        assertEquals(supplied.id + "Jta", generated.id);
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.