public Ejb3Configuration configure(String resource) throws HibernateException { Thread thread = null; ClassLoader contextClassLoader = null; if (overridenClassLoader != null) { thread = Thread.currentThread(); contextClassLoader = thread.getContextClassLoader(); thread.setContextClassLoader( overridenClassLoader ); } try { Properties properties = new Properties(); properties.setProperty( HibernatePersistence.CFG_FILE, resource); configure( properties, new HashMap() ); return this; } finally { if (thread != null) thread.setContextClassLoader( contextClassLoader ); } }
dataSource = info.getNonJtaDataSource(); cfg.setDataSource(dataSource); Properties unitProperties = cfg.getProperties(); unitProperties.setProperty(HIBERNATE_LOOKUP, F3TransactionManagerLookup.class.getName());
this.setDataSource( isJTA ? info.getJtaDataSource() : info.getNonJtaDataSource() );
this.setDataSource( isJTA ? info.getJtaDataSource() : info.getNonJtaDataSource() );