HHH-5903 - Rename ServicesRegistry to ServiceRegistry
This commit is contained in:
parent
2aa2dc0c59
commit
b2a7967624
|
@ -146,7 +146,7 @@ import org.hibernate.mapping.TypeDef;
|
|||
import org.hibernate.mapping.UniqueKey;
|
||||
import org.hibernate.proxy.EntityNotFoundDelegate;
|
||||
import org.hibernate.secure.JACCConfiguration;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
|
||||
import org.hibernate.tool.hbm2ddl.IndexMetadata;
|
||||
import org.hibernate.tool.hbm2ddl.TableMetadata;
|
||||
|
@ -1806,7 +1806,7 @@ public class Configuration implements Serializable {
|
|||
*
|
||||
* @throws HibernateException usually indicates an invalid configuration or invalid mapping information
|
||||
*/
|
||||
public SessionFactory buildSessionFactory(ServicesRegistry serviceRegistry) throws HibernateException {
|
||||
public SessionFactory buildSessionFactory(ServiceRegistry serviceRegistry) throws HibernateException {
|
||||
LOG.debugf("Preparing to build session factory with filters : %s", filterDefinitions);
|
||||
|
||||
secondPassCompile();
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import org.hibernate.engine.jdbc.internal.JdbcServicesInitiator;
|
||||
import org.hibernate.service.classloading.internal.ClassLoaderServiceInitiator;
|
||||
import org.hibernate.service.internal.ServicesRegistryImpl;
|
||||
import org.hibernate.service.internal.ServiceRegistryImpl;
|
||||
import org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator;
|
||||
import org.hibernate.service.jdbc.dialect.internal.DialectFactoryInitiator;
|
||||
import org.hibernate.service.jdbc.dialect.internal.DialectResolverInitiator;
|
||||
|
@ -58,8 +58,8 @@ public class ServicesRegistryBootstrap {
|
|||
//serviceInitiators.add( TransactionFactoryInitiator.INSTANCE );
|
||||
}
|
||||
|
||||
public ServicesRegistryImpl initiateServicesRegistry(Map configurationValues) {
|
||||
final ServicesRegistryImpl servicesRegistry = new ServicesRegistryImpl( serviceInitiators );
|
||||
public ServiceRegistryImpl initiateServicesRegistry(Map configurationValues) {
|
||||
final ServiceRegistryImpl servicesRegistry = new ServiceRegistryImpl( serviceInitiators );
|
||||
servicesRegistry.initialize( configurationValues );
|
||||
return servicesRegistry;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.hibernate.engine.jdbc.internal;
|
|||
import java.util.Map;
|
||||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* Standard initiator for the standard {@link JdbcServices} service
|
||||
|
@ -45,7 +45,7 @@ public class JdbcServicesInitiator implements ServiceInitiator<JdbcServices> {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public JdbcServices initiateService(Map configValues, ServicesRegistry registry) {
|
||||
public JdbcServices initiateService(Map configValues, ServiceRegistry registry) {
|
||||
return new JdbcServicesImpl();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ import org.hibernate.persister.entity.Queryable;
|
|||
import org.hibernate.pretty.MessageHelper;
|
||||
import org.hibernate.proxy.EntityNotFoundDelegate;
|
||||
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.stat.ConcurrentStatisticsImpl;
|
||||
import org.hibernate.stat.Statistics;
|
||||
import org.hibernate.stat.StatisticsImplementor;
|
||||
|
@ -171,7 +171,7 @@ public final class SessionFactoryImpl implements SessionFactory, SessionFactoryI
|
|||
private final transient Map fetchProfiles;
|
||||
private final transient Map imports;
|
||||
private final transient Interceptor interceptor;
|
||||
private final transient ServicesRegistry serviceRegistry;
|
||||
private final transient ServiceRegistry serviceRegistry;
|
||||
private final transient Settings settings;
|
||||
private final transient Properties properties;
|
||||
private transient SchemaExport schemaExport;
|
||||
|
@ -196,7 +196,7 @@ public final class SessionFactoryImpl implements SessionFactory, SessionFactoryI
|
|||
public SessionFactoryImpl(
|
||||
Configuration cfg,
|
||||
Mapping mapping,
|
||||
ServicesRegistry serviceRegistry,
|
||||
ServiceRegistry serviceRegistry,
|
||||
Settings settings,
|
||||
EventListeners listeners,
|
||||
SessionFactoryObserver observer) throws HibernateException {
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.hibernate.service.classloading.internal;
|
|||
import java.util.Map;
|
||||
import org.hibernate.service.classloading.spi.ClassLoaderService;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,7 @@ public class ClassLoaderServiceInitiator implements ServiceInitiator<ClassLoader
|
|||
}
|
||||
|
||||
@Override
|
||||
public ClassLoaderService initiateService(Map configurationValues, ServicesRegistry registry) {
|
||||
public ClassLoaderService initiateService(Map configurationValues, ServiceRegistry registry) {
|
||||
return new ClassLoaderServiceImpl( configurationValues );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.hibernate.HibernateLogger;
|
|||
import org.hibernate.internal.util.config.ConfigurationHelper;
|
||||
import org.hibernate.service.spi.Service;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.service.spi.Stoppable;
|
||||
import org.hibernate.service.spi.UnknownServiceException;
|
||||
import org.jboss.logging.Logger;
|
||||
|
@ -42,9 +42,9 @@ import org.jboss.logging.Logger;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class ServicesRegistryImpl implements ServicesRegistry {
|
||||
public class ServiceRegistryImpl implements ServiceRegistry {
|
||||
|
||||
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, ServicesRegistryImpl.class.getName());
|
||||
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, ServiceRegistryImpl.class.getName());
|
||||
|
||||
private final List<ServiceInitiator> serviceInitiators;
|
||||
private ServicesInitializer initializer;
|
||||
|
@ -54,7 +54,7 @@ public class ServicesRegistryImpl implements ServicesRegistry {
|
|||
// iterate it in reverse order which is only available through ListIterator
|
||||
private List<Service> serviceList = new ArrayList<Service>();
|
||||
|
||||
public ServicesRegistryImpl(List<ServiceInitiator> serviceInitiators) {
|
||||
public ServiceRegistryImpl(List<ServiceInitiator> serviceInitiators) {
|
||||
this.serviceInitiators = Collections.unmodifiableList( serviceInitiators );
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ import org.hibernate.service.spi.Manageable;
|
|||
import org.hibernate.service.spi.Service;
|
||||
import org.hibernate.service.spi.ServiceException;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistryAwareService;
|
||||
import org.hibernate.service.spi.ServiceRegistryAwareService;
|
||||
import org.hibernate.service.spi.Startable;
|
||||
import org.hibernate.service.spi.UnknownServiceException;
|
||||
import org.jboss.logging.Logger;
|
||||
|
@ -48,12 +48,12 @@ public class ServicesInitializer {
|
|||
|
||||
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, ServicesInitializer.class.getName());
|
||||
|
||||
private final ServicesRegistryImpl servicesRegistry;
|
||||
private final ServiceRegistryImpl servicesRegistry;
|
||||
private final Map<Class,ServiceInitiator> serviceInitiatorMap;
|
||||
private final Map configurationValues;
|
||||
|
||||
public ServicesInitializer(
|
||||
ServicesRegistryImpl servicesRegistry,
|
||||
ServiceRegistryImpl servicesRegistry,
|
||||
List<ServiceInitiator> serviceInitiators,
|
||||
Map configurationValues) {
|
||||
this.servicesRegistry = servicesRegistry;
|
||||
|
@ -129,8 +129,8 @@ public class ServicesInitializer {
|
|||
( (Configurable) service ).configure( configurationValues );
|
||||
}
|
||||
|
||||
if ( ServicesRegistryAwareService.class.isInstance( service ) ) {
|
||||
( (ServicesRegistryAwareService) service ).injectServices( servicesRegistry );
|
||||
if ( ServiceRegistryAwareService.class.isInstance( service ) ) {
|
||||
( (ServiceRegistryAwareService) service ).injectServices( servicesRegistry );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.hibernate.internal.util.beans.BeanInfoHelper;
|
|||
import org.hibernate.service.classloading.spi.ClassLoaderService;
|
||||
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
/**
|
||||
|
@ -101,7 +101,7 @@ public class ConnectionProviderInitiator implements ServiceInitiator<ConnectionP
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public ConnectionProvider initiateService(Map configurationValues, ServicesRegistry registry) {
|
||||
public ConnectionProvider initiateService(Map configurationValues, ServiceRegistry registry) {
|
||||
final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
|
||||
|
||||
ConnectionProvider connectionProvider = null;
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.hibernate.service.jdbc.dialect.internal;
|
|||
import java.util.Map;
|
||||
import org.hibernate.service.jdbc.dialect.spi.DialectFactory;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* Standard initiator for the standard {@link DialectFactory} service
|
||||
|
@ -45,7 +45,7 @@ public class DialectFactoryInitiator implements ServiceInitiator<DialectFactory>
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public DialectFactory initiateService(Map configVales, ServicesRegistry registry) {
|
||||
public DialectFactory initiateService(Map configVales, ServiceRegistry registry) {
|
||||
return new DialectFactoryImpl();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.hibernate.service.jdbc.dialect.internal;
|
|||
import java.util.Map;
|
||||
import org.hibernate.service.jdbc.dialect.spi.DialectResolver;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* Standard initiator for the standard {@link DialectResolver} service
|
||||
|
@ -45,7 +45,7 @@ public class DialectResolverInitiator implements ServiceInitiator<DialectResolve
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public DialectResolver initiateService(Map configVales, ServicesRegistry registry) {
|
||||
public DialectResolver initiateService(Map configVales, ServiceRegistry registry) {
|
||||
return new StandardDialectResolver();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Map;
|
|||
import org.hibernate.internal.util.config.ConfigurationHelper;
|
||||
import org.hibernate.service.jmx.spi.JmxService;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* Standard initiator for the standard {@link JmxService} service
|
||||
|
@ -43,7 +43,7 @@ public class JmxServiceInitiator implements ServiceInitiator<JmxService> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public JmxService initiateService(Map configValues, ServicesRegistry registry) {
|
||||
public JmxService initiateService(Map configValues, ServiceRegistry registry) {
|
||||
return ConfigurationHelper.getBoolean( JMX_ENABLED, configValues, false )
|
||||
? new JmxServiceImpl( configValues )
|
||||
: DisabledJmxServiceImpl.INSTANCE;
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.hibernate.service.jndi.internal;
|
|||
import java.util.Map;
|
||||
import org.hibernate.service.jndi.spi.JndiService;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* Standard initiator for the standard {@link JndiService} service
|
||||
|
@ -41,7 +41,7 @@ public class JndiServiceInitiator implements ServiceInitiator<JndiService> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public JndiService initiateService(Map configurationValues, ServicesRegistry registry) {
|
||||
public JndiService initiateService(Map configurationValues, ServiceRegistry registry) {
|
||||
return new JndiServiceImpl( configurationValues );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.hibernate.HibernateException;
|
|||
import org.hibernate.service.classloading.spi.ClassLoaderService;
|
||||
import org.hibernate.service.jta.platform.spi.JtaPlatform;
|
||||
import org.hibernate.service.spi.ServiceInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* Standard initiator for the standard {@link org.hibernate.service.jta.platform.spi.JtaPlatform}
|
||||
|
@ -49,7 +49,7 @@ public class JtaPlatformInitiator implements ServiceInitiator<JtaPlatform> {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public JtaPlatform initiateService(Map configVales, ServicesRegistry registry) {
|
||||
public JtaPlatform initiateService(Map configVales, ServiceRegistry registry) {
|
||||
final Object platform = configVales.get( JTA_PLATFORM );
|
||||
if ( JtaPlatform.class.isInstance( platform ) ) {
|
||||
return (JtaPlatform) platform;
|
||||
|
|
|
@ -45,5 +45,5 @@ public interface ServiceInitiator<T extends Service> {
|
|||
*
|
||||
* @return The initiated service.
|
||||
*/
|
||||
public T initiateService(Map configurationValues, ServicesRegistry registry);
|
||||
public T initiateService(Map configurationValues, ServiceRegistry registry);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ package org.hibernate.service.spi;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface ServicesRegistry {
|
||||
public interface ServiceRegistry {
|
||||
/**
|
||||
* Retrieve a service by role.
|
||||
*
|
|
@ -25,15 +25,15 @@ package org.hibernate.service.spi;
|
|||
|
||||
|
||||
/**
|
||||
* Allows services to be injected with the {@link ServicesRegistry} during configuration phase.
|
||||
* Allows services to be injected with the {@link ServiceRegistry} during configuration phase.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface ServicesRegistryAwareService {
|
||||
public interface ServiceRegistryAwareService {
|
||||
/**
|
||||
* Callback to inject the regsitry.
|
||||
* Callback to inject the registry.
|
||||
*
|
||||
* @param servicesRegistry The registry
|
||||
* @param serviceRegistry The registry
|
||||
*/
|
||||
public void injectServices(ServicesRegistry servicesRegistry);
|
||||
public void injectServices(ServiceRegistry serviceRegistry);
|
||||
}
|
|
@ -30,7 +30,7 @@ import org.hibernate.dialect.H2Dialect;
|
|||
import org.hibernate.engine.jdbc.internal.JdbcServicesInitiator;
|
||||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||
import org.hibernate.service.classloading.internal.ClassLoaderServiceInitiator;
|
||||
import org.hibernate.service.internal.ServicesRegistryImpl;
|
||||
import org.hibernate.service.internal.ServiceRegistryImpl;
|
||||
import org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator;
|
||||
import org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl;
|
||||
import org.hibernate.service.jdbc.dialect.internal.DialectFactoryInitiator;
|
||||
|
@ -45,13 +45,14 @@ import org.hibernate.testing.junit.UnitTestCase;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class ServiceBootstrappingTest extends UnitTestCase {
|
||||
private ServicesRegistryImpl servicesRegistry;
|
||||
private ServiceRegistryImpl servicesRegistry;
|
||||
|
||||
public ServiceBootstrappingTest(String string) {
|
||||
super( string );
|
||||
}
|
||||
|
||||
protected void setUp() {
|
||||
@Override
|
||||
protected void setUp() {
|
||||
List<ServiceInitiator> serviceInitiators = new ArrayList<ServiceInitiator>();
|
||||
serviceInitiators.add( ClassLoaderServiceInitiator.INSTANCE );
|
||||
serviceInitiators.add( ConnectionProviderInitiator.INSTANCE );
|
||||
|
@ -59,10 +60,11 @@ public class ServiceBootstrappingTest extends UnitTestCase {
|
|||
serviceInitiators.add( DialectFactoryInitiator.INSTANCE );
|
||||
serviceInitiators.add( JdbcServicesInitiator.INSTANCE );
|
||||
|
||||
servicesRegistry = new ServicesRegistryImpl( serviceInitiators );
|
||||
servicesRegistry = new ServiceRegistryImpl( serviceInitiators );
|
||||
}
|
||||
|
||||
protected void tearDown() {
|
||||
@Override
|
||||
protected void tearDown() {
|
||||
servicesRegistry.destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
package org.hibernate.test.cfg.internal;
|
||||
import org.hibernate.cfg.internal.ServicesRegistryBootstrap;
|
||||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||
import org.hibernate.service.internal.ServicesRegistryImpl;
|
||||
import org.hibernate.service.internal.ServiceRegistryImpl;
|
||||
import org.hibernate.test.common.ConnectionProviderBuilder;
|
||||
import org.hibernate.testing.junit.UnitTestCase;
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class TestServicesRegistryBootstrapping extends UnitTestCase {
|
|||
}
|
||||
|
||||
public void testBasicBootstrapping() {
|
||||
ServicesRegistryImpl servicesRegistry = new ServicesRegistryBootstrap().initiateServicesRegistry(
|
||||
ServiceRegistryImpl servicesRegistry = new ServicesRegistryBootstrap().initiateServicesRegistry(
|
||||
ConnectionProviderBuilder.getConnectionProviderProperties()
|
||||
);
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
package org.hibernate.test.common;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import org.hibernate.cfg.Environment;
|
||||
|
@ -30,14 +31,14 @@ import org.hibernate.engine.jdbc.internal.JdbcServicesImpl;
|
|||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||
import org.hibernate.internal.util.config.ConfigurationHelper;
|
||||
import org.hibernate.service.classloading.spi.ClassLoaderService;
|
||||
import org.hibernate.service.internal.ServicesRegistryImpl;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.internal.ServiceRegistryImpl;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
|
||||
/**
|
||||
* @author Gail Badner
|
||||
*/
|
||||
public class ServiceRegistryHolder {
|
||||
private final ServicesRegistryImpl serviceRegistry;
|
||||
private final ServiceRegistryImpl serviceRegistry;
|
||||
private final Properties properties;
|
||||
|
||||
public ServiceRegistryHolder(Map props) {
|
||||
|
@ -53,7 +54,7 @@ public class ServiceRegistryHolder {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public ServicesRegistry getServiceRegistry() {
|
||||
public ServiceRegistry getServiceRegistry() {
|
||||
return serviceRegistry;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.hibernate.TestLogger;
|
|||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.test.common.ServiceRegistryHolder;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
|
@ -93,7 +93,7 @@ public abstract class UnitTestCase extends junit.framework.TestCase {
|
|||
}
|
||||
}
|
||||
|
||||
protected ServicesRegistry getServiceRegistry() {
|
||||
protected ServiceRegistry getServiceRegistry() {
|
||||
if ( serviceRegistryHolder == null ) {
|
||||
serviceRegistryHolder = new ServiceRegistryHolder( Environment.getProperties() );
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.hibernate.mapping.PersistentClass;
|
|||
import org.hibernate.mapping.Property;
|
||||
import org.hibernate.mapping.SimpleValue;
|
||||
import org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.test.common.ServiceRegistryHolder;
|
||||
|
||||
/**
|
||||
|
@ -78,7 +78,7 @@ public class ExecutionEnvironment {
|
|||
return configuration;
|
||||
}
|
||||
|
||||
public ServicesRegistry getServiceRegistry() {
|
||||
public ServiceRegistry getServiceRegistry() {
|
||||
return serviceRegistryHolder.getServiceRegistry();
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.hibernate.cfg.Environment;
|
|||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.engine.jdbc.spi.JdbcServices;
|
||||
import org.hibernate.jdbc.Work;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.test.common.ServiceRegistryHolder;
|
||||
import org.hibernate.testing.junit.DialectChecks;
|
||||
import org.hibernate.testing.junit.FailureExpected;
|
||||
|
@ -145,7 +145,7 @@ public abstract class HibernateTestCase extends TestCase {
|
|||
handleUnclosedResources();
|
||||
}
|
||||
|
||||
protected ServicesRegistry getServiceRegistry() {
|
||||
protected ServiceRegistry getServiceRegistry() {
|
||||
if ( serviceRegistryHolder == null ) {
|
||||
serviceRegistryHolder = new ServiceRegistryHolder( Environment.getProperties() );
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ import org.hibernate.mapping.PersistentClass;
|
|||
import org.hibernate.proxy.EntityNotFoundDelegate;
|
||||
import org.hibernate.secure.JACCConfiguration;
|
||||
import org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator;
|
||||
import org.hibernate.service.spi.ServicesRegistry;
|
||||
import org.hibernate.service.spi.ServiceRegistry;
|
||||
import org.hibernate.transaction.JDBCTransactionFactory;
|
||||
import org.hibernate.util.CollectionHelper;
|
||||
import org.hibernate.util.ReflectHelper;
|
||||
|
@ -1470,7 +1470,7 @@ public class Ejb3Configuration implements Serializable, Referenceable {
|
|||
return cfg.getEventListeners();
|
||||
}
|
||||
|
||||
SessionFactory buildSessionFactory(ServicesRegistry serviceRegistry) throws HibernateException {
|
||||
SessionFactory buildSessionFactory(ServiceRegistry serviceRegistry) throws HibernateException {
|
||||
return cfg.buildSessionFactory( serviceRegistry );
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import org.hibernate.ejb.util.PersistenceUtilHelper;
|
|||
import org.hibernate.engine.SessionFactoryImplementor;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
import org.hibernate.metadata.ClassMetadata;
|
||||
import org.hibernate.service.internal.ServicesRegistryImpl;
|
||||
import org.hibernate.service.internal.ServiceRegistryImpl;
|
||||
|
||||
/**
|
||||
* Actual Hiberate implementation of {@link javax.persistence.EntityManagerFactory}.
|
||||
|
@ -55,7 +55,7 @@ import org.hibernate.service.internal.ServicesRegistryImpl;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory {
|
||||
private final transient ServicesRegistryImpl serviceRegistry;
|
||||
private final transient ServiceRegistryImpl serviceRegistry;
|
||||
private final SessionFactory sessionFactory;
|
||||
private final PersistenceUnitTransactionType transactionType;
|
||||
private final boolean discardOnClose;
|
||||
|
|
Loading…
Reference in New Issue