Tabnine Logo
HibernatePersistence.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.hibernate.ejb.HibernatePersistence
constructor

Best Java code snippets using org.hibernate.ejb.HibernatePersistence.<init> (Showing top 12 results out of 315)

origin: stackoverflow.com

 public class HibernatePersistenceProviderResolver implements PersistenceProviderResolver {
  private static final Logger LOGGER = LoggerFactory.getLogger(HibernatePersistenceProviderResolver.class);

  private volatile PersistenceProvider persistenceProvider = new HibernatePersistence();

  public List<PersistenceProvider> getPersistenceProviders() {
  return Collections.singletonList(persistenceProvider);
  }

  public void clearCachedProviders() {
  persistenceProvider = new HibernatePersistence();
  }

  public static void register() {
  LOGGER.info("Registering HibernatePersistenceProviderResolver");
  PersistenceProviderResolverHolder.setPersistenceProviderResolver(new HibernatePersistenceProviderResolver());
  }
}
origin: uk.ac.ebi.intact.core/intact-core

public EntityManagerFactory createEntityManagerFactory(String emName, Map map) {
  if (log.isInfoEnabled()) log.info("Creating EntityManagerFactory: "+emName+" ("+map+")");
  HibernatePersistence hibernatePersistence = new HibernatePersistence();
  EntityManagerFactory emf = hibernatePersistence.createEntityManagerFactory(emName, map);
  return emf;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public ProviderUtil getProviderUtil() {
  HibernatePersistence hibernatePersistence = new HibernatePersistence();
  return hibernatePersistence.getProviderUtil();
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public EntityManagerFactory createEntityManagerFactory(String emName, Map map) {
  if (log.isInfoEnabled()) log.info("Creating EntityManagerFactory: "+emName+" ("+map+")");
  HibernatePersistence hibernatePersistence = new HibernatePersistence();
  EntityManagerFactory emf = hibernatePersistence.createEntityManagerFactory(emName, map);
  return emf;
}
origin: uk.ac.ebi.intact.core/intact-core

public ProviderUtil getProviderUtil() {
  HibernatePersistence hibernatePersistence = new HibernatePersistence();
  return hibernatePersistence.getProviderUtil();
}
origin: uk.ac.ebi.intact.core/intact-core

public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map) {
  if (log.isInfoEnabled()) log.info("Creating Container EntityManagerFactory: "+info.getPersistenceUnitName()+" ("+map+")");
  HibernatePersistence hibernatePersistence = new HibernatePersistence();
  EntityManagerFactory emf = hibernatePersistence.createContainerEntityManagerFactory(info, map);
  return emf;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map) {
  if (log.isInfoEnabled()) log.info("Creating Container EntityManagerFactory: "+info.getPersistenceUnitName()+" ("+map+")");
  HibernatePersistence hibernatePersistence = new HibernatePersistence();
  EntityManagerFactory emf = hibernatePersistence.createContainerEntityManagerFactory(info, map);
  return emf;
}
origin: net.oneandone/ejb-cdi-unit

  return new HibernatePersistence().createContainerEntityManagerFactory(persistenceUnitInfo,
      properties);
} catch (Throwable thw) {
origin: org.artificer/artificer-repository-hibernate

private synchronized static EntityManager entityManager() throws Exception {
  if (entityManagerFactory == null) {
    // Pass in all hibernate.* settings from artificer.properties
    Map<String, Object> properties = ArtificerConfig.getConfigProperties("hibernate");
    if (properties.containsKey("hibernate.connection.url")) {
      // If a connection is used, we *cannot* rely on Hibernate's built-in connection pool.  Instead,
      // automatically set up HikariCP.
      initHikariCP(properties);
    }
    entityManagerFactory = new HibernatePersistence().createEntityManagerFactory(persistenceUnit, properties);
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    initDDL(entityManager, properties);
    return entityManager;
  } else {
    return entityManagerFactory.createEntityManager();
  }
}
origin: stackoverflow.com

@Bean
 public AbstractEntityManagerFactoryBean entityManagerFactory() {
   LocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean();
   entityManagerFactory.setDataSource(dataSource);
   entityManagerFactory.setPackagesToScan("com.abc.xyz.Foo");
   entityManagerFactory.setPersistenceProvider(new HibernatePersistence());
   entityManagerFactory.getJpaPropertyMap().put("hibernate.hbm2ddl.auto", "validate");
   return entityManagerFactory;
 }
origin: org.mobicents.servers.jainslee.core/profiles

  ProfileSpecificationComponent profileComponent) {
try {
  HibernatePersistence hp = new HibernatePersistence();
  PersistenceUnitMetadataImpl pumd = new PersistenceUnitMetadataImpl();
origin: org.mobicents.servers.jainslee.core/profiles

@SuppressWarnings({"rawtypes", "unchecked"})
private void createPersistenceUnit() {
  try {
    HibernatePersistence hp = new HibernatePersistence();
    PersistenceUnitMetadataImpl pumd = new PersistenceUnitMetadataImpl();
    pumd.setTransactionType(PersistenceUnitTransactionType.JTA);
org.hibernate.ejbHibernatePersistence<init>

Popular methods of HibernatePersistence

  • createContainerEntityManagerFactory
    Create an entity manager factory from the given persistence unit info, using the specified propertie
  • createEntityManagerFactory
    create a factory from a canonical version
  • getProviderUtil

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now