HHH-12441 - Deprecate hibernate-ehcache
This commit is contained in:
parent
c10dbe9d9c
commit
9ba05c1e6b
|
@ -24,9 +24,11 @@ import static org.jboss.logging.Logger.Level.WARN;
|
||||||
@MessageLogger( projectCode = "HHH" )
|
@MessageLogger( projectCode = "HHH" )
|
||||||
@ValidIdRange( min = 90000001, max = 90001000 )
|
@ValidIdRange( min = 90000001, max = 90001000 )
|
||||||
public interface DeprecationLogger extends BasicLogger {
|
public interface DeprecationLogger extends BasicLogger {
|
||||||
|
String CATEGORY = "org.hibernate.orm.deprecation";
|
||||||
|
|
||||||
DeprecationLogger DEPRECATION_LOGGER = Logger.getMessageLogger(
|
DeprecationLogger DEPRECATION_LOGGER = Logger.getMessageLogger(
|
||||||
DeprecationLogger.class,
|
DeprecationLogger.class,
|
||||||
"org.hibernate.orm.deprecation"
|
CATEGORY
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
44
hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/DeprecationLogger.java
vendored
Normal file
44
hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/DeprecationLogger.java
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* 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.cache.ehcache.internal;
|
||||||
|
|
||||||
|
import org.jboss.logging.BasicLogger;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
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.hibernate.internal.log.DeprecationLogger.CATEGORY;
|
||||||
|
import static org.jboss.logging.Logger.Level.WARN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Steve Ebersole
|
||||||
|
*/
|
||||||
|
@MessageLogger(projectCode = "HHH")
|
||||||
|
@ValidIdRange( min = 20100, max = 20100)
|
||||||
|
public interface DeprecationLogger extends BasicLogger {
|
||||||
|
/**
|
||||||
|
* Singleton access
|
||||||
|
*/
|
||||||
|
DeprecationLogger INSTANCE = Logger.getMessageLogger(
|
||||||
|
DeprecationLogger.class,
|
||||||
|
CATEGORY
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a message (WARN) about this provider being deprecated
|
||||||
|
*/
|
||||||
|
@LogMessage(level = WARN)
|
||||||
|
@Message(
|
||||||
|
value = "The Ehcache second-level cache provider for Hibernate is deprecated. " +
|
||||||
|
"See https://hibernate.atlassian.net/browse/HHH-12441 for details.",
|
||||||
|
id = 20100
|
||||||
|
)
|
||||||
|
void logDeprecation();
|
||||||
|
|
||||||
|
}
|
|
@ -13,16 +13,18 @@ import org.jboss.logging.Logger;
|
||||||
import org.jboss.logging.annotations.LogMessage;
|
import org.jboss.logging.annotations.LogMessage;
|
||||||
import org.jboss.logging.annotations.Message;
|
import org.jboss.logging.annotations.Message;
|
||||||
import org.jboss.logging.annotations.MessageLogger;
|
import org.jboss.logging.annotations.MessageLogger;
|
||||||
|
import org.jboss.logging.annotations.ValidIdRange;
|
||||||
|
|
||||||
import static org.jboss.logging.Logger.Level.WARN;
|
import static org.jboss.logging.Logger.Level.WARN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The jboss-logging {@link MessageLogger} for the hibernate-ehcache module. It reserves message ids ranging from
|
* The jboss-logging {@link MessageLogger} for the hibernate-ehcache module. It reserves message ids ranging from
|
||||||
* 20001 to 25000 inclusively.
|
* 20099 to 20099 (allow 20100 for our DeprecationLogger) inclusively.
|
||||||
* <p/>
|
* <p/>
|
||||||
* New messages must be added after the last message defined to ensure message codes are unique.
|
* New messages must be added after the last message defined to ensure message codes are unique.
|
||||||
*/
|
*/
|
||||||
@MessageLogger(projectCode = "HHH")
|
@MessageLogger(projectCode = "HHH")
|
||||||
|
@ValidIdRange( min = 20001, max = 20099)
|
||||||
public interface EhCacheMessageLogger extends CoreMessageLogger {
|
public interface EhCacheMessageLogger extends CoreMessageLogger {
|
||||||
EhCacheMessageLogger INSTANCE = Logger.getMessageLogger(
|
EhCacheMessageLogger INSTANCE = Logger.getMessageLogger(
|
||||||
EhCacheMessageLogger.class,
|
EhCacheMessageLogger.class,
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class EhcacheRegionFactory extends RegionFactoryTemplate {
|
||||||
|
|
||||||
public EhcacheRegionFactory(CacheKeysFactory cacheKeysFactory) {
|
public EhcacheRegionFactory(CacheKeysFactory cacheKeysFactory) {
|
||||||
this.cacheKeysFactory = cacheKeysFactory;
|
this.cacheKeysFactory = cacheKeysFactory;
|
||||||
|
DeprecationLogger.INSTANCE.logDeprecation();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CacheManager getCacheManager() {
|
public CacheManager getCacheManager() {
|
||||||
|
|
Loading…
Reference in New Issue