}
}
}
private ServiceRegistry buildLifecycleControledServiceRegistry(BootstrapServiceRegistryBuilder builder) {
final ServiceRegistryBuilder serviceRegistryBuilder = new ServiceRegistryBuilder(
builder.with( new JpaIntegrator() ).build()
);
serviceRegistryBuilder.applySettings( cfg.getProperties() );
configure( (Properties ) null, null );
NamingHelper.bind( this );
final ServiceRegistry serviceRegistry = serviceRegistryBuilder.buildServiceRegistry();
SessionFactoryObserver serviceRegistryCloser = new SessionFactoryObserver() {
@Override
public void sessionFactoryCreated(SessionFactory factory) {
}