HHH-5489 - Deprecate jbosscache as a second level cache provider, in favor of infinispan

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@20294 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2010-08-31 18:44:56 +00:00
parent 0b6e54aa82
commit 487ccb38d0
5 changed files with 28 additions and 3 deletions

View File

@ -43,6 +43,8 @@ import org.hibernate.cfg.Environment;
import org.hibernate.cfg.Settings; import org.hibernate.cfg.Settings;
import org.hibernate.util.PropertiesHelper; import org.hibernate.util.PropertiesHelper;
import org.jboss.cache.DefaultCacheFactory; import org.jboss.cache.DefaultCacheFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* {@link RegionFactory} that uses one or more JBoss Cache instances for * {@link RegionFactory} that uses one or more JBoss Cache instances for
@ -62,11 +64,15 @@ import org.jboss.cache.DefaultCacheFactory;
* Also exposes an overloaded constructor that allows injection of different * Also exposes an overloaded constructor that allows injection of different
* <code>CacheInstanceManager</code> implementations. * <code>CacheInstanceManager</code> implementations.
* </p> * </p>
*
* @deprecated Favor Infinispan integration; see HHH-5489 for details.
* *
* @author Steve Ebersole * @author Steve Ebersole
* @author Brian Stansberry * @author Brian Stansberry
*/ */
@Deprecated
public class JBossCacheRegionFactory implements RegionFactory { public class JBossCacheRegionFactory implements RegionFactory {
private static final Logger log = LoggerFactory.getLogger( JBossCacheRegionFactory.class );
private CacheInstanceManager cacheInstanceManager; private CacheInstanceManager cacheInstanceManager;
/** /**
@ -83,6 +89,7 @@ public class JBossCacheRegionFactory implements RegionFactory {
* Create a new JBossCacheRegionFactory. * Create a new JBossCacheRegionFactory.
*/ */
public JBossCacheRegionFactory() { public JBossCacheRegionFactory() {
log.warn( "Integration with JBossCache is deprecated in favor of Infinispan" );
} }
/** /**
@ -93,6 +100,7 @@ public class JBossCacheRegionFactory implements RegionFactory {
*/ */
public JBossCacheRegionFactory(CacheInstanceManager cacheInstanceManager) { public JBossCacheRegionFactory(CacheInstanceManager cacheInstanceManager) {
this.cacheInstanceManager = cacheInstanceManager; this.cacheInstanceManager = cacheInstanceManager;
log.warn( "Integration with JBossCache is deprecated in favor of Infinispan" );
} }
public CacheInstanceManager getCacheInstanceManager() { public CacheInstanceManager getCacheInstanceManager() {

View File

@ -25,6 +25,9 @@ package org.hibernate.cache.jbc;
import java.util.Properties; import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.hibernate.cache.jbc.builder.JndiMultiplexingCacheInstanceManager; import org.hibernate.cache.jbc.builder.JndiMultiplexingCacheInstanceManager;
/** /**
@ -41,10 +44,13 @@ import org.hibernate.cache.jbc.builder.JndiMultiplexingCacheInstanceManager;
* This version finds the factory in JNDI. See * This version finds the factory in JNDI. See
* {@link JndiMultiplexingCacheInstanceManager} for configuration details. * {@link JndiMultiplexingCacheInstanceManager} for configuration details.
* </p> * </p>
* *
* @deprecated Favor Infinispan integration; see HHH-5489 for details.
*
* @author Brian Stansberry * @author Brian Stansberry
* @version $Revision$ * @version $Revision$
*/ */
@Deprecated
public class JndiMultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory { public class JndiMultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory {
/** /**

View File

@ -37,10 +37,13 @@ import org.hibernate.cache.jbc.builder.JndiSharedCacheInstanceManager;
* using the value of the {@link JndiSharedCacheInstanceManager#CACHE_RESOURCE_PROP} * using the value of the {@link JndiSharedCacheInstanceManager#CACHE_RESOURCE_PROP}
* configuration property as the name to look up. * configuration property as the name to look up.
* </p> * </p>
*
* @deprecated Favor Infinispan integration; see HHH-5489 for details.
* *
* @author Brian Stansberry * @author Brian Stansberry
* @version $Revision$ * @version $Revision$
*/ */
@Deprecated
public class JndiSharedJBossCacheRegionFactory extends JBossCacheRegionFactory { public class JndiSharedJBossCacheRegionFactory extends JBossCacheRegionFactory {
/** /**

View File

@ -41,10 +41,13 @@ import org.hibernate.cache.jbc.builder.MultiplexingCacheInstanceManager;
* This version instantiates the factory itself. See * This version instantiates the factory itself. See
* {@link MultiplexingCacheInstanceManager} for configuration details. * {@link MultiplexingCacheInstanceManager} for configuration details.
* </p> * </p>
* *
* @deprecated Favor Infinispan integration; see HHH-5489 for details.
*
* @author Brian Stansberry * @author Brian Stansberry
* @version $Revision$ * @version $Revision$
*/ */
@Deprecated
public class MultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory { public class MultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory {
/** /**

View File

@ -28,6 +28,8 @@ import java.util.Properties;
import org.hibernate.cache.jbc.builder.JndiSharedCacheInstanceManager; import org.hibernate.cache.jbc.builder.JndiSharedCacheInstanceManager;
import org.hibernate.cache.jbc.builder.SharedCacheInstanceManager; import org.hibernate.cache.jbc.builder.SharedCacheInstanceManager;
import org.jboss.cache.DefaultCacheFactory; import org.jboss.cache.DefaultCacheFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* {@link JBossCacheRegionFactory} that uses * {@link JBossCacheRegionFactory} that uses
@ -40,10 +42,13 @@ import org.jboss.cache.DefaultCacheFactory;
* {@link JndiSharedCacheInstanceManager#CACHE_RESOURCE_PROP} * {@link JndiSharedCacheInstanceManager#CACHE_RESOURCE_PROP}
* configuration property. * configuration property.
* </p> * </p>
* *
* @deprecated Favor Infinispan integration; see HHH-5489 for details.
*
* @author Brian Stansberry * @author Brian Stansberry
* @version $Revision$ * @version $Revision$
*/ */
@Deprecated
public class SharedJBossCacheRegionFactory extends JBossCacheRegionFactory { public class SharedJBossCacheRegionFactory extends JBossCacheRegionFactory {
/** /**