[jboss-cvs] JBossAS SVN: r78732 - branches/Branch_4_2/server/src/main/org/jboss/metadata.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Sep 20 21:36:54 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-09-20 21:36:54 -0400 (Sat, 20 Sep 2008)
New Revision: 78732

Modified:
   branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java
Log:
[JBAS-5778] Add pluggable policy for deciding whether to emit servlet spec notifications around events affecting clustered sessions

Modified: branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java	2008-09-20 21:50:48 UTC (rev 78731)
+++ branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java	2008-09-21 01:36:54 UTC (rev 78732)
@@ -163,6 +163,11 @@
    /** By default replicate clustered session metadata at least every 60 seconds */
    public static final int DEFAULT_MAX_UNREPLICATED_INTERVAL = 60;   
    private Integer maxUnreplicatedInterval = null;
+   /** 
+    * Name of class the defines policy for issuing servlet spec 
+    * notifications for clustered sessions.
+    */
+   private String clusteredSessionNotificationPolicy = null;
    
    /** Should the context use session cookies or use default */
    private int sessionCookies = SESSION_COOKIES_DEFAULT;
@@ -837,8 +842,18 @@
    public void setMaxUnreplicatedInterval(Integer maxUnreplicatedInterval)
    {
       this.maxUnreplicatedInterval = maxUnreplicatedInterval;
+   }   
+
+   public String getClusteredSessionNotificationPolicy()
+   {
+      return clusteredSessionNotificationPolicy;
    }
 
+   public void setClusteredSessionNotificationPolicy(String expirationNotificationPolicy)
+   {
+      this.clusteredSessionNotificationPolicy = expirationNotificationPolicy;
+   }
+
    public void importXml(Element element) throws DeploymentException
    {
       String rootTag = element.getOwnerDocument().getDocumentElement().getTagName();
@@ -1332,6 +1347,8 @@
                      + "' (should be ['SESSION', 'ATTRIBUTE', or 'FIELD'']) in jboss-web.xml");
          }
 
+         // ... then manage "replication-field-batch-mode".
+         //
          Element batchModeElement = MetaData.getOptionalChild(sessionReplicationRootElement, "replication-field-batch-mode");
          if (batchModeElement != null)
          {
@@ -1339,6 +1356,8 @@
             replicationFieldBatchMode = flag.booleanValue();
          }
 
+         // ... then manage "max-unreplicated-interval".
+         //
          Element maxUnreplicatedIntervalElement = MetaData.getOptionalChild(sessionReplicationRootElement, "max-unreplicated-interval");
          if (maxUnreplicatedIntervalElement != null)
          {
@@ -1353,6 +1372,14 @@
                      + " in jboss-web.xml");
             }
          }
+
+         // ... then manage "session-notification-policy".
+         //
+         Element expirationNotificationPolicyElement =  MetaData.getOptionalChild(sessionReplicationRootElement, "session-notification-policy");
+         if (expirationNotificationPolicyElement != null)
+         {
+            clusteredSessionNotificationPolicy =  MetaData.getElementContent(expirationNotificationPolicyElement);
+         }
       }
 
       // Check for a war level class loading config




More information about the jboss-cvs-commits mailing list