Package org.apache.openjpa.persistence

Examples of org.apache.openjpa.persistence.PersistenceProviderImpl


    /* (non-Javadoc)
     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
     */
    public void start(BundleContext ctx) throws Exception {
        this.ctx = ctx;
        PersistenceProvider provider = new PersistenceProviderImpl();
        Hashtable<String, String> props = new Hashtable<String, String>();
        // Aries queries for service providers by property "javax.persistence.provider"
        props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER);
        // The persistence service tracker in the geronimo spec api bundle examines
        // the property named "javax.persistence.PersistenceProvider" rather than
View Full Code Here


        assertEquals(LoadState.UNKNOWN, pu.isLoadedWithoutReference(ent,
            "transField"));       
    }
   
    private ProviderUtil getProviderUtil() {
        PersistenceProvider pp = new PersistenceProviderImpl();
        ProviderUtil pu = pp.getProviderUtil();
        return pu;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
     */
    public void start(BundleContext ctx) throws Exception {
        this.ctx = ctx;
        PersistenceProvider provider = new PersistenceProviderImpl();
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER);
        svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props);
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
     */
    public void start(BundleContext arg0) throws Exception {
        ctx = arg0;
        PersistenceProvider provider = new PersistenceProviderImpl();
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put(PERSISTENCE_PROVIDER, OSGI_PERSISTENCE_PROVIDER);
        ctx.registerService(PERSISTENCE_PROVIDER, provider, props);
    }
View Full Code Here

            }
        }
        builder.append(")");
        props.put("openjpa.MetaDataFactory", builder.toString());
        // bypass generic Persistence because it'll try to load the persistence-unit from persistence.xml
        PersistenceProviderImpl provider = new PersistenceProviderImpl();
        PersistenceUnitInfoImpl pui = new PersistenceUnitInfoImpl();
        pui.fromUserProperties(props);
        EntityManagerFactory emf = provider.createContainerEntityManagerFactory(pui, props);
        EM = emf.createEntityManager();
        getVersion(emf);
        return EM;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
     */
    public void start(BundleContext ctx) throws Exception {
        PersistenceProvider provider = new PersistenceProviderImpl();
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER);
        svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props);
    }
View Full Code Here

    // Creates an instance of the OpenJPA PersistenceProviderImpl and
    // returns an EMF via createContainerEntityManagerFactory
    private OpenJPAEntityManagerFactorySPI createContainerEMF(String puName,
        PersistenceUnitInfo pui, Map<String, Object> map) {
       
        PersistenceProviderImpl  ppi = new PersistenceProviderImpl();
       
        return (OpenJPAEntityManagerFactorySPI)ppi.createContainerEntityManagerFactory(pui, map);
    }
View Full Code Here

        assertEquals(LoadState.UNKNOWN, pu.isLoadedWithoutReference(ent,
            "transField"));       
    }
   
    private ProviderUtil getProviderUtil() {
        PersistenceProvider pp = new PersistenceProviderImpl();
        ProviderUtil pu = pp.getProviderUtil();
        return pu;
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.PersistenceProviderImpl

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.