Package org.apache.openejb.jee.jpa.unit

Examples of org.apache.openejb.jee.jpa.unit.Persistence


        unit.addClass(EntityToValidate.class);
        unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
        unit.getProperties().setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
        unit.setExcludeUnlistedClasses(true);

        final Persistence persistence = new Persistence(unit);
        persistence.setVersion("2.0");
        return persistence;
    }
View Full Code Here


        final org.apache.openejb.jee.jpa.unit.PersistenceUnit unit = new org.apache.openejb.jee.jpa.unit.PersistenceUnit("jpa-global-dsdef-unit");
        unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
        unit.getProperties().setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
        unit.getProperties().setProperty("openejb.jpa.auto-scan", "true");

        final Persistence persistence = new Persistence(unit);
        persistence.setVersion("2.0");
        return persistence;
    }
View Full Code Here

        unit.addClass(AnEntity.class);
        unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
        unit.getProperties().setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
        unit.setExcludeUnlistedClasses(true);

        final Persistence persistence = new Persistence(unit);
        persistence.setVersion("2.0");
        return persistence;
    }
View Full Code Here

        unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
        unit.getProperties().setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
        unit.getProperties().setProperty("openejb.jpa.auto-scan", "true");
        unit.getProperties().setProperty("openejb.jpa.auto-scan.package", "com.doesnt.exist");

        final Persistence persistence = new Persistence(unit);
        persistence.setVersion("2.0");
        return persistence;
    }
View Full Code Here

        unit.setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
        unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
        unit.setProperty("openjpa.Log", "DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE");
        unit.setExcludeUnlistedClasses(true);

        final Persistence persistence = new Persistence(unit);
        persistence.setVersion("2.0");
        return persistence;
    }
View Full Code Here

        final PersistenceUnit unit2 = new PersistenceUnit("lime-unit");
        unit2.setJtaDataSource("Lime");
        unit2.setNonJtaDataSource("LimeUnmanaged");

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

        // Create app

        final AppInfo appInfo = config.configureApplication(app);
        assembler.createApplication(appInfo);
View Full Code Here

        final PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        final ClassLoader cl = this.getClass().getClassLoader();
        final AppModule app = new AppModule(cl, "orange-app");
        app.addPersistenceModule(new PersistenceModule("root", new Persistence(persistenceUnit)));
        final WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, null, "orange-id"));

        // Create app
View Full Code Here

        final PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        final ClassLoader cl = this.getClass().getClassLoader();
        final AppModule app = new AppModule(cl, "orange-app");
        app.addPersistenceModule(new PersistenceModule("root", new Persistence(persistenceUnit)));
        final WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-id"));

        // Create app
View Full Code Here

        final PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        final ClassLoader cl = this.getClass().getClassLoader();
        final AppModule app = new AppModule(cl, "orange-app");
        app.addPersistenceModule(new PersistenceModule("root", new Persistence(persistenceUnit)));
        final WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-id"));

        // Create app
View Full Code Here

        final PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        final ClassLoader cl = this.getClass().getClassLoader();
        final AppModule app = new AppModule(cl, "orange-app");
        app.addPersistenceModule(new PersistenceModule("root", new Persistence(persistenceUnit)));
        final WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));

        // Create app
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.jpa.unit.Persistence

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.