HHH-9727 - Slight redesign to bootstrapping APIs to allow for OGM bootstrapping

This commit is contained in:
Steve Ebersole 2015-04-21 13:49:06 -05:00
parent e8af41637f
commit d2c50f16f2
2 changed files with 600 additions and 330 deletions

View File

@ -27,6 +27,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.hibernate.boot.internal.SessionFactoryBuilderImpl;
import org.hibernate.boot.internal.SessionFactoryOptionsImpl;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
@ -103,7 +104,11 @@ public class CacheTestUtil {
regionFactory = (InfinispanRegionFactory) clazz.newInstance();
}
final SessionFactoryOptionsImpl sessionFactoryOptions = new SessionFactoryOptionsImpl( (StandardServiceRegistry) serviceRegistry );
final SessionFactoryOptionsImpl sessionFactoryOptions = new SessionFactoryOptionsImpl(
new SessionFactoryBuilderImpl.SessionFactoryOptionsStateStandardImpl(
(StandardServiceRegistry) serviceRegistry
)
);
final Settings settings = new Settings( sessionFactoryOptions );
final Properties properties = toProperties( cfgService.getSettings() );