Package org.eclipse.persistence.jpa.osgi

Examples of org.eclipse.persistence.jpa.osgi.PersistenceProvider


   
    if(emf==null)
      {
      properties=new HashMap<Object, Object>();
      properties.put("eclipselink.classloader", JPAManager.class.getClassLoader());
      emf=new PersistenceProvider().createEntityManagerFactory(persistenceUnitName, properties);
      }
    return emf;
    }
View Full Code Here


     * In this method, we register as a provider of that service
     * @throws Exception
     */
    public void registerProviderService(String initializer) throws Exception {
        // Create and register ourselves as a JPA persistence provider service
        PersistenceProvider providerService = new PersistenceProvider(initializer);
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put(PERSISTENCE_PROVIDER, ECLIPSELINK_OSGI_PROVIDER);
        getContext().registerService(PERSISTENCE_PROVIDER, providerService, props);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.osgi.PersistenceProvider

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.