Package org.hibernate.cfg

Examples of org.hibernate.cfg.SettingsFactory.buildSettings()


              ClassPathXmlApplicationContext newContext = new SmartClassPathXmlApplicationContext(emfContextLocation);
              try {
                // get a reference to the factory bean, don't have it create a new EntityManager
                  LocalContainerEntityManagerFactoryBean factoryBean = newContext.getBean("&" + emfContextBeanName, LocalContainerEntityManagerFactoryBean.class);
                  SettingsFactory settingsFactory = new InjectedDataSourceSettingsFactory(factoryBean.getDataSource());
                  settings = settingsFactory.buildSettings(new Properties());
              }
              finally {
                newContext.close();
              }
          }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.