From 487ccb38d0128ba666c3cfa4ec441881d8889802 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 31 Aug 2010 18:44:56 +0000 Subject: [PATCH] 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 --- .../org/hibernate/cache/jbc/JBossCacheRegionFactory.java | 8 ++++++++ .../cache/jbc/JndiMultiplexedJBossCacheRegionFactory.java | 8 +++++++- .../cache/jbc/JndiSharedJBossCacheRegionFactory.java | 3 +++ .../cache/jbc/MultiplexedJBossCacheRegionFactory.java | 5 ++++- .../cache/jbc/SharedJBossCacheRegionFactory.java | 7 ++++++- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JBossCacheRegionFactory.java b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JBossCacheRegionFactory.java index 102952441d..fe1808efc6 100755 --- a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JBossCacheRegionFactory.java +++ b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JBossCacheRegionFactory.java @@ -43,6 +43,8 @@ import org.hibernate.cfg.Environment; import org.hibernate.cfg.Settings; import org.hibernate.util.PropertiesHelper; import org.jboss.cache.DefaultCacheFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * {@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 * CacheInstanceManager implementations. *

+ * + * @deprecated Favor Infinispan integration; see HHH-5489 for details. * * @author Steve Ebersole * @author Brian Stansberry */ +@Deprecated public class JBossCacheRegionFactory implements RegionFactory { + private static final Logger log = LoggerFactory.getLogger( JBossCacheRegionFactory.class ); private CacheInstanceManager cacheInstanceManager; /** @@ -83,6 +89,7 @@ public class JBossCacheRegionFactory implements RegionFactory { * Create a new 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) { this.cacheInstanceManager = cacheInstanceManager; + log.warn( "Integration with JBossCache is deprecated in favor of Infinispan" ); } public CacheInstanceManager getCacheInstanceManager() { diff --git a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiMultiplexedJBossCacheRegionFactory.java b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiMultiplexedJBossCacheRegionFactory.java index 285bc45200..d13f7cefae 100644 --- a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiMultiplexedJBossCacheRegionFactory.java +++ b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiMultiplexedJBossCacheRegionFactory.java @@ -25,6 +25,9 @@ package org.hibernate.cache.jbc; import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + 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 * {@link JndiMultiplexingCacheInstanceManager} for configuration details. *

- * + * + * @deprecated Favor Infinispan integration; see HHH-5489 for details. + * * @author Brian Stansberry * @version $Revision$ */ +@Deprecated public class JndiMultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory { /** diff --git a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiSharedJBossCacheRegionFactory.java b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiSharedJBossCacheRegionFactory.java index b34a7236ef..12f55cf21b 100644 --- a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiSharedJBossCacheRegionFactory.java +++ b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/JndiSharedJBossCacheRegionFactory.java @@ -37,10 +37,13 @@ import org.hibernate.cache.jbc.builder.JndiSharedCacheInstanceManager; * using the value of the {@link JndiSharedCacheInstanceManager#CACHE_RESOURCE_PROP} * configuration property as the name to look up. *

+ * + * @deprecated Favor Infinispan integration; see HHH-5489 for details. * * @author Brian Stansberry * @version $Revision$ */ +@Deprecated public class JndiSharedJBossCacheRegionFactory extends JBossCacheRegionFactory { /** diff --git a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/MultiplexedJBossCacheRegionFactory.java b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/MultiplexedJBossCacheRegionFactory.java index 0c09ea6b3e..a3b3ec468e 100644 --- a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/MultiplexedJBossCacheRegionFactory.java +++ b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/MultiplexedJBossCacheRegionFactory.java @@ -41,10 +41,13 @@ import org.hibernate.cache.jbc.builder.MultiplexingCacheInstanceManager; * This version instantiates the factory itself. See * {@link MultiplexingCacheInstanceManager} for configuration details. *

- * + * + * @deprecated Favor Infinispan integration; see HHH-5489 for details. + * * @author Brian Stansberry * @version $Revision$ */ +@Deprecated public class MultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory { /** diff --git a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/SharedJBossCacheRegionFactory.java b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/SharedJBossCacheRegionFactory.java index c6b92638cf..63c78f3a78 100644 --- a/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/SharedJBossCacheRegionFactory.java +++ b/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/SharedJBossCacheRegionFactory.java @@ -28,6 +28,8 @@ import java.util.Properties; import org.hibernate.cache.jbc.builder.JndiSharedCacheInstanceManager; import org.hibernate.cache.jbc.builder.SharedCacheInstanceManager; import org.jboss.cache.DefaultCacheFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * {@link JBossCacheRegionFactory} that uses @@ -40,10 +42,13 @@ import org.jboss.cache.DefaultCacheFactory; * {@link JndiSharedCacheInstanceManager#CACHE_RESOURCE_PROP} * configuration property. *

- * + * + * @deprecated Favor Infinispan integration; see HHH-5489 for details. + * * @author Brian Stansberry * @version $Revision$ */ +@Deprecated public class SharedJBossCacheRegionFactory extends JBossCacheRegionFactory { /**