[jboss-cvs] JBossAS SVN: r66812 - in trunk/ejb3/src: main/org/jboss/ejb3 and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 7 04:01:06 EST 2007


Author: ALRubinger
Date: 2007-11-07 04:01:05 -0500 (Wed, 07 Nov 2007)
New Revision: 66812

Added:
   trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3Cache.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3CacheFactory.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCacheFactory.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCacheFactory.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/tree/StatefulTreeCacheFactory.java
Modified:
   trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/Cache.java
   trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/CacheImpl.java
   trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/ClusteredStatefulCache.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCache.java
   trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java
   trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
   trunk/ejb3/src/resources/ejb3-interceptors-aop.xml
   trunk/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml
   trunk/ejb3/src/resources/test/clusteredsession/scoped/META-INF/jboss.xml
   trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/DeploymentDescriptorStatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/StatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/cachepassivation/MockBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java
Log:
Resolved External API leak for @Cache, extracted interfaces and applied factory pattern

Modified: trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/Cache.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/Cache.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/Cache.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -26,8 +26,7 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import org.jboss.ejb3.cache.StatefulCache;
-import org.jboss.ejb3.stateful.StatefulBeanContext;
+import org.jboss.ejb3.cache.Ejb3CacheFactory;
 
 /**
  * Annotation for specifying the class used to provide the caching mechanism for a bean
@@ -39,5 +38,5 @@
 @Target({ElementType.TYPE})
 public @interface Cache
 {
-   Class<? extends StatefulCache> value();
+   Class<? extends Ejb3CacheFactory> value();
 }

Modified: trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/CacheImpl.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/CacheImpl.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/cache/CacheImpl.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -23,7 +23,7 @@
 
 import java.lang.annotation.Annotation;
 
-import org.jboss.ejb3.cache.StatefulCache;
+import org.jboss.ejb3.cache.Ejb3CacheFactory;
 
 /**
  * Comment
@@ -33,14 +33,14 @@
  */
 public class CacheImpl implements Cache
 {
-   private Class<? extends StatefulCache> val;
+   private Class<? extends Ejb3CacheFactory> val;
 
-   public CacheImpl(Class<? extends StatefulCache> val)
+   public CacheImpl(Class<? extends Ejb3CacheFactory> val)
    {
       this.val = val;
    }
 
-   public Class<? extends StatefulCache> value() { return val; }
+   public Class<? extends Ejb3CacheFactory> value() { return val; }
 
    public Class<? extends Annotation> annotationType()
    {

Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -135,6 +135,7 @@
 import org.jboss.ejb.StatelessImpl;
 import org.jboss.ejb.TransactionAttributeImpl;
 import org.jboss.ejb.TransactionManagementImpl;
+import org.jboss.ejb3.cache.Ejb3CacheFactory;
 import org.jboss.ejb3.cache.StatefulCache;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
 import org.jboss.ejb3.mdb.ConsumerContainer;
@@ -1352,12 +1353,12 @@
          CacheConfigMetaData config = enterpriseBean.getCacheConfig();
          if (config.getCacheClass() != null)
          {
-            Class<? extends StatefulCache> cacheClass = (Class<? extends StatefulCache>) di.getClassLoader().loadClass(config.getCacheClass());
-            CacheImpl cacheAnnotation = new CacheImpl(cacheClass);
+            Class<? extends Ejb3CacheFactory> cacheFactoryClass = (Class<? extends Ejb3CacheFactory>) di.getClassLoader().loadClass(config.getCacheClass());
+            CacheImpl cacheAnnotation = new CacheImpl(cacheFactoryClass);
             addClassAnnotation(container, Cache.class, cacheAnnotation);
 
             // FIXME: Wolf: what the hell is this?
-            if (cacheClass == org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+            if (cacheFactoryClass == org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory.class)
             {
                if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
                {

Modified: trunk/ejb3/src/main/org/jboss/ejb3/cache/ClusteredStatefulCache.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/ClusteredStatefulCache.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/ClusteredStatefulCache.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -29,7 +29,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public interface ClusteredStatefulCache extends StatefulCache
+public interface ClusteredStatefulCache extends Ejb3Cache
 {
    void replicate(StatefulBeanContext ctx);
 }

Added: trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3Cache.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3Cache.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3Cache.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.cache;
+
+/**
+ * Abstraction of a cache for Stateful instances 
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface Ejb3Cache extends StatefulCache
+{
+
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3Cache.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3CacheFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3CacheFactory.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3CacheFactory.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.cache;
+
+/**
+ * Defines contract for an EJB3 Stateful Cache Factory
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface Ejb3CacheFactory
+{
+   Ejb3Cache createCache();
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/cache/Ejb3CacheFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCache.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCache.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCache.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -34,7 +34,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class NoPassivationCache implements StatefulCache
+public class NoPassivationCache implements Ejb3Cache
 {
    private Pool pool;
    private HashMap<Object, StatefulBeanContext> cacheMap;

Added: trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCacheFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCacheFactory.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCacheFactory.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.cache;
+
+/**
+ * Factory for obtaining NoPassivationCache instances
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class NoPassivationCacheFactory implements Ejb3CacheFactory
+{
+
+   public Ejb3Cache createCache()
+   {
+      return new NoPassivationCache();
+   }
+
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/cache/NoPassivationCacheFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -33,6 +33,7 @@
 import org.jboss.ejb3.Container;
 import org.jboss.ejb3.EJBContainer;
 import org.jboss.ejb3.Pool;
+import org.jboss.ejb3.cache.Ejb3Cache;
 import org.jboss.ejb3.cache.StatefulCache;
 import org.jboss.ejb3.stateful.StatefulBeanContext;
 import org.jboss.logging.Logger;
@@ -43,7 +44,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class SimpleStatefulCache implements StatefulCache
+public class SimpleStatefulCache implements Ejb3Cache
 {
    private Logger log = Logger.getLogger(SimpleStatefulCache.class);
 

Added: trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCacheFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCacheFactory.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCacheFactory.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.cache.simple;
+
+import org.jboss.ejb3.cache.Ejb3Cache;
+import org.jboss.ejb3.cache.Ejb3CacheFactory;
+
+/**
+ * Factory for obtaining SimpleStatefulCache instances
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class SimpleStatefulCacheFactory implements Ejb3CacheFactory
+{
+
+   public Ejb3Cache createCache()
+   {
+      return new SimpleStatefulCache();
+   }
+
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCacheFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/ejb3/src/main/org/jboss/ejb3/cache/tree/StatefulTreeCacheFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/cache/tree/StatefulTreeCacheFactory.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/cache/tree/StatefulTreeCacheFactory.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.cache.tree;
+
+import org.jboss.ejb3.cache.Ejb3Cache;
+import org.jboss.ejb3.cache.Ejb3CacheFactory;
+
+/**
+ * Factory for obtaining StatefulTreeCache instances
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class StatefulTreeCacheFactory implements Ejb3CacheFactory
+{
+
+   public Ejb3Cache createCache()
+   {
+      return new StatefulTreeCache();
+   }
+
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/cache/tree/StatefulTreeCacheFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -57,6 +57,7 @@
 import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.ProxyUtils;
+import org.jboss.ejb3.cache.Ejb3Cache;
 import org.jboss.ejb3.cache.StatefulObjectFactory;
 import org.jboss.ejb3.cache.StatefulCache;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
@@ -78,7 +79,7 @@
 {
    private static final Logger log = Logger.getLogger(StatefulContainer.class);
 
-   protected StatefulCache cache;
+   protected Ejb3Cache cache;
    private StatefulDelegateWrapper mbean = new StatefulDelegateWrapper(this);
 
    public StatefulContainer(ClassLoader cl, String beanClassName, String ejbName, AspectManager manager,
@@ -137,7 +138,7 @@
       {
          super.start();
          Cache cacheConfig = getAnnotation(Cache.class);
-         cache = cacheConfig.value().newInstance();
+         cache = cacheConfig.value().newInstance().createCache();
          cache.initialize(this);
          cache.start();
       }

Modified: trunk/ejb3/src/resources/ejb3-interceptors-aop.xml
===================================================================
--- trunk/ejb3/src/resources/ejb3-interceptors-aop.xml	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/resources/ejb3-interceptors-aop.xml	2007-11-07 09:01:05 UTC (rev 66812)
@@ -197,7 +197,7 @@
    <domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
       <!-- NON Clustered cache configuration -->
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
-         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory.class)
       </annotation>
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
          @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
@@ -208,7 +208,7 @@
 
       <!-- Clustered cache configuration -->
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
-         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory.class)
       </annotation>
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
          @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
@@ -260,7 +260,7 @@
 
       <!-- NON Clustered cache configuration -->
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
-         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory.class)
       </annotation>
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
          @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
@@ -271,7 +271,7 @@
 
       <!-- Clustered cache configuration -->
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
-         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory.class)
       </annotation>
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
          @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
@@ -281,7 +281,7 @@
    <domain name="Embedded Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
       <!-- NON Clustered cache configuration -->
       <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache)">
-         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class)
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCacheFactory.class)
       </annotation>
       <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
          @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)

Modified: trunk/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml
===================================================================
--- trunk/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml	2007-11-07 09:01:05 UTC (rev 66812)
@@ -44,7 +44,7 @@
             <jndi-name>NonClusteredStatefulRemote</jndi-name>
             <clustered>false</clustered>
             <cache-config>
-               <cache-class>org.jboss.ejb3.cache.simple.SimpleStatefulCache</cache-class>
+               <cache-class>org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory</cache-class>
                <cache-max-size>1000</cache-max-size>
                <idle-timeout-seconds>100</idle-timeout-seconds>
             </cache-config>

Modified: trunk/ejb3/src/resources/test/clusteredsession/scoped/META-INF/jboss.xml
===================================================================
--- trunk/ejb3/src/resources/test/clusteredsession/scoped/META-INF/jboss.xml	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/resources/test/clusteredsession/scoped/META-INF/jboss.xml	2007-11-07 09:01:05 UTC (rev 66812)
@@ -47,7 +47,7 @@
             <jndi-name>NonClusteredStatefulRemote</jndi-name>
             <clustered>false</clustered>
             <cache-config>
-               <cache-class>org.jboss.ejb3.cache.simple.SimpleStatefulCache</cache-class>
+               <cache-class>org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory</cache-class>
                <cache-max-size>1000</cache-max-size>
                <idle-timeout-seconds>100</idle-timeout-seconds>
             </cache-config>

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/DeploymentDescriptorStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/DeploymentDescriptorStatefulBean.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/DeploymentDescriptorStatefulBean.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -40,7 +40,7 @@
 @Remote(org.jboss.ejb3.test.aspectdomain.Stateful.class)
 @RemoteBinding(jndiBinding = "DeploymentDescriptorStateful")
 @PoolClass(value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+ at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory.class)
 @CacheConfig(name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
 public class DeploymentDescriptorStatefulBean
    implements org.jboss.ejb3.test.aspectdomain.Stateful

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/StatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/StatefulBean.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/aspectdomain/StatefulBean.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -42,7 +42,7 @@
 @RemoteBinding(jndiBinding = "Stateful")
 @AspectDomain("Test Aspect Domain")
 @PoolClass(value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
- at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+ at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory.class)
 @CacheConfig(name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
 public class StatefulBean
    implements org.jboss.ejb3.test.aspectdomain.Stateful

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -38,7 +38,7 @@
  * @version $Revision$
  */
 @Stateful
- at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+ at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory.class)
 @CacheConfig(name = "jboss.cache:service=EJB3SFSBClusteredCache", maxSize = 1000, idleTimeoutSeconds = 1)
 @Local(StatefulLocal.class)
 @Remote(StatefulRemote.class)

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/cachepassivation/MockBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/cachepassivation/MockBean.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/cachepassivation/MockBean.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -33,6 +33,7 @@
 import org.jboss.annotation.ejb.cache.simple.PersistenceManager;
 import org.jboss.ejb3.ThreadlocalPool;
 import org.jboss.ejb3.cache.simple.SimpleStatefulCache;
+import org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory;
 
 /**
  * Comment
@@ -40,7 +41,7 @@
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
  * @version $Revision: $
  */
- at Cache(SimpleStatefulCache.class)
+ at Cache(SimpleStatefulCacheFactory.class)
 @PersistenceManager(MyStatefulSessionFilePersistenceManager.class)
 @CacheConfig(idleTimeoutSeconds=1)
 @PoolClass(value=ThreadlocalPool.class)

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java	2007-11-07 06:51:44 UTC (rev 66811)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java	2007-11-07 09:01:05 UTC (rev 66812)
@@ -62,7 +62,7 @@
 @CacheConfig(name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize = 1000, idleTimeoutSeconds = 1)
 @SecurityDomain("test")
 @Resources({@Resource(name="jdbc/ds", mappedName="java:/DefaultDS")})
- at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+ at Cache(org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory.class)
 public class TreeCacheStatefulBean implements org.jboss.ejb3.test.stateful.Stateful
 {
    private static final Logger log = Logger.getLogger(StatefulBean.class);




More information about the jboss-cvs-commits mailing list