[jboss-cvs] JBossAS SVN: r60646 - branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 19 03:53:22 EST 2007


Author: bstansberry at jboss.com
Date: 2007-02-19 03:53:22 -0500 (Mon, 19 Feb 2007)
New Revision: 60646

Removed:
   branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/TransactionalCacheFactory.java
Log:
Prune TransactionalCacheFactory from Branch_4_2

Deleted: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/TransactionalCacheFactory.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/TransactionalCacheFactory.java	2007-02-19 08:52:16 UTC (rev 60645)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/TransactionalCacheFactory.java	2007-02-19 08:53:22 UTC (rev 60646)
@@ -1,76 +0,0 @@
-package org.jboss.ejb3.entity;
-
-import java.util.Properties;
-
-import org.hibernate.cache.Cache;
-import org.hibernate.cache.CacheException;
-import org.jboss.cache.Version;
-
-public abstract class TransactionalCacheFactory
-{
-
-   /**
-    * Gets and configures a concrete TransactionalCacheFactory suitable for 
-    * interoperation with the version of JBoss Cache visible on the classpath.
-    * 
-    * @param hibernateConfig properties to use to {@link #configure(Properties) configure}
-    *                        the factory.
-    * @return the factory
-    * 
-    * @throws CacheException
-    */
-   public static TransactionalCacheFactory getFactory(Properties hibernateConfig) throws CacheException
-   {
-      String factoryClass = null;
-      short version = Version.getVersionShort();
-      if (version >= Version.getVersionShort("2.0.0.GA") || version <= 0)
-      {
-         factoryClass = "org.jboss.ejb3.entity.JBCCacheFactory";
-      }
-      else
-      {
-         // TODO write a factory for the old hibernate stuff
-         // needs to be in a separate code tree from JBCCacheFactory as 
-         // TreeCacheMBean is no longer available in 2.0
-         throw new IllegalStateException("Cannot create factory for JBC 1.x");
-      }
-      
-      try
-      {
-         Class clazz = Thread.currentThread().getContextClassLoader().loadClass(factoryClass);
-         TransactionalCacheFactory factory = (TransactionalCacheFactory) clazz.newInstance();
-         factory.configure(hibernateConfig);
-         
-         return factory;
-      }
-      catch (CacheException e)
-      {
-         throw e;
-      }
-      catch (Exception e)
-      {
-         throw new CacheException(e);
-      }
-      
-   }
-   
-   /**
-    * Construct and configure the Cache representation of a named cache region.
-    *
-    * @param regionName the name of the cache region
-    * @param properties configuration settings
-    * @return The Cache representation of the named cache region.
-    * @throws org.hibernate.cache.CacheException
-    *          Indicates an error building the cache region.
-    */
-   public abstract Cache buildCache(String regionName, Properties properties) throws CacheException;
-   
-   /**
-    * Configures the factory using the Hibernate configuration properties.  
-    * Called by {@link #getFactory(Properties)}.
-    *  
-    * @param hibernateConfig the Hibernate configuration properties
-    */
-   protected abstract void configure(Properties hibernateConfig);
-   
-}




More information about the jboss-cvs-commits mailing list