synchronized(this) {
if (configuration == null) {
Ejb3Configuration temp = new Ejb3Configuration();
String previousValue = persistenceUnitInfo.getProperties().getProperty("hibernate.hbm2ddl.auto");
persistenceUnitInfo.getProperties().setProperty("hibernate.hbm2ddl.auto", "none");
configuration = temp.configure(persistenceUnitInfo, new HashMap());
configuration.getHibernateConfiguration().buildSessionFactory();
if (previousValue != null) {
persistenceUnitInfo.getProperties().setProperty("hibernate.hbm2ddl.auto", previousValue);
}
}