get rid of hangovers from HEM merge

make a rough start on cleaning up EntityManagerFactoryBuilderImpl

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-09-03 00:36:12 +02:00
parent 049610b90d
commit 1f48e8c41d
16 changed files with 326 additions and 473 deletions

View File

@ -143,7 +143,7 @@ import static org.hibernate.jpa.internal.util.FlushModeTypeHelper.getFlushModeTy
* @author Steve Ebersole
*/
public abstract class AbstractSharedSessionContract implements SharedSessionContractImplementor {
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( SessionImpl.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( SessionImpl.class );
private transient SessionFactoryImpl factory;
protected transient FastSessionServices fastSessionServices;

View File

@ -48,7 +48,7 @@ import static org.jboss.logging.Logger.Level.WARN;
* New messages must be added after the last message defined to ensure message codes are unique.
*/
@MessageLogger(projectCode = "HHH")
@ValidIdRange(min=2,max = 10000)
@ValidIdRange(min=2,max = 20000)
public interface CoreMessageLogger extends BasicLogger {
@LogMessage(level = WARN)
@ -937,4 +937,37 @@ public interface CoreMessageLogger extends BasicLogger {
@Message(value = "Flushing and evicting managed instance of type [%s] before removing detached instance with same id",
id = 530)
void flushAndEvictOnRemove(String entityName);
@LogMessage(level = ERROR)
@Message(value = "Illegal argument on static metamodel field injection : %s#%s; expected type : %s; encountered type : %s", id = 15007)
void illegalArgumentOnStaticMetamodelFieldInjection(
String name,
String name2,
String name3,
String name4);
@LogMessage(level = WARN)
@Message(value = "Unable to locate static metamodel field : %s#%s; this may or may not indicate a problem with the static metamodel", id = 15011)
void unableToLocateStaticMetamodelField(
String name,
String name2);
@LogMessage(level = DEBUG)
@Message(value = "Returning null (as required by JPA spec) rather than throwing EntityNotFoundException, " +
"as the entity (type=%s, id=%s) does not exist", id = 15013)
void ignoringEntityNotFound(String entityName, String identifier);
@LogMessage(level = DEBUG)
@Message(
id = 15015,
value = "Encountered a MappedSuperclass [%s] not used in any entity hierarchy"
)
void unusedMappedSuperclass(String name);
@LogMessage(level = WARN)
@Message(
id = 15018,
value = "Encountered multiple persistence-unit stanzas defining same name [%s]; persistence-unit names must be unique"
)
void duplicatedPersistenceUnitName(String name);
}

View File

@ -1,73 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.internal;
import org.jboss.logging.annotations.LogMessage;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.annotations.ValidIdRange;
import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.ERROR;
import static org.jboss.logging.Logger.Level.WARN;
/**
* {@link MessageLogger} originally for the no-longer existing hibernate-entitymanager module.
*/
@MessageLogger(projectCode = "HHH")
@ValidIdRange( min = 15001, max = 20000 )
public interface EntityManagerMessageLogger extends CoreMessageLogger {
@LogMessage(level = ERROR)
@Message(value = "Illegal argument on static metamodel field injection : %s#%s; expected type : %s; encountered type : %s", id = 15007)
void illegalArgumentOnStaticMetamodelFieldInjection(
String name,
String name2,
String name3,
String name4);
@LogMessage(level = WARN)
@Message(value = "Unable to locate static metamodel field : %s#%s; this may or may not indicate a problem with the static metamodel", id = 15011)
void unableToLocateStaticMetamodelField(
String name,
String name2);
@LogMessage(level = DEBUG)
@Message(value = "Returning null (as required by JPA spec) rather than throwing EntityNotFoundException, " +
"as the entity (type=%s, id=%s) does not exist", id = 15013)
void ignoringEntityNotFound(String entityName, String identifier);
@LogMessage(level = DEBUG)
@Message(
id = 15015,
value = "Encountered a MappedSuperclass [%s] not used in any entity hierarchy"
)
void unusedMappedSuperclass(String name);
@LogMessage(level = WARN)
@Message(
id = 15016,
value = "Encountered a deprecated jakarta.persistence.spi.PersistenceProvider [%s]; [%s] will be used instead."
)
void deprecatedPersistenceProvider(String deprecated, String replacement);
@LogMessage(level = WARN)
@Message(
id = 15017,
value = "'hibernate.ejb.use_class_enhancer' property is deprecated. " +
"Use 'hibernate.enhance.enable[...]' properties instead to enable each individual feature."
)
void deprecatedInstrumentationProperty();
@LogMessage(level = WARN)
@Message(
id = 15018,
value = "Encountered multiple persistence-unit stanzas defining same name [%s]; persistence-unit names must be unique"
)
void duplicatedPersistenceUnitName(String name);
}

View File

@ -44,7 +44,7 @@ import jakarta.persistence.RollbackException;
* @author Andrea Boriero
*/
public class ExceptionConverterImpl implements ExceptionConverter {
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( ExceptionConverterImpl.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( ExceptionConverterImpl.class );
private final SharedSessionContractImplementor session;
private final boolean isJpaBootstrap;

View File

@ -1,38 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.internal;
import org.jboss.logging.Logger;
import java.lang.invoke.MethodHandles;
/**
* @author Steve Ebersole
*/
public class HEMLogging {
/**
* Disallow instantiation
*/
private HEMLogging() {
}
public static EntityManagerMessageLogger messageLogger(Class<?> classNeedingLogging) {
return messageLogger( classNeedingLogging.getName() );
}
public static EntityManagerMessageLogger messageLogger(String loggerName) {
return Logger.getMessageLogger( MethodHandles.lookup(), EntityManagerMessageLogger .class, loggerName );
}
public static Logger logger(Class<?> classNeedingLogging) {
return Logger.getLogger( classNeedingLogging );
}
public static Logger logger(String loggerName) {
return Logger.getLogger( loggerName );
}
}

View File

@ -218,7 +218,7 @@ public class SessionImpl
extends AbstractSharedSessionContract
implements Serializable, SharedSessionContractImplementor, JdbcSessionOwner, SessionImplementor, EventSource,
TransactionCoordinatorBuilder.Options, WrapperOptions, LoadAccessContext {
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( SessionImpl.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( SessionImpl.class );
// Defaults to null which means the properties are the default
// as defined in FastSessionServices#defaultSessionProperties

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.jpa;
import static org.hibernate.internal.HEMLogging.messageLogger;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
@ -22,7 +20,8 @@ import jakarta.persistence.spi.PersistenceUnitInfo;
import jakarta.persistence.spi.ProviderUtil;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.jpa.boot.spi.PersistenceConfigurationDescriptor;
import org.hibernate.jpa.boot.spi.PersistenceXmlParser;
import org.hibernate.jpa.boot.spi.Bootstrap;
@ -39,7 +38,7 @@ import org.hibernate.jpa.internal.util.PersistenceUtilHelper;
* @author Brett Meyer
*/
public class HibernatePersistenceProvider implements PersistenceProvider {
private static final EntityManagerMessageLogger log = messageLogger( HibernatePersistenceProvider.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( HibernatePersistenceProvider.class );
private final PersistenceUtilHelper.MetadataCache cache = new PersistenceUtilHelper.MetadataCache();

View File

@ -30,7 +30,8 @@ import org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl;
import org.hibernate.boot.registry.classloading.internal.TcclLookupPrecedence;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.log.DeprecationLogger;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
@ -39,8 +40,6 @@ import org.hibernate.jpa.internal.util.ConfigurationHelper;
import jakarta.persistence.PersistenceException;
import jakarta.persistence.spi.PersistenceUnitTransactionType;
import static org.hibernate.internal.HEMLogging.messageLogger;
/**
* Used by Hibernate to parse {@code persistence.xml} files in SE environments.
*
@ -48,7 +47,7 @@ import static org.hibernate.internal.HEMLogging.messageLogger;
*/
public final class PersistenceXmlParser {
private static final EntityManagerMessageLogger LOG = messageLogger( PersistenceXmlParser.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( PersistenceXmlParser.class );
/**
* @return A {@link PersistenceXmlParser} using no settings at all.
@ -160,10 +159,10 @@ public final class PersistenceXmlParser {
}
@SuppressWarnings("removal")
protected void parsePersistenceXml(Map<String, PersistenceUnitDescriptor> persistenceUnits,
private void parsePersistenceXml(Map<String, PersistenceUnitDescriptor> persistenceUnits,
URL xmlUrl, PersistenceUnitTransactionType defaultTransactionType) {
if ( LOG.isTraceEnabled() ) {
LOG.tracef( "Attempting to parse persistence.xml file : %s", xmlUrl.toExternalForm() );
if ( log.isTraceEnabled() ) {
log.tracef( "Attempting to parse persistence.xml file : %s", xmlUrl.toExternalForm() );
}
final URL persistenceUnitRootUrl = ArchiveHelper.getJarURLFromURLEntry( xmlUrl, "/META-INF/persistence.xml" );
@ -175,12 +174,12 @@ public final class PersistenceXmlParser {
final JaxbPersistenceImpl.JaxbPersistenceUnitImpl jaxbPersistenceUnit = jaxbPersistenceUnits.get( i );
if ( persistenceUnits.containsKey( jaxbPersistenceUnit.getName() ) ) {
LOG.duplicatedPersistenceUnitName( jaxbPersistenceUnit.getName() );
log.duplicatedPersistenceUnitName( jaxbPersistenceUnit.getName() );
continue;
}
final ParsedPersistenceXmlDescriptor persistenceUnitDescriptor = new ParsedPersistenceXmlDescriptor(
persistenceUnitRootUrl );
final ParsedPersistenceXmlDescriptor persistenceUnitDescriptor =
new ParsedPersistenceXmlDescriptor( persistenceUnitRootUrl );
bindPersistenceUnit( jaxbPersistenceUnit, persistenceUnitDescriptor );
// per JPA spec, any settings passed in to PersistenceProvider bootstrap methods should override
@ -196,7 +195,7 @@ public final class PersistenceXmlParser {
ParsedPersistenceXmlDescriptor persistenceUnitDescriptor) {
final String name = jaxbPersistenceUnit.getName();
if ( StringHelper.isNotEmpty( name ) ) {
LOG.tracef( "Persistence unit name from persistence.xml : %s", name );
log.tracef( "Persistence unit name from persistence.xml : %s", name );
persistenceUnitDescriptor.setName( name );
}

View File

@ -12,8 +12,8 @@ import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.jboss.logging.Logger;
@ -22,7 +22,7 @@ import org.jboss.logging.Logger;
* @author Steve Ebersole
*/
public final class LogHelper {
private static final EntityManagerMessageLogger log = Logger.getMessageLogger( MethodHandles.lookup(), EntityManagerMessageLogger.class, LogHelper.class.getName() );
private static final CoreMessageLogger log = Logger.getMessageLogger( MethodHandles.lookup(), CoreMessageLogger.class, LogHelper.class.getName() );
private LogHelper() {
}

View File

@ -16,8 +16,8 @@ import org.hibernate.AssertionFailure;
import org.hibernate.PropertyNotFoundException;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.HEMLogging;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.mapping.AggregateColumn;
import org.hibernate.mapping.Any;
import org.hibernate.mapping.Collection;
@ -86,7 +86,7 @@ import jakarta.persistence.metamodel.Type;
* @author Emmanuel Bernard
*/
public class AttributeFactory {
private static final EntityManagerMessageLogger LOG = HEMLogging.messageLogger( AttributeFactory.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( AttributeFactory.class );
private final MetadataContext context;
@ -114,10 +114,10 @@ public class AttributeFactory {
MetadataContext metadataContext) {
if ( property.isSynthetic() ) {
// hide synthetic/virtual properties (fabricated by Hibernate) from the JPA metamodel.
LOG.tracef( "Skipping synthetic property %s(%s)", ownerType.getTypeName(), property.getName() );
log.tracef( "Skipping synthetic property %s(%s)", ownerType.getTypeName(), property.getName() );
return null;
}
LOG.tracef( "Building attribute [%s.%s]", ownerType.getTypeName(), property.getName() );
log.tracef( "Building attribute [%s.%s]", ownerType.getTypeName(), property.getName() );
final AttributeContext<X> attributeContext = wrap( ownerType, property );
final AttributeMetadata<X, Y> attributeMetadata = determineAttributeMetadata(
attributeContext,
@ -180,7 +180,7 @@ public class AttributeFactory {
public <X, Y> SingularPersistentAttribute<X, Y> buildIdAttribute(
IdentifiableDomainType<X> ownerType,
Property property) {
LOG.tracef( "Building identifier attribute [%s.%s]", ownerType.getTypeName(), property.getName() );
log.tracef( "Building identifier attribute [%s.%s]", ownerType.getTypeName(), property.getName() );
final AttributeMetadata<X, Y> attributeMetadata =
determineAttributeMetadata( wrap( ownerType, property ), identifierMemberResolver );
@ -211,7 +211,7 @@ public class AttributeFactory {
public <X, Y> SingularAttributeImpl<X, Y> buildVersionAttribute(
IdentifiableDomainType<X> ownerType,
Property property) {
LOG.tracef( "Building version attribute [%s.%s]", ownerType.getTypeName(), property.getName() );
log.tracef( "Building version attribute [%s.%s]", ownerType.getTypeName(), property.getName() );
final AttributeMetadata<X, Y> attributeMetadata =
determineAttributeMetadata( wrap( ownerType, property ), versionMemberResolver );
@ -455,14 +455,14 @@ public class AttributeFactory {
final Property propertyMapping = attributeContext.getPropertyMapping();
final String propertyName = propertyMapping.getName();
LOG.tracef( "Starting attribute metadata determination [%s]", propertyName );
log.tracef( "Starting attribute metadata determination [%s]", propertyName );
final Member member = memberResolver.resolveMember( attributeContext, context );
LOG.tracef( " Determined member [%s]", member );
log.tracef( " Determined member [%s]", member );
final Value value = propertyMapping.getValue();
final org.hibernate.type.Type type = value.getType();
LOG.tracef( " Determined type [name=%s, class=%s]", type.getName(), type.getClass().getName() );
log.tracef( " Determined type [name=%s, class=%s]", type.getName(), type.getClass().getName() );
if ( type instanceof AnyType ) {
return new SingularAttributeMetadataImpl<>(

View File

@ -22,8 +22,8 @@ import org.hibernate.MappingException;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.HEMLogging;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.mapping.Component;
@ -75,7 +75,7 @@ import jakarta.persistence.metamodel.Type;
*/
@Internal
public class MetadataContext {
private static final EntityManagerMessageLogger LOG = HEMLogging.messageLogger( MetadataContext.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( MetadataContext.class );
private final JpaMetamodelImplementor jpaMetamodel;
private final RuntimeModelCreationContext runtimeModelCreationContext;
@ -288,8 +288,8 @@ public class MetadataContext {
@SuppressWarnings("unchecked")
public void wrapUp() {
if ( LOG.isTraceEnabled() ) {
LOG.trace( "Wrapping up metadata context..." );
if ( log.isTraceEnabled() ) {
log.trace( "Wrapping up metadata context..." );
}
final boolean staticMetamodelScanEnabled =
@ -300,8 +300,8 @@ public class MetadataContext {
for ( Object mapping : orderedMappings ) {
if ( PersistentClass.class.isAssignableFrom( mapping.getClass() ) ) {
final PersistentClass safeMapping = (PersistentClass) mapping;
if ( LOG.isTraceEnabled() ) {
LOG.trace( "Starting entity [" + safeMapping.getEntityName() + ']' );
if ( log.isTraceEnabled() ) {
log.trace( "Starting entity [" + safeMapping.getEntityName() + ']' );
}
try {
final EntityDomainType<Object> jpaMapping = (EntityDomainType<Object>)
@ -343,15 +343,15 @@ public class MetadataContext {
}
}
finally {
if ( LOG.isTraceEnabled() ) {
LOG.trace( "Completed entity [" + safeMapping.getEntityName() + ']' );
if ( log.isTraceEnabled() ) {
log.trace( "Completed entity [" + safeMapping.getEntityName() + ']' );
}
}
}
else if ( MappedSuperclass.class.isAssignableFrom( mapping.getClass() ) ) {
final MappedSuperclass safeMapping = (MappedSuperclass) mapping;
if ( LOG.isTraceEnabled() ) {
LOG.trace( "Starting mapped superclass [" + safeMapping.getMappedClass().getName() + ']' );
if ( log.isTraceEnabled() ) {
log.trace( "Starting mapped superclass [" + safeMapping.getMappedClass().getName() + ']' );
}
try {
final MappedSuperclassDomainType<Object> jpaType = (MappedSuperclassDomainType<Object>)
@ -387,8 +387,8 @@ public class MetadataContext {
}
}
finally {
if ( LOG.isTraceEnabled() ) {
LOG.trace( "Completed mapped superclass [" + safeMapping.getMappedClass().getName() + ']' );
if ( log.isTraceEnabled() ) {
log.trace( "Completed mapped superclass [" + safeMapping.getMappedClass().getName() + ']' );
}
}
}
@ -646,8 +646,8 @@ public class MetadataContext {
private <X> Set<SingularPersistentAttribute<? super X, ?>> buildIdClassAttributes(
IdentifiableDomainType<X> ownerType,
List<Property> properties) {
if ( LOG.isTraceEnabled() ) {
LOG.trace( "Building old-school composite identifier [" + ownerType.getJavaType().getName() + ']' );
if ( log.isTraceEnabled() ) {
log.trace( "Building old-school composite identifier [" + ownerType.getJavaType().getName() + ']' );
}
Set<SingularPersistentAttribute<? super X, ?>> attributes = new HashSet<>();
for ( Property property : properties ) {
@ -732,14 +732,14 @@ public class MetadataContext {
injectField( metamodelClass, name, attribute, allowNonDeclaredFieldReference );
}
catch (NoSuchFieldException e) {
LOG.unableToLocateStaticMetamodelField( metamodelClass.getName(), name );
log.unableToLocateStaticMetamodelField( metamodelClass.getName(), name );
// throw new AssertionFailure(
// "Unable to locate static metamodel field : " + metamodelClass.getName() + '#' + name
// );
}
}
private static <X> void injectField(
private static void injectField(
Class<?> metamodelClass, String name, Object model,
boolean allowNonDeclaredFieldReference)
throws NoSuchFieldException {
@ -770,7 +770,7 @@ public class MetadataContext {
// + "; expected type : " + attribute.getClass().getName()
// + "; encountered type : " + field.getType().getName()
// );
LOG.illegalArgumentOnStaticMetamodelFieldInjection(
log.illegalArgumentOnStaticMetamodelFieldInjection(
metamodelClass.getName(),
name,
model.getClass().getName(),

View File

@ -33,8 +33,8 @@ import org.hibernate.graph.spi.AttributeNodeImplementor;
import org.hibernate.graph.spi.GraphImplementor;
import org.hibernate.graph.spi.RootGraphImplementor;
import org.hibernate.graph.spi.SubGraphImplementor;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.HEMLogging;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.jpa.spi.JpaCompliance;
import org.hibernate.mapping.MappedSuperclass;
@ -43,7 +43,6 @@ import org.hibernate.metamodel.MappingMetamodel;
import org.hibernate.metamodel.internal.JpaMetaModelPopulationSetting;
import org.hibernate.metamodel.internal.JpaStaticMetaModelPopulationSetting;
import org.hibernate.metamodel.internal.MetadataContext;
import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
import org.hibernate.metamodel.model.domain.EntityDomainType;
import org.hibernate.metamodel.model.domain.IdentifiableDomainType;
@ -76,7 +75,7 @@ import jakarta.persistence.metamodel.Type;
* @author Steve Ebersole
*/
public class JpaMetamodelImpl implements JpaMetamodelImplementor, Serializable {
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( JpaMetamodel.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( JpaMetamodel.class );
private static class ImportInfo<T> {
final String importedName;

View File

@ -32,8 +32,8 @@ import org.hibernate.cache.spi.access.EntityDataAccess;
import org.hibernate.cache.spi.access.NaturalIdDataAccess;
import org.hibernate.graph.RootGraph;
import org.hibernate.graph.spi.RootGraphImplementor;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.HEMLogging;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.QueryParameterBindingTypeResolverImpl;
import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.jpa.spi.JpaCompliance;
@ -99,7 +99,7 @@ import static org.hibernate.metamodel.internal.JpaStaticMetaModelPopulationSetti
public class MappingMetamodelImpl extends QueryParameterBindingTypeResolverImpl
implements MappingMetamodelImplementor, MetamodelImplementor, Serializable {
// todo : Integrate EntityManagerLogger into CoreMessageLogger
private static final EntityManagerMessageLogger log = HEMLogging.messageLogger( MappingMetamodelImpl.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( MappingMetamodelImpl.class );
//NOTE: we suppress deprecation warnings because at the moment we
//implement a deprecated API so have to override deprecated things

View File

@ -32,8 +32,8 @@ import org.hibernate.LockMode;
import org.hibernate.LockOptions;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.graph.GraphSemantic;
import org.hibernate.internal.EntityManagerMessageLogger;
import org.hibernate.internal.HEMLogging;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.jpa.AvailableHints;
import org.hibernate.jpa.internal.util.FlushModeTypeHelper;
import org.hibernate.jpa.internal.util.LockModeTypeHelper;
@ -75,7 +75,7 @@ import static org.hibernate.jpa.SpecHints.HINT_SPEC_QUERY_TIMEOUT;
public abstract class AbstractQuery<R>
extends AbstractSelectionQuery<R>
implements QueryImplementor<R> {
protected static final EntityManagerMessageLogger log = HEMLogging.messageLogger( AbstractQuery.class );
protected static final CoreMessageLogger log = CoreLogging.messageLogger( AbstractQuery.class );
public AbstractQuery(SharedSessionContractImplementor session) {
super( session );

View File

@ -8,7 +8,7 @@ package org.hibernate.orm.test.jpa.transaction.batch;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.hibernate.internal.HEMLogging;
import org.hibernate.internal.CoreLogging;
import org.hibernate.jpa.boot.spi.ProviderChecker;
import org.hibernate.testing.jta.JtaAwareConnectionProviderImpl;
@ -34,7 +34,7 @@ public abstract class AbstractJtaBatchTest extends AbstractBatchingTest {
@RegisterExtension
public LoggerInspectionExtension logger = LoggerInspectionExtension.builder()
.setLogger( HEMLogging.messageLogger( ProviderChecker.class.getName() ) )
.setLogger( CoreLogging.messageLogger( ProviderChecker.class.getName() ) )
.build();
@BeforeEach