[Jboss-cvs] JBossAS SVN: r55124 - in branches/JEE5_TCK/tomcat/src/main/org/jboss/web: jsf/integration/injection tomcat/tc5/session tomcat/tc6/session

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 3 14:36:23 EDT 2006


Author: ryan.campbell at jboss.com
Date: 2006-08-03 14:36:22 -0400 (Thu, 03 Aug 2006)
New Revision: 55124

Removed:
   branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheCluster.java~
   branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheManager.java~
Modified:
   branches/JEE5_TCK/tomcat/src/main/org/jboss/web/jsf/integration/injection/JBossInjectionProvider.java
   branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc5/session/ClusteredSession.java
   branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/ClusteredSession.java
Log:
applied bstanberry's fixes from 55035 so that tomcat will build.

Modified: branches/JEE5_TCK/tomcat/src/main/org/jboss/web/jsf/integration/injection/JBossInjectionProvider.java
===================================================================
--- branches/JEE5_TCK/tomcat/src/main/org/jboss/web/jsf/integration/injection/JBossInjectionProvider.java	2006-08-03 18:31:28 UTC (rev 55123)
+++ branches/JEE5_TCK/tomcat/src/main/org/jboss/web/jsf/integration/injection/JBossInjectionProvider.java	2006-08-03 18:36:22 UTC (rev 55124)
@@ -26,7 +26,7 @@
 import com.sun.faces.spi.InjectionProviderException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import org.apache.catalina.util.AnnotationProcessor;
+import org.apache.catalina.util.DefaultAnnotationProcessor;
 import org.apache.log4j.Logger;
 
 /**
@@ -40,6 +40,7 @@
     private static final String NAMING_DISABLED = "Injection of naming resources into JSF managed beans disabled.";
 
     private Context namingContext;
+    private DefaultAnnotationProcessor annotationProcessor = null; 
     
     /**
      * Uses the default naming context for injection of resources into managed beans.
@@ -47,6 +48,7 @@
     public JBossInjectionProvider() {
         try {
             this.namingContext = new InitialContext();
+            this.annotationProcessor = new DefaultAnnotationProcessor(this.namingContext);
         } catch (Exception e) {
             LOG.warn(NAMING_DISABLED, e);
         }
@@ -67,6 +69,7 @@
         }
         
         this.namingContext = namingContext;
+        this.annotationProcessor = new DefaultAnnotationProcessor(this.namingContext);
     }
     
     /**
@@ -74,7 +77,7 @@
      */
     public void invokePreDestroy(Object managedBean) throws InjectionProviderException {
         try {
-            AnnotationProcessor.preDestroy(managedBean);
+            annotationProcessor.preDestroy(managedBean);
         } catch (Exception e) {
             LOG.error("PreDestroy failed on managed bean.", e);
         }
@@ -87,14 +90,14 @@
     public void inject(Object managedBean) throws InjectionProviderException {
         if (this.namingContext != null) {
             try {
-                AnnotationProcessor.injectNamingResources(this.namingContext, managedBean);
+                annotationProcessor.processAnnotations(managedBean);
             } catch (Exception e) {
                 LOG.error("Injection failed on managed bean.", e);
             }
         }
         
         try {
-            AnnotationProcessor.postConstruct(managedBean);
+            annotationProcessor.postConstruct(managedBean);
         } catch (Exception e) {
             LOG.error("PostConstruct failed on managed bean.", e);
         }

Modified: branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc5/session/ClusteredSession.java
===================================================================
--- branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc5/session/ClusteredSession.java	2006-08-03 18:31:28 UTC (rev 55123)
+++ branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc5/session/ClusteredSession.java	2006-08-03 18:36:22 UTC (rev 55124)
@@ -659,11 +659,6 @@
          return false;
       }
 
-      if (accessCount > 0)
-      {
-         return true;
-      }
-
       if (maxInactiveInterval >= 0)
       {
          long timeNow = System.currentTimeMillis();
@@ -782,7 +777,6 @@
                }
             }
          }
-         accessCount = 0;
 
          // Notify interested session event listeners. 
          if (notify)

Modified: branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/ClusteredSession.java
===================================================================
--- branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/ClusteredSession.java	2006-08-03 18:31:28 UTC (rev 55123)
+++ branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/ClusteredSession.java	2006-08-03 18:36:22 UTC (rev 55124)
@@ -667,9 +667,9 @@
          return false;
       }
 
-      if (accessCount > 0)
+      if (ACTIVITY_CHECK && accessCount.get() > 0)
       {
-         return true;
+          return true;
       }
 
       if (maxInactiveInterval >= 0)
@@ -790,7 +790,7 @@
                }
             }
          }
-         accessCount = 0;
+         accessCount = null;
 
          // Notify interested session event listeners. 
          if (notify)

Deleted: branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheCluster.java~
===================================================================
(Binary files differ)

Deleted: branches/JEE5_TCK/tomcat/src/main/org/jboss/web/tomcat/tc6/session/JBossCacheManager.java~
===================================================================
(Binary files differ)




More information about the jboss-cvs-commits mailing list