You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/02/09 02:29:54 UTC

[01/50] [abbrv] incubator-geode git commit: GEODE-867: Reapplying changes to pauseSender to wait for the pause

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-268 21fb6a36e -> df48db64c


GEODE-867: Reapplying changes to pauseSender to wait for the pause

This reverts commit 09bd5307994bd970bdf3bf4f1d5f302021e8b8e6. In
addition to reapplying the changes, I fixed the issue that required me
to revert those changes. Secondary gateway senders of serial gateways
should not wait for the pause flag to become true, because secondary
dispatchers are already paused in waiting to become primary.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/806142d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/806142d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/806142d7

Branch: refs/heads/feature/GEODE-268
Commit: 806142d7629182c39f830f9ab2f178d4061d2e8a
Parents: 359a377
Author: Dan Smith <up...@apache.org>
Authored: Wed Jan 27 12:54:36 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Wed Feb 3 17:17:22 2016 -0800

----------------------------------------------------------------------
 .../AbstractGatewaySenderEventProcessor.java    |  3 ++-
 .../gemfire/internal/cache/wan/WANTestBase.java | 23 ++------------------
 ...arallelGatewaySenderOperationsDUnitTest.java |  8 +++----
 .../ParallelWANConflationDUnitTest.java         |  8 +++----
 .../wan/parallel/ParallelWANStatsDUnitTest.java |  8 +++----
 .../wan/serial/SerialWANStatsDUnitTest.java     |  2 +-
 6 files changed, 17 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/806142d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
index c19857f..86ecce1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
@@ -280,7 +280,8 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
     }
     boolean interrupted=false;
     synchronized(this.pausedLock) {
-      while(!isDispatcherWaiting && !isStopped()) {
+      while(!isDispatcherWaiting && !isStopped()
+            && sender.getSenderAdvisor().isPrimary()) {
         try {
           this.pausedLock.wait();
         } catch(InterruptedException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/806142d7/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index f0c01ab..1afba75 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -2162,33 +2162,14 @@ public class WANTestBase extends DistributedTestCase{
         }
       }
       sender.pause();
+      ((AbstractGatewaySender) sender).getEventProcessor().waitForDispatcherToPause();
+      
     }
     finally {
       exp.remove();
       exln.remove();
     }
   }
-      
-  public static void pauseSenderAndWaitForDispatcherToPause(String senderId) {
-    final ExpectedException exln = addExpectedException("Could not connect");
-    ExpectedException exp = addExpectedException(ForceReattemptException.class
-        .getName());
-    try {
-      Set<GatewaySender> senders = cache.getGatewaySenders();
-      GatewaySender sender = null;
-      for (GatewaySender s : senders) {
-        if (s.getId().equals(senderId)) {
-          sender = s;
-          break;
-        }
-      }
-      sender.pause();
-      ((AbstractGatewaySender)sender).getEventProcessor().waitForDispatcherToPause();
-    } finally {
-      exp.remove();
-      exln.remove();
-    }    
-  }
   
   public static void resumeSender(String senderId) {
     final ExpectedException exln = addExpectedException("Could not connect");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/806142d7/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 68614a0..0b3f3bd 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -102,10 +102,10 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase {
     vm4.invoke(WANTestBase.class, "doPuts", new Object[] { testName + "_PR", 100 });
     
     //now, pause all of the senders
-    vm4.invoke(WANTestBase.class, "pauseSenderAndWaitForDispatcherToPause", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "pauseSenderAndWaitForDispatcherToPause", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "pauseSenderAndWaitForDispatcherToPause", new Object[] { "ln" });
-    vm7.invoke(WANTestBase.class, "pauseSenderAndWaitForDispatcherToPause", new Object[] { "ln" });
+    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
+    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
+    vm6.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
+    vm7.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
     
     //SECOND RUN: keep one thread doing puts to the region
     vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] { testName + "_PR", 1000 });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/806142d7/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
index bce63f5..763b9c4 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
@@ -430,10 +430,10 @@ public class ParallelWANConflationDUnitTest extends WANTestBase {
   }
 
   protected void pauseSenders() {
-    vm4.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
-    vm5.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
-    vm6.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
-    vm7.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
+    vm4.invoke(() ->pauseSender( "ln" ));
+    vm5.invoke(() ->pauseSender( "ln" ));
+    vm6.invoke(() ->pauseSender( "ln" ));
+    vm7.invoke(() ->pauseSender( "ln" ));
   }
 
   protected void startSenders() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/806142d7/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
index cb3c49c..2971749 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
@@ -475,10 +475,10 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
   protected void startPausedSenders() {
     startSenders();
     
-    vm4.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
-    vm5.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
-    vm6.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
-    vm7.invoke(() ->pauseSenderAndWaitForDispatcherToPause( "ln" ));
+    vm4.invoke(() ->pauseSender( "ln" ));
+    vm5.invoke(() ->pauseSender( "ln" ));
+    vm6.invoke(() ->pauseSender( "ln" ));
+    vm7.invoke(() ->pauseSender( "ln" ));
   }
 
   protected void createReceiver(VM vm, Integer nyPort) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/806142d7/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANStatsDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANStatsDUnitTest.java
index d946d47..2342c00 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANStatsDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANStatsDUnitTest.java
@@ -537,7 +537,7 @@ public class SerialWANStatsDUnitTest extends WANTestBase {
 
     vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
 
-    vm4.invoke(WANTestBase.class, "pauseSenderAndWaitForDispatcherToPause", new Object[] { "ln" });
+    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
 
     vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
         testName, null,1, 100, isOffHeap()  });


[42/50] [abbrv] incubator-geode git commit: GEODE-14: Update scripts with correct jars

Posted by kl...@apache.org.
GEODE-14: Update scripts with correct jars


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c221b2a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c221b2a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c221b2a5

Branch: refs/heads/feature/GEODE-268
Commit: c221b2a534c94259410bf031027f3039b74ca7f9
Parents: cea74ab
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Feb 3 23:52:26 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:27 2016 -0800

----------------------------------------------------------------------
 .../release/scripts/cacheserver.sh                   | 15 ++++-----------
 .../release/scripts/gemfire.sh                       |  7 +++----
 2 files changed, 7 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c221b2a5/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh b/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
index e216251..24946a6 100755
--- a/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
+++ b/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
@@ -33,7 +33,7 @@ fi
 ARGS=( "$@" )
 ARGS_LENGTH=${#ARGS[@]}
 CLASS_ARGS=()
-for (( i==0; i<$ARGS_LENGTH; i++ )); 
+for (( i=0; i<$ARGS_LENGTH; i++ ));
 do
 	if [ "${ARGS[$i]}" == "-d" ]; then
 		i=$(($i+1))
@@ -73,26 +73,19 @@ if [ "x$WINDIR" != "x" ]; then
   exit 1
 fi
 
-if [ ! -f $GEMFIRE/lib/gemfire.jar ]; then
+GEMFIRE_DEP_JAR=$GEMFIRE/lib/gemfire-core-dependencies.jar
+if [ ! -f "$GEMFIRE_DEP_JAR" ]; then
   echo "ERROR: Could not determine GEMFIRE location."
   exit 1
 fi
 
-# Initialize classpath
-
-LOG4J_API=$( ls $GEMFIRE/lib/log4j-api*jar )
-LOG4J_CORE=$( ls $GEMFIRE/lib/log4j-core*jar )
-
 MOD_JAR=`ls $GEMFIRE/lib/gemfire-modules-?.*.jar` 2>/dev/null
 if [ -z "$MOD_JAR" ]; then
   MOD_JAR=$GEMFIRE/lib/gemfire-modules.jar
 fi
 
-# Add GemFire classes
-GEMFIRE_JARS=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:$LOG4J_API:$LOG4J_CORE
-
 # Add Tomcat classes
-GEMFIRE_JARS=$GEMFIRE_JARS:$MOD_JAR:$TOMCAT_DIR/lib/servlet-api.jar:$TOMCAT_DIR/lib/catalina.jar:$TOMCAT_DIR/lib/tomcat-util.jar:$TOMCAT_DIR/bin/tomcat-juli.jar
+GEMFIRE_JARS=$GEMFIRE_DEP_JAR:$MOD_JAR:$TOMCAT_DIR/lib/servlet-api.jar:$TOMCAT_DIR/lib/catalina.jar:$TOMCAT_DIR/lib/tomcat-util.jar:$TOMCAT_DIR/bin/tomcat-juli.jar
 
 # Add configuration
 GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/conf

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c221b2a5/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh b/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
index c36c320..7ca2c21 100755
--- a/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
+++ b/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
@@ -27,14 +27,13 @@ if [ "x$WINDIR" != "x" ]; then
   exit 1
 fi
 
-if [ ! -f $GEMFIRE/lib/gemfire.jar ]; then
+GEMFIRE_DEP_JAR=$GEMFIRE/lib/gemfire-core-dependencies.jar
+if [ ! -f "$GEMFIRE_DEP_JAR" ]; then
   echo "ERROR: Could not determine GEMFIRE location."
   exit 1
 fi
 
-LOG4J_API=$( ls $GEMFIRE/lib/log4j-api*jar )
-LOG4J_CORE=$( ls $GEMFIRE/lib/log4j-core*jar )
-GEMFIRE_JARS=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:$LOG4J_API:$LOG4J_CORE
+GEMFIRE_JARS=$GEMFIRE_DEP_JAR
 
 if [ "x$CLASSPATH" != "x" ]; then
   GEMFIRE_JARS=$GEMFIRE_JARS:$CLASSPATH


[36/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
GEODE-14: We can add 3rd party licenses later


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/64009709
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/64009709
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/64009709

Branch: refs/heads/feature/GEODE-268
Commit: 64009709f2e180c724085ca977524aa8da03bdb2
Parents: 4855246
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Dec 30 08:42:04 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:25 2016 -0800

----------------------------------------------------------------------
 ...e_licenses-Pivotal_GemFire_Modules_7.0.2.txt |  469 ------
 ...rce_licenses-Pivotal_GemFire_Modules_8.0.txt |  465 ------
 ...e_licenses-Pivotal_GemFire_Modules_8.1.0.txt |  472 -------
 ...censes-VMware_vFabric_GemFire_Module_7.0.txt |  471 -------
 ...ses-VMware_vFabric_GemFire_Modules_7.0.1.txt |  474 -------
 ...re_HTTP_Session_Management_Modules_2.0.1.txt | 1316 -----------------
 ...Fire_HTTP_Session_Management_Modules_2.0.txt | 1334 ------------------
 ...re_HTTP_Session_Management_Modules_2.1.1.txt | 1326 -----------------
 ...Fire_HTTP_Session_Management_Modules_2.1.txt | 1325 -----------------
 ...icenses-vFabric_GemFire_Modules_7.0.Beta.txt |  471 -------
 10 files changed, 8123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt
deleted file mode 100755
index f651b10..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt
+++ /dev/null
@@ -1,469 +0,0 @@
-open_source_license.txt
-
-Pivotal GemFire Modules 7.0.2 GA
-
-
-================================================================
-The following copyright statements and licenses apply to various 
-open source software packages (or portions thereof) that are 
-distributed with this Pivotal, Inc. Product.
-
-The Pivotal Product may also include other Pivotal components, 
-which may contain additional open source software packages. One or 
-more such open_source_licenses.txt files may therefore accompany 
-this Pivotal Product.
-
-The Pivotal Product that includes this file does not necessarily use 
-all the open source software packages referred to below and may also 
-only use portions of a given package.
-
-=================================================================
-TABLE OF CONTENTS
-=================================================================
-The following is a listing of the open source components detailed 
-in this document. This list is provided for your convenience; 
-please read further if you wish to review the copyright notice(s) 
-and the full text of the license associated with each component.
-
-
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from Pivotal�s website at
-http://www.gopivotal.com/open-source, or by sending a request, with your name and address 
-to: Pivotal Software, Inc., 1900 S. Norfolk Street #125, San Mateo, CA 94403, 
-Attention: General Counsel. All such requests should clearly 
-specify: OPEN SOURCE FILES REQUEST,
-Attention General Counsel. Pivotal shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium. This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. 
-Alternatively, the Source Files may accompany the Pivotal product.
-
-[GFEHTTPMODULE702GASS010814]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt
deleted file mode 100755
index 5eb37cb..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt
+++ /dev/null
@@ -1,465 +0,0 @@
-open_source_license.txt
-
-Pivotal GemFire Modules 8.0.0 GA
-
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software packages (or portions thereof) that are distributed with
-this Pivotal Software, Inc. Product.
-
-The Pivotal Product may also include other Pivotal components, which may
-contain additional open source software packages. One or more such
-open_source_licenses.txt files may therefore accompany this Pivotal
-Product.
-
-The Pivotal Product that includes this file does not necessarily use all
-the open source software packages referred to below and may also only
-use portions of a given package.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in
-this document. This list is provided for your convenience; please read
-further if you wish to review the copyright notice(s) and the full text
-of the license associated with each component.
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Common Development and Distribution License, V1.0
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from Pivotal's website at
-http://www.gopivotal.com/open-source, or by sending a request, 
-with your name and address to: Pivotal Software, Inc., 3496 Deer Creek Rd, 
-Palo Alto, CA 94304, Attention: General Counsel. All such requests should 
-clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. 
-Pivotal shall mail a copy of the Source Files to you on a CD or equivalent physical medium. 
-This offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. 
-Alternatively, the Source Files may accompany the Pivotal product.
-
-[GFEHTTPMODULE800GASS072814]

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt
deleted file mode 100755
index b41b161..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt
+++ /dev/null
@@ -1,472 +0,0 @@
-open_source_license.txt
-
-Pivotal GemFire Modules 8.1.0 GA
-
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software packages (or portions thereof) that are distributed with
-this Pivotal Software, Inc. Product.
-
-The Pivotal Product may also include other Pivotal components, which may
-contain additional open source software packages. One or more such
-open_source_licenses.txt files may therefore accompany this Pivotal
-Product.
-
-The Pivotal Product that includes this file does not necessarily use all
-the open source software packages referred to below and may also only
-use portions of a given package.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in
-this document. This list is provided for your convenience; please read
-further if you wish to review the copyright notice(s) and the full text
-of the license associated with each component.
-
-
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from Pivotal's website at
-http://www.pivotal.io/open-source, or by sending a request, 
-with your name and address to: Pivotal Software, Inc., 3496 Deer Creek Rd, 
-Palo Alto, CA 94304, Attention: General Counsel. All such requests should 
-clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. 
-Pivotal shall mail a copy of the Source Files to you on a CD or equivalent physical medium. 
-This offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. 
-Alternatively, the Source Files may accompany the Pivotal product.
-
-
-[GFEHTTPMODULE810GAKD120914]
\ No newline at end of file


[38/50] [abbrv] incubator-geode git commit: GEODE-14: Removed all readme files which contain Pivotal specific info

Posted by kl...@apache.org.
GEODE-14: Removed all readme files which contain Pivotal specific info


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/83affd26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/83affd26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/83affd26

Branch: refs/heads/feature/GEODE-268
Commit: 83affd266994e9ee49214a94e9045b97f2f3a576
Parents: feb3d1c
Author: Jens Deppe <jd...@pivotal.io>
Authored: Thu Jan 7 13:21:41 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:26 2016 -0800

----------------------------------------------------------------------
 .../gemfire-modules-assembly/build.gradle       | 30 ++------------------
 .../release/hibernate/readme.txt                | 14 ---------
 .../release/session/readme.txt                  | 14 ---------
 .../release/tcserver/gemfire-cs/README.txt      | 14 ---------
 .../release/tcserver/gemfire-p2p/README.txt     | 14 ---------
 .../release/tomcat/readme.txt                   | 14 ---------
 6 files changed, 2 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/83affd26/extensions/gemfire-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/build.gradle b/extensions/gemfire-modules-assembly/build.gradle
index 7ef2f01..3936850 100644
--- a/extensions/gemfire-modules-assembly/build.gradle
+++ b/extensions/gemfire-modules-assembly/build.gradle
@@ -42,9 +42,6 @@ def configureTcServerAssembly = {
     from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
     from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
     from configurations.slf4jDeps
-    from('release/3rdparty_license') {
-      include "open_source_licenses*${version}.txt"
-    }
   }
   into('gemfire-cs/bin') {
     from('release/scripts') {
@@ -165,9 +162,6 @@ task distTomcat(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
     from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
     from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
     from configurations.slf4jDeps
-    from('release/3rdparty_license') {
-      include "open_source_licenses*${version}.txt"
-    }
   }
   into('bin') {
     from('release/scripts') {
@@ -180,11 +174,6 @@ task distTomcat(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
       include '*'
     }
   }
-
-  from('release/tomcat') {
-    include 'readme.txt'
-    filter { it.replaceAll('@VERSION@', version) }
-  }
 }
 
 task distHibernate(type: Zip, dependsOn: ':extensions/gemfire-modules-hibernate:build') {
@@ -193,10 +182,6 @@ task distHibernate(type: Zip, dependsOn: ':extensions/gemfire-modules-hibernate:
   into('lib') {
     from project(':extensions/gemfire-modules-hibernate').configurations.archives.allArtifacts.files
   }
-  from('release/hibernate') {
-    include 'readme.txt'
-    filter { it.replaceAll('@VERSION@', version) }
-  }
 }
 
 task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:build') {
@@ -205,12 +190,8 @@ task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:bu
   into('lib') {
     from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
     from project(':extensions/gemfire-modules-session').configurations.archives.allArtifacts.files
-//    from project(':extensions/gemfire-modules-session-external').configurations.archives.allArtifacts.files
     from configurations.slf4jDeps
     from configurations.servletApiDeps
-    from('release/3rdparty_license') {
-      include "open_source_licenses*${version}.txt"
-    }
   }
 
   into('bin') {
@@ -220,11 +201,9 @@ task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:bu
       include 'cacheserver.*'
       include 'gemfire.*'
 
-      def slf4j_version = '1.7.7'
-      def servlet_api_version = '2.5'
       filter { it.replaceAll('@GEMFIRE_MODULES_VERSION@', version) }
-      filter { it.replaceAll('@SLF4J_VERSION@', "${slf4j_version}") }
-      filter { it.replaceAll('@SERVLET_API_VERSION@', "${servlet_api_version}") }
+      filter { it.replaceAll('@SLF4J_VERSION@', project.'slf4j-api.version') }
+      filter { it.replaceAll('@SERVLET_API_VERSION@', project.'javax.servlet-api_version') }
       filter { it.replaceAll('@GEMFIRE_VERSION@', version) }
     }
   }
@@ -232,11 +211,6 @@ task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:bu
   into('conf') {
     from('release/conf')
   }
-
-  from('release/session') {
-    include 'readme.txt'
-    filter { it.replaceAll('@VERSION@', version) }
-  }
 }
 
 task distTcServer(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/83affd26/extensions/gemfire-modules-assembly/release/hibernate/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/hibernate/readme.txt b/extensions/gemfire-modules-assembly/release/hibernate/readme.txt
deleted file mode 100644
index 58a4c91..0000000
--- a/extensions/gemfire-modules-assembly/release/hibernate/readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Pivotal(TM) GemFire(R) Hibernate Cache Module @VERSION@
-
-This module provides fast, scalable, distributed L2 caching for JBoss Hibernate.
-
-Access all Pivotal GemFire Documentation at:
-http://gemfire.docs.pivotal.io/
-
-Pivotal Support Services can be accessed from the Pivotal or VMware website.
-Access varies by license type, support offering (contract or per-incident) and 
-product. Please see the Pivotal page at http://www.pivotal.io/support or to 
-file a VMware Support Request, please see the VMware page at 
-https://www.vmware.com/support/policies/howto.html for information on "How to 
-File a Support Request."
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/83affd26/extensions/gemfire-modules-assembly/release/session/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/readme.txt b/extensions/gemfire-modules-assembly/release/session/readme.txt
deleted file mode 100644
index 3fa92d8..0000000
--- a/extensions/gemfire-modules-assembly/release/session/readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Pivotal(TM) GemFire(R) Session Management Module @VERSION@ for AppServers
-
-This module provides fast, scalable, distributed L2 caching for Weblogic and other Application Servers.
-
-Access all Pivotal GemFire Documentation at:
-http://gemfire.docs.pivotal.io
-
-Pivotal Support Services can be accessed from the Pivotal or VMware website.
-Access varies by license type, support offering (contract or per-incident) and 
-product. Please see the Pivotal page at http://www.pivotal.io/support or to 
-file a VMware Support Request, please see the VMware page at 
-https://www.vmware.com/support/policies/howto.html for information on "How to 
-File a Support Request."
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/83affd26/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt
deleted file mode 100644
index 51340e7..0000000
--- a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Pivotal(TM) GemFire(R) HTTP Session Management Module @VERSION@ for vFabric tc Server (client/server template)
-
-This module provides fast, scalable, and reliable HTTP session replication for tc Server.
-
-Access all Pivotal GemFire Documentation at:
-http://gemfire.docs.pivotal.io
-
-Pivotal Support Services can be accessed from the Pivotal or VMware website.
-Access varies by license type, support offering (contract or per-incident) and 
-product. Please see the Pivotal page at http://www.pivotal.io/support or to 
-file a VMware Support Request, please see the VMware page at 
-https://www.vmware.com/support/policies/howto.html for information on "How to 
-File a Support Request."
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/83affd26/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt
deleted file mode 100644
index db6ebce..0000000
--- a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Pivotal(TM) GemFire(R) HTTP Session Management Module @VERSION@ for vFabric tc Server (peer-to-peer template)
-
-This module provides fast, scalable, and reliable HTTP session replication for tc Server.
-
-Access all Pivotal GemFire Documentation at:
-http://gemfire.docs.pivotal.io
-
-Pivotal Support Services can be accessed from the Pivotal or VMware website.
-Access varies by license type, support offering (contract or per-incident) and 
-product. Please see the Pivotal page at http://www.pivotal.io/support or to 
-file a VMware Support Request, please see the VMware page at 
-https://www.vmware.com/support/policies/howto.html for information on "How to 
-File a Support Request."
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/83affd26/extensions/gemfire-modules-assembly/release/tomcat/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tomcat/readme.txt b/extensions/gemfire-modules-assembly/release/tomcat/readme.txt
deleted file mode 100644
index 4830780..0000000
--- a/extensions/gemfire-modules-assembly/release/tomcat/readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Pivotal(TM) GemFire(R) HTTP Session Management Module @VERSION@ for Tomcat
-
-This module provides fast, scalable, and reliable HTTP session replication for Apache Tomcat.
-
-Access all Pivotal GemFire Documentation at:
-http://gemfire.docs.pivotal.io
-
-Pivotal Support Services can be accessed from the Pivotal or VMware website.
-Access varies by license type, support offering (contract or per-incident) and 
-product. Please see the Pivotal page at http://www.pivotal.io/support or to 
-file a VMware Support Request, please see the VMware page at 
-https://www.vmware.com/support/policies/howto.html for information on "How to 
-File a Support Request."
-


[33/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt
deleted file mode 100755
index 2809c07..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt
+++ /dev/null
@@ -1,1334 +0,0 @@
-open_source_licenses.txt
-
-vFabric GemFire HTTP Session Management Module 2.0
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software packages (or portions thereof) that are distributed with
-this VMware Product.
-
-The VMware Product may also include other VMware components, which may
-contain additional open source software packages. One or more such
-open_source_licenses.txt files may therefore accompany this VMware Product.
-
-The VMware Product that includes this file does not necessarily use all the
-open source software packages referred to below and may also only use
-portions of a given package.
-
-===========================================================================
-TABLE OF CONTENTS
-===========================================================================
-
-The following is a listing of the open source components detailed in this
-document. This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> antlr-2.7.3
-   >>> backport-util-concurrent-java_5.0
-   >>> mx4j-2.0.1
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Apache License, V2.0
-
-   >>> blowfishj-2.14
-   >>> commons-modeler-2.0
-
-
-
-SECTION 3: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-SECTION 4: GNU Lesser General Public License, V2.1
-
-   >>> jgroups-2.10
-   >>> trove-1.1.b3
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Apache License, V2.0
-
-   >>> GNU Lesser General Public License, V2.1
-
-   >>> Common Development and Distribution License, V1.0
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> antlr-2.7.3
-
-SOFTWARE RIGHTS
-
-ANTLR 1989-2004 Developed by Terence Parr
-Partially supported by University of San Francisco & jGuru.com
-
-We reserve no legal rights to the ANTLR--it is fully in the
-public domain. An individual or company may do whatever
-they wish with source code distributed with ANTLR or the
-code generated by ANTLR, including the incorporation of
-ANTLR, or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However,
-we do ask that credit is given to us for developing
-ANTLR. By "credit", we mean that if you use ANTLR or
-incorporate any source code into one of your programs
-(commercial product, research project, or otherwise) that
-you acknowledge this fact somewhere in the documentation,
-research report, etc... If you like ANTLR and have
-developed a nice tool with the output, please mention that
-you developed it using ANTLR. In addition, we ask that the
-headers remain intact in our source code. As long as these
-guidelines are kept, we expect to continue enhancing this
-system and expect to make other tools available as they are
-completed.
-
-The primary ANTLR guy:
-
-Terence Parr
-parrt@cs.usfca.edu
-parrt@antlr.org
-
-
->>> backport-util-concurrent-java_5.0
-
-License
-This software is released to the public domain, in the spirit of the original code written by Doug Lea. The code can be used for any purpose, modified, and redistributed without acknowledgment. No warranty is provided, either express or implied.
-
-
->>> mx4j-2.0.1
-
-The MX4J License, Version 1.0
-
-Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-         1. Redistributions of source code must retain the above copyright
-            notice, this list of conditions and the following disclaimer.
-
-         2. Redistributions in binary form must reproduce the above copyright
-            notice, this list of conditions and the following disclaimer in
-            the documentation and/or other materials provided with the
-            distribution.
-
-         3. The end-user documentation included with the redistribution,
-            if any, must include the following acknowledgment:
-               "This product includes software developed by the
-                MX4J project (http://mx4j.sourceforge.net)."
-            Alternately, this acknowledgment may appear in the software itself,
-            if and wherever such third-party acknowledgments normally appear.
-
-         4. The name "MX4J" must not be used to endorse or promote
-            products derived from this software without prior written
-            permission.
-            For written permission, please contact
-            biorn_steedom [at] users [dot] sourceforge [dot] net
-
-         5. Products derived from this software may not be called "MX4J",
-            nor may "MX4J" appear in their name, without prior written
-            permission of Simone Bordet.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the MX4J project.  For more information on
-MX4J, please see
-the MX4J website.
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Apache License, V2.0 ----------
-
-Apache License, V2.0 are applicable to the following component(s).
-
-
->>> blowfishj-2.14
-
-Copyright 2004 Markus Hahn 
-
-Licensed under the Apache License, Version 2.0 (the "License"); 
-you may not use this file except in compliance with the License. 
-You may obtain a copy of the License at 
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
->>> commons-modeler-2.0
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 are applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
---------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
-
-GNU Lesser General Public License, V2.1 are applicable to the following component(s).
-
-
->>> jgroups-2.10
-
-This library 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 library 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 library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
->>> trove-1.1.b3
-
-The Trove library is licensed under the Lesser GNU Public License,
-which is included with the distribution in a file called LICENSE.txt.
-
-The PrimeFinder and HashFunctions classes in Trove are subject to the
-following license restrictions:
-
-Copyright (c) 1999 CERN - European Organization for Nuclear Research.
-
-Permission to use, copy, modify, distribute and sell this software and
-its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. CERN makes no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without expressed or implied warranty.
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Apache License, V2.0 -----------
-
-Apache License 
-
-Version 2.0, January 2004 
-http://www.apache.org/licenses/ 
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction,
-and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.  
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control
-with that entity. For the purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management
-of such entity, whether by contract or otherwise, or (ii) ownership
-of fifty percent (50%) or more of the outstanding shares, or (iii)
-beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.  
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media
-types.  
-
-"Work" shall mean the work of authorship, whether in Source or
-Object form, made available under the License, as indicated by a copyright
-notice that is included in or attached to the work (an example is provided
-in the Appendix below).  
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent,
-as a whole, an original work of authorship. For the purposes of this
-License, Derivative Works shall not include works that remain separable
-from, or merely link (or bind by name) to the interfaces of, the Work
-and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the
-original version of the Work and any modifications or additions to
-that Work or Derivative Works thereof, that is intentionally submitted
-to Licensor for inclusion in the Work by the copyright owner or by an
-individual or Legal Entity authorized to submit on behalf of the copyright
-owner. For the purposes of this definition, "submitted" means any form of
-electronic, verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems
-that are managed by, or on behalf of, the Licensor for the purpose of
-discussing and improving the Work, but excluding communication that is
-conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity
-on behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty-free, irrevocable copyright license to reproduce, prepare
-Derivative Works of, publicly display, publicly perform, sublicense, and
-distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty- free, irrevocable (except as stated in this section) patent
-license to make, have made, use, offer to sell, sell, import, and
-otherwise transfer the Work, where such license applies only to those
-patent claims licensable by such Contributor that are necessarily
-infringed by their Contribution(s) alone or by combination of
-their Contribution(s) with the Work to which such Contribution(s)
-was submitted. If You institute patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Work or a Contribution incorporated within the Work constitutes direct
-or contributory patent infringement, then any patent licenses granted
-to You under this License for that Work shall terminate as of the date
-such litigation is filed.
-
-4. Redistribution.
-You may reproduce and distribute copies of the Work or Derivative Works
-thereof in any medium, with or without modifications, and in Source or
-Object form, provided that You meet the following conditions:
-
-  a. You must give any other recipients of the Work or Derivative Works
-     a copy of this License; and
-
-  b. You must cause any modified files to carry prominent notices stating
-     that You changed the files; and
-
-  c. You must retain, in the Source form of any Derivative Works that
-     You distribute, all copyright, patent, trademark, and attribution
-     notices from the Source form of the Work, excluding those notices
-     that do not pertain to any part of the Derivative Works; and
-
-  d. If the Work includes a "NOTICE" text file as part of its
-     distribution, then any Derivative Works that You distribute must
-     include a readable copy of the attribution notices contained
-     within such NOTICE file, excluding those notices that do not
-     pertain to any part of the Derivative Works, in at least one of
-     the following places: within a NOTICE text file distributed as part
-     of the Derivative Works; within the Source form or documentation,
-     if provided along with the Derivative Works; or, within a display
-     generated by the Derivative Works, if and wherever such third-party
-     notices normally appear. The contents of the NOTICE file are for
-     informational purposes only and do not modify the License. You
-     may add Your own attribution notices within Derivative Works that
-     You distribute, alongside or as an addendum to the NOTICE text
-     from the Work, provided that such additional attribution notices
-     cannot be construed as modifying the License.  You may add Your own
-     copyright statement to Your modifications and may provide additional
-     or different license terms and conditions for use, reproduction, or
-     distribution of Your modifications, or for any such Derivative Works
-     as a whole, provided Your use, reproduction, and distribution of the
-     Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions.
-Unless You explicitly state otherwise, any Contribution intentionally
-submitted for inclusion in the Work by You to the Licensor shall be
-under the terms and conditions of this License, without any additional
-terms or conditions.  Notwithstanding the above, nothing herein shall
-supersede or modify the terms of any separate license agreement you may
-have executed with Licensor regarding such Contributions.
-
-6. Trademarks.
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-Unless required by applicable law or agreed to in writing, Licensor
-provides the Work (and each Contributor provides its Contributions) on
-an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-express or implied, including, without limitation, any warranties or
-conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
-A PARTICULAR PURPOSE. You are solely responsible for determining the
-appropriateness of using or redistributing the Work and assume any risks
-associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability.
-In no event and under no legal theory, whether in tort (including
-negligence), contract, or otherwise, unless required by applicable law
-(such as deliberate and grossly negligent acts) or agreed to in writing,
-shall any Contributor be liable to You for damages, including any direct,
-indirect, special, incidental, or consequential damages of any character
-arising as a result of this License or out of the use or inability to
-use the Work (including but not limited to damages for loss of goodwill,
-work stoppage, computer failure or malfunction, or any and all other
-commercial damages or losses), even if such Contributor has been advised
-of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-While redistributing the Work or Derivative Works thereof, You may
-choose to offer, and charge a fee for, acceptance of support, warranty,
-indemnity, or other liability obligations and/or rights consistent with
-this License. However, in accepting such obligations, You may act only
-on Your own behalf and on Your sole responsibility, not on behalf of
-any other Contributor, and only if You agree to indemnify, defend, and
-hold each Contributor harmless for any liability incurred by, or claims
-asserted against, such Contributor by reason of your accepting any such
-warranty or additional liability.
-
-END OF TERMS AND CONDITIONS 
-
-
-
---------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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 library 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 library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America or email info@vmware.com.  All such
-requests should clearly specify:  OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium.  This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively, 
-the Source Files may accompany the VMware product.
-
-[GFEHTTP20KP082911]


[04/50] [abbrv] incubator-geode git commit: Looking for git repository starting from the project directory

Posted by kl...@apache.org.
Looking for git repository starting from the project directory

The git revision stored in gemfire.properties was being discovered by
starting from the current working directory where gradle was launched.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e97d7465
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e97d7465
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e97d7465

Branch: refs/heads/feature/GEODE-268
Commit: e97d74654f1f667f3000b68e91737b8095e135dd
Parents: ab25e41
Author: Dan Smith <up...@apache.org>
Authored: Thu Feb 4 15:08:52 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Thu Feb 4 15:11:21 2016 -0800

----------------------------------------------------------------------
 gemfire-core/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e97d7465/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index 85e6fa6..d1a3854 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -122,7 +122,7 @@ task createVersionPropertiesFile {
   doLast {
 
     try {
-      def grgit = org.ajoberstar.grgit.Grgit.open()
+      def grgit = org.ajoberstar.grgit.Grgit.open(currentDir: projectDir)
       ext.branch = grgit.branch.getCurrent().name
       ext.commitId = grgit.head().id
       ext.sourceDate = grgit.head().getDate().format('yyyy-MM-dd HH:mm:ss Z')


[10/50] [abbrv] incubator-geode git commit: GEODE-891: improve DataType unit test coverage

Posted by kl...@apache.org.
GEODE-891: improve DataType unit test coverage

* Added tests for missing cases
* Removed SQLF case

This closes #89


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/57b8229d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/57b8229d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/57b8229d

Branch: refs/heads/feature/GEODE-268
Commit: 57b8229d1905142d53d65d9eec8bde671262080c
Parents: 6bfb8ce
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue Feb 2 15:29:49 2016 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri Feb 5 16:39:57 2016 -0800

----------------------------------------------------------------------
 .../gemfire/internal/offheap/DataType.java      |  23 +-
 .../internal/offheap/DataTypeJUnitTest.java     | 300 ++++++++++++++++++-
 2 files changed, 301 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/57b8229d/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataType.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataType.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataType.java
index c42304d..948fcd9 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataType.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataType.java
@@ -67,9 +67,7 @@ public class DataType implements DSCODE {
             + DSFIDFactory.create(in.readInt(), in).getClass().getName();
       }
       case DS_NO_FIXED_ID:
-        return "com.gemstone.gemfire.internal.DataSerializableFixedID:" + InternalDataSerializer.readClass(in).getName();
-      case SQLF_DVD_ARR:
-        return "com.vmware.sqlfire.internal.iapi.types.DataValueDescriptor";
+        return "com.gemstone.gemfire.internal.DataSerializableFixedID:" + DataSerializer.readClass(in).getName();
       case NULL:
         return "null";
       case NULL_STRING:
@@ -138,21 +136,22 @@ public class DataType implements DSCODE {
         return "java.util.IdentityHashMap";
       case HASH_TABLE:
         return "java.util.Hashtable";
-      case CONCURRENT_HASH_MAP:
-        return "java.util.concurrent.ConcurrentHashMap";
+      //ConcurrentHashMap is written as java.io.serializable
+      //case CONCURRENT_HASH_MAP:
+      //  return "java.util.concurrent.ConcurrentHashMap";
       case PROPERTIES:
         return "java.util.Properties";
       case TIME_UNIT:
         return "java.util.concurrent.TimeUnit";
       case USER_CLASS:
-        // TODO:KIRK
-        return "DataSerializer";
+        byte userClassDSId = in.readByte();
+        return "DataSerializer: with Id:" + userClassDSId;
       case USER_CLASS_2:
-        // TODO:KIRK
-        return ":DataSerializer";
+        short userClass2DSId = in.readShort();
+        return "DataSerializer: with Id:" + userClass2DSId;
       case USER_CLASS_4:
-        // TODO:KIRK
-        return "DataSerializer";
+        int userClass4DSId = in.readInt();
+        return "DataSerializer: with Id:" + userClass4DSId;
       case VECTOR:
         return "java.util.Vector";
       case STACK:
@@ -229,7 +228,7 @@ public class DataType implements DSCODE {
         try {
           GemFireCacheImpl gfc = GemFireCacheImpl.getForPdx("PDX registry is unavailable because the Cache has been closed.");
           EnumInfo enumInfo = gfc.getPdxRegistry().getEnumInfoById(enumId);
-          return "PdxRegistry/java.lang.Enum:" + enumInfo.getClass();
+          return "PdxRegistry/java.lang.Enum:" + enumInfo.getClassName();
         } catch(CacheClosedException e) {
           return "PdxRegistry/java.lang.Enum:PdxRegistryClosed";
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/57b8229d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
index 6c12472..438acb7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
@@ -19,6 +19,7 @@ package com.gemstone.gemfire.internal.offheap;
 import static org.junit.Assert.assertEquals;
 
 import java.io.ByteArrayOutputStream;
+import java.io.DataInput;
 import java.io.DataOutputStream;
 import java.io.File;
 import java.io.IOException;
@@ -45,17 +46,32 @@ import java.util.Vector;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.*;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
+import org.powermock.core.classloader.annotations.PrepareForTest;
 
 import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.distributed.internal.ReplyMessage;
 import com.gemstone.gemfire.internal.DSCODE;
+import com.gemstone.gemfire.internal.DSFIDFactory;
 import com.gemstone.gemfire.internal.DataSerializableFixedID;
 import com.gemstone.gemfire.internal.DataSerializableJUnitTest.DataSerializableImpl;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
+import com.gemstone.gemfire.internal.InternalInstantiator;
 import com.gemstone.gemfire.internal.admin.remote.ShutdownAllResponse;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.execute.data.CustId;
+import com.gemstone.gemfire.pdx.internal.EnumInfo;
+import com.gemstone.gemfire.pdx.internal.PdxType;
+import com.gemstone.gemfire.pdx.internal.TypeRegistry;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -63,6 +79,9 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * @author Kirk Lund
  */
 @Category(UnitTest.class)
+@RunWith(PowerMockRunner.class)
+@PowerMockIgnore("*.UnitTest")
+@PrepareForTest({ InternalInstantiator.class, Instantiator.class, DataSerializer.class, GemFireCacheImpl.class, DSFIDFactory.class })
 public class DataTypeJUnitTest {
 
   @Test
@@ -85,10 +104,31 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + ShutdownAllResponse.class.getName(), type);
   }
-  @Ignore
   @Test
-  public void testDataSerializableFixedIDInt() throws IOException {
-    // impl this if we ever have a Message class that can be instantiated in a unit test
+  public void testDataSerializableFixedIDInt() throws IOException, ClassNotFoundException {
+    Integer someDSFIDInt = new Integer(1);
+    
+    PowerMockito.mockStatic(DSFIDFactory.class);
+    when(DSFIDFactory.create(eq(someDSFIDInt), any())).thenReturn(someDSFIDInt);
+    DSFIDFactory.create(someDSFIDInt, null);
+    
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    DataSerializer.writeByte(DSCODE.DS_FIXED_ID_INT, out);
+    DataSerializer.writeInteger(someDSFIDInt, out);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + Integer.class.getName(), type);
+  }
+  @Test
+  public void testDataSerializableFixedIDClass() throws IOException {
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    DataSerializer.writeByte(DSCODE.DS_NO_FIXED_ID, out);
+    DataSerializer.writeClass(Integer.class, out);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + Integer.class.getName(), type);
   }
   @Test
   public void testNull() throws IOException {
@@ -161,6 +201,16 @@ public class DataTypeJUnitTest {
     assertEquals("java.net.InetAddress", type);
   }
   @Test
+  public void testBoolean() throws IOException {
+    Boolean value = Boolean.TRUE;
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    DataSerializer.writeObject(value, out);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertEquals("java.lang.Boolean", type);
+  }
+  @Test
   public void testCharacter() throws IOException {
     Character value = Character.valueOf('c');
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -570,9 +620,106 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Void.class", type);
   }
-  // TODO:USER_DATA_SERIALIZABLE
-  // TODO:USER_DATA_SERIALIZABLE_2
-  // TODO:USER_DATA_SERIALIZABLE_4
+  //TODO: these tests have to corrected once USER_CLASS, USER_CLASS_2, USER_CLASS_4 are implemented.
+  @Test
+  public void getDataTypeShouldReturnUserClass() throws IOException {
+    byte someUserClassId = 1;
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.USER_CLASS);
+    out.writeByte(someUserClassId);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertThat(type).isEqualTo("DataSerializer: with Id:" + someUserClassId);
+  }
+  @Test
+  public void getDataTypeShouldReturnUserClass2() throws IOException {
+    short someUserClass2Id = 1;
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.USER_CLASS_2);
+    out.writeShort(someUserClass2Id);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertThat(type).isEqualTo("DataSerializer: with Id:" + someUserClass2Id);
+  }
+  @Test
+  public void getDataTypeShouldReturnUserClass4() throws IOException {
+    int someUserClass4Id = 1;
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.USER_CLASS_4);
+    out.writeInt(someUserClass4Id);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertThat(type).isEqualTo("DataSerializer: with Id:" + someUserClass4Id);
+  }
+  @Test
+  public void getDataTypeShouldReturnUserDataSeriazliable() throws IOException {
+    Instantiator mockInstantiator = PowerMockito.mock(Instantiator.class);
+    doReturn(CustId.class).when(mockInstantiator).getInstantiatedClass();
+    mockInstantiator.getInstantiatedClass();
+    
+    int someClassId = 1;
+    
+    PowerMockito.mockStatic(InternalInstantiator.class);
+    when(InternalInstantiator.getClassId(mockInstantiator.getClass())).thenReturn(someClassId);
+    when(InternalInstantiator.getInstantiator(someClassId)).thenReturn(mockInstantiator);
+        
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.USER_DATA_SERIALIZABLE);
+    out.writeByte(someClassId);
+    
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    
+    assertThat(type).isEqualTo("com.gemstone.gemfire.Instantiator:com.gemstone.gemfire.internal.cache.execute.data.CustId");
+  }
+  @Test
+  public void getDataTypeShouldReturnUserDataSeriazliable2() throws IOException {
+    Instantiator mockInstantiator = PowerMockito.mock(Instantiator.class);
+    doReturn(CustId.class).when(mockInstantiator).getInstantiatedClass();
+    mockInstantiator.getInstantiatedClass();
+    
+    int someClassId = 1;
+    
+    PowerMockito.mockStatic(InternalInstantiator.class);
+    when(InternalInstantiator.getClassId(mockInstantiator.getClass())).thenReturn(someClassId);
+    when(InternalInstantiator.getInstantiator(someClassId)).thenReturn(mockInstantiator);
+        
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.USER_DATA_SERIALIZABLE_2);
+    out.writeShort(someClassId);
+    
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    
+    assertThat(type).isEqualTo("com.gemstone.gemfire.Instantiator:com.gemstone.gemfire.internal.cache.execute.data.CustId");
+  }
+  @Test
+  public void getDataTypeShouldReturnUserDataSeriazliable4() throws IOException {
+    Instantiator mockInstantiator = PowerMockito.mock(Instantiator.class);
+    doReturn(CustId.class).when(mockInstantiator).getInstantiatedClass();
+    mockInstantiator.getInstantiatedClass();
+    
+    int someClassId = 1;
+    
+    PowerMockito.mockStatic(InternalInstantiator.class);
+    when(InternalInstantiator.getClassId(mockInstantiator.getClass())).thenReturn(someClassId);
+    when(InternalInstantiator.getInstantiator(someClassId)).thenReturn(mockInstantiator);
+        
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.USER_DATA_SERIALIZABLE_4);
+    out.writeInt(someClassId);
+    
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    
+    assertThat(type).isEqualTo("com.gemstone.gemfire.Instantiator:com.gemstone.gemfire.internal.cache.execute.data.CustId");
+  }
   @Test
   public void testDataSerializable() throws IOException {
     DataSerializableImpl value = new DataSerializableImpl(new Random());
@@ -596,9 +743,122 @@ public class DataTypeJUnitTest {
   @SuppressWarnings("serial")
   public static class SerializableClass implements Serializable {
   }
-  // TODO:PDX
-  // TODO:PDX_ENUM
-  // TODO:GEMFIRE_ENUM
+  @Test
+  public void getDataTypeShouldReturnPDXType() throws IOException {
+    int somePdxTypeInt = 1;
+    PdxType somePdxType = mock(PdxType.class);
+    doReturn("PDXType").when(somePdxType).getClassName();
+
+    TypeRegistry mockTypeRegistry = mock(TypeRegistry.class);
+    when(mockTypeRegistry.getType(somePdxTypeInt)).thenReturn(somePdxType);
+
+    GemFireCacheImpl pdxInstance = mock(GemFireCacheImpl.class);
+    when(pdxInstance.getPdxRegistry()).thenReturn(mockTypeRegistry);
+
+    PowerMockito.mockStatic(GemFireCacheImpl.class);
+    when(GemFireCacheImpl.getForPdx(anyString())).thenReturn(pdxInstance);
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.PDX);
+    out.writeInt(somePdxTypeInt);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+
+    assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance:PDXType");
+  }
+  @Test
+  public void getDataTypeShouldReturnUnknownIfPDXTypeIsNull() throws IOException {
+    int somePdxTypeInt = 1;
+    PdxType somePdxType = null;
+    
+    TypeRegistry mockTypeRegistry = mock(TypeRegistry.class);
+    when(mockTypeRegistry.getType(somePdxTypeInt)).thenReturn(somePdxType);
+
+    GemFireCacheImpl pdxInstance = mock(GemFireCacheImpl.class);
+    when(pdxInstance.getPdxRegistry()).thenReturn(mockTypeRegistry);
+
+    PowerMockito.mockStatic(GemFireCacheImpl.class);
+    when(GemFireCacheImpl.getForPdx("PDX registry is unavailable because the Cache has been closed.")).thenReturn(pdxInstance);
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.PDX);
+    out.writeInt(somePdxTypeInt);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+
+    assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance: unknown id="+somePdxTypeInt);
+  }
+  @Test
+  public void getDataTypeShouldReturnPDXRegistryClosedForPDXTypeWhenCacheIsClosed() throws IOException {
+    int somePdxTypeInt = 1;
+
+    PowerMockito.mockStatic(GemFireCacheImpl.class);
+    when(GemFireCacheImpl.getForPdx("PDX registry is unavailable because the Cache has been closed.")).thenThrow(CacheClosedException.class);
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.PDX);
+    out.writeInt(somePdxTypeInt);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+
+    assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance:PdxRegistryClosed");
+  }
+  @Test
+  public void getDataTypeShouldReturnPDXEnumType() throws IOException {
+    int somePdxEnumId = 1;
+    EnumInfo somePdxEnumInfo = mock(EnumInfo.class);
+    doReturn("PDXENUM").when(somePdxEnumInfo).getClassName();
+
+    TypeRegistry mockTypeRegistry = mock(TypeRegistry.class);
+    when(mockTypeRegistry.getEnumInfoById(0)).thenReturn(somePdxEnumInfo);
+
+    GemFireCacheImpl pdxInstance = mock(GemFireCacheImpl.class);
+    when(pdxInstance.getPdxRegistry()).thenReturn(mockTypeRegistry);
+
+    PowerMockito.mockStatic(GemFireCacheImpl.class);
+    when(GemFireCacheImpl.getForPdx("PDX registry is unavailable because the Cache has been closed.")).thenReturn(pdxInstance);
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.PDX_ENUM);
+    out.writeInt(somePdxEnumId);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+
+    assertThat(type).isEqualTo("PdxRegistry/java.lang.Enum:PDXENUM");
+  }
+  @Test
+  public void getDataTypeShouldReturnPDXRegistryClosedForEnumTypeWhenCacheIsClosed() throws IOException {
+    int someArrayLength = 1;
+
+    PowerMockito.mockStatic(GemFireCacheImpl.class);
+    when(GemFireCacheImpl.getForPdx("PDX registry is unavailable because the Cache has been closed.")).thenThrow(CacheClosedException.class);
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.PDX_ENUM);
+    out.writeInt(someArrayLength);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+
+    assertThat(type).isEqualTo("PdxRegistry/java.lang.Enum:PdxRegistryClosed");
+  }
+  @Test
+  public void getDataTypeShouldReturnGemfireEnum() throws IOException {
+    PowerMockito.mockStatic(DataSerializer.class);
+    when(DataSerializer.readString(any(DataInput.class))).thenReturn("GEMFIRE_ENUM");
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.GEMFIRE_ENUM);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+
+    assertThat(type).isEqualTo("java.lang.Enum:GEMFIRE_ENUM");
+  }
   // TODO:PDX_INLINE_ENUM
   @Test
   public void testBigInteger() throws IOException {
@@ -630,4 +890,24 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.UUID", type);
   }
+  @Test
+  public void testSQLTimestamp() throws IOException {
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(DSCODE.TIMESTAMP);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertEquals("java.sql.Timestamp", type);
+  }
+  @Test
+  public void testUnknownHeaderType() throws IOException {
+    byte unknownType = 0;
+    
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream out = new DataOutputStream(baos);
+    out.writeByte(unknownType);
+    byte[] bytes = baos.toByteArray();
+    String type = DataType.getDataType(bytes);
+    assertThat(type).isEqualTo("Unknown header byte: " + unknownType);
+  }
 }


[48/50] [abbrv] incubator-geode git commit: Fixing an NPE that showed up in an integration test.

Posted by kl...@apache.org.
Fixing an NPE that showed up in an integration test.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fd88a6a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fd88a6a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fd88a6a9

Branch: refs/heads/feature/GEODE-268
Commit: fd88a6a9a55a4ac06cb083698313bcb7a09973ea
Parents: c8c26e6
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Feb 8 15:54:28 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Feb 8 15:54:28 2016 -0800

----------------------------------------------------------------------
 .../distributed/internal/InternalDistributedSystem.java     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd88a6a9/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 5762463..276efec 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -778,7 +778,8 @@ public class InternalDistributedSystem
    * @since 5.7
    */
   private void endInitLocator() throws IOException {
-    if (startedLocator != null) {
+    InternalLocator loc = this.startedLocator;
+    if (loc != null) {
       String locatorString = this.originalConfig.getStartLocator();
 //      DistributionLocatorId locId = new DistributionLocatorId(locatorString);
       boolean finished = false;
@@ -787,14 +788,14 @@ public class InternalDistributedSystem
         // start server location services in order to be able to log information
         // about the use of cache servers
         //      if(locId.isServerLocator()) {
-        this.startedLocator.startServerLocation(this);
+        loc.startServerLocation(this);
         //      }
       
-        this.startedLocator.endStartLocator(this);
+        loc.endStartLocator(this);
         finished = true;
       } finally {
         if (!finished) {
-          this.startedLocator.stop();
+          loc.stop();
         }
       }
     }


[40/50] [abbrv] incubator-geode git commit: GEODE-14: Clean up dependencies and parameterize version numbering

Posted by kl...@apache.org.
GEODE-14: Clean up dependencies and parameterize version numbering


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/feb3d1c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/feb3d1c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/feb3d1c2

Branch: refs/heads/feature/GEODE-268
Commit: feb3d1c2d7dba91f7c0a6306b16b5e63408317ee
Parents: ec3533d
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Jan 6 08:23:52 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:26 2016 -0800

----------------------------------------------------------------------
 extensions/gemfire-modules-assembly/build.gradle  |  4 ++--
 extensions/gemfire-modules-hibernate/build.gradle | 17 +++++++++--------
 extensions/gemfire-modules-session/build.gradle   |  6 +++---
 extensions/gemfire-modules-tomcat7/build.gradle   |  9 +++++----
 gradle/dependency-versions.properties             |  9 +++++++++
 5 files changed, 28 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/feb3d1c2/extensions/gemfire-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/build.gradle b/extensions/gemfire-modules-assembly/build.gradle
index 2381be9..7ef2f01 100644
--- a/extensions/gemfire-modules-assembly/build.gradle
+++ b/extensions/gemfire-modules-assembly/build.gradle
@@ -24,8 +24,8 @@ configurations {
 }
 
 dependencies {
-  slf4jDeps 'org.slf4j:slf4j-api:1.7.7'
-  slf4jDeps 'org.slf4j:slf4j-jdk14:1.7.7'
+  slf4jDeps 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
+  slf4jDeps 'org.slf4j:slf4j-jdk14:' + project.'slf4j-api.version'
 }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/feb3d1c2/extensions/gemfire-modules-hibernate/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/build.gradle b/extensions/gemfire-modules-hibernate/build.gradle
index 928e8bf..0fbf80f 100644
--- a/extensions/gemfire-modules-hibernate/build.gradle
+++ b/extensions/gemfire-modules-hibernate/build.gradle
@@ -21,16 +21,17 @@ jar {
 
 dependencies {
   compile project(':extensions/gemfire-modules')
-  compile 'org.hibernate:hibernate-core:3.5.0-Final'
-  compile 'org.hibernate:hibernate-annotations:3.5.5-Final'
-  compile 'javax.persistence:persistence-api:1.0.2'
+  compile 'org.hibernate:hibernate-core:' + project.'hibernate.version'
+  compile 'org.hibernate:hibernate-annotations:' + project.'hibernate.version'
+  compile 'org.eclipse.persistence:javax.persistence:' + project.'javax.persistence-api.version'
 
-  runtime 'dom4j:dom4j:1.6.1'
+  runtime 'dom4j:dom4j:' + project.'dom4j.version'
 
-  testRuntime 'org.hibernate:hibernate-annotations:3.5.5-Final'
-  testRuntime 'org.slf4j:slf4j-jdk14:1.7.7'
-  testRuntime 'org.hsqldb:hsqldb:2.0.0'
-  testRuntime 'org.javassist:javassist:3.13.0-GA'
+  testRuntime 'commons-collections:commons-collections:' + project.'commons-collections.version'
+  testRuntime 'org.hibernate:hibernate-commons-annotations:' + project.'hibernate-commons-annotations.version'
+  testRuntime 'org.slf4j:slf4j-jdk14:' + project.'slf4j-api.version'
+  testRuntime 'org.hsqldb:hsqldb:' + project.'hsqldb.version'
+  testRuntime 'org.javassist:javassist:' + project.'javassist.version'
 
   provided project(path: ':gemfire-junit', configuration: 'testOutput')
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/feb3d1c2/extensions/gemfire-modules-session/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/build.gradle b/extensions/gemfire-modules-session/build.gradle
index 71d59dc..d6f12c9 100644
--- a/extensions/gemfire-modules-session/build.gradle
+++ b/extensions/gemfire-modules-session/build.gradle
@@ -19,9 +19,9 @@ dependencies {
   compile project(':extensions/gemfire-modules')
   compile project(':gemfire-core')
 
-  testCompile 'javax.servlet:javax.servlet-api:3.1.0'
-  testCompile 'org.slf4j:slf4j-jdk14:1.7.7'
-  testCompile('com.mockrunner:mockrunner-servlet:1.0.8') {
+  testCompile 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
+  testCompile 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
+  testCompile('com.mockrunner:mockrunner-servlet:' + project.'mockrunner.version') {
     exclude group: 'jboss'
   }
   testCompile(group: 'org.eclipse.jetty', name: 'jetty-http', version: project.'jetty.version', classifier: 'tests')

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/feb3d1c2/extensions/gemfire-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/build.gradle b/extensions/gemfire-modules-tomcat7/build.gradle
index 10b8803..fc08fc0 100644
--- a/extensions/gemfire-modules-tomcat7/build.gradle
+++ b/extensions/gemfire-modules-tomcat7/build.gradle
@@ -41,10 +41,11 @@ dependencies {
   compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version'
 
   testCompile 'org.httpunit:httpunit:' + project.'httpunit.version'
-  testRuntime 'javax.servlet:javax.servlet-api:3.1.0'
-  testRuntime 'javax.annotation:jsr250-api:1.0'
-  testRuntime 'javax.ejb:ejb-api:3.0'
-  testRuntime 'javax.persistence:persistence-api:1.0.2'
+
+  testRuntime 'javax.annotation:jsr250-api:' + project.'javax.jsr250-api.version'
+  testRuntime 'javax.ejb:ejb-api:' + project.'javax.ejb-api.version'
+  testRuntime 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
+  testRuntime 'org.eclipse.persistence:javax.persistence:' + project.'javax.persistence-api.version'
 
   provided(project(path: ':extensions/gemfire-modules', configuration: 'testOutput')) {
     // Remove everything related to Tomcat 6.x

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/feb3d1c2/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index f4616be..bfa4789 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -34,16 +34,24 @@ commons-lang.version = 2.5
 commons-logging.version = 1.1.1
 commons-modeler.version = 2.0
 derby.version = 10.2.2.0
+dom4j.version = 1.6.1
 fastutil.version = 7.0.2
 guava.version = 15.0
 hadoop.version = 2.4.1
 hamcrest-all.version = 1.3
 hbase.version = 0.94.27
+hibernate.version = 3.5.5-Final
+hibernate-commons-annotations.version = 3.2.0.Final
 httpunit.version = 1.7.2
+hsqldb.version = 2.0.0
 jackson.version = 2.2.0
 jackson-module-scala_2.10.version = 2.1.5
 jansi.version = 1.8
+javassist.version = 3.20.0-GA
+javax.ejb-api.version = 3.0
+javax.jsr250-api.version = 1.0
 javax.mail-api.version = 1.4.5
+javax.persistence-api.version = 2.0.0
 javax.resource-api.version = 1.7
 javax.servlet-api.version = 3.1.0
 javax.transaction-api.version = 1.2
@@ -59,6 +67,7 @@ JUnitParams.version = 1.0.4
 log4j.version = 2.5
 lucene.version = 5.3.0
 mockito-core.version = 1.10.19
+mockrunner.version = 1.0.8
 multithreadedtc.version = 1.01
 mx4j.version = 3.0.1
 mx4j-remote.version = 3.0.1


[23/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt
new file mode 100755
index 0000000..8253152
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt
@@ -0,0 +1,471 @@
+open_source_license.txt
+
+VMware vFabric GemFire HTTP Session Management Module 7.0 Beta
+	
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------- SECTION 1: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[GFEHTTPMODULE70BKR100512]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/conf/cache-client.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/conf/cache-client.xml b/extensions/gemfire-modules-assembly/release/conf/cache-client.xml
new file mode 100755
index 0000000..3ae9ba7
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/conf/cache-client.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements.  See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version 2.0
+	(the "License"); you may not use this file except in compliance with
+	the License.  You may obtain a copy of the License at
+
+	     http://www.apache.org/licenses/LICENSE-2.0
+
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<client-cache
+    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd"
+    version="9.0">
+
+  <!-- The default pool connects to a cache server running on  localhost at
+       port 40404. To connect to a different server host and port, modify
+       the following pool server host and port. -->
+  <pool name="sessions" subscription-enabled="true">
+    <server host="localhost" port="40404"/>
+  </pool>
+
+  <!-- To configure the client to use a locator instead of a server, replace
+       the server pool above with the locator pool below and modify the locator
+       host and port as necessary. -->
+  <!--
+  <pool name="sessions" subscription-enabled="true">
+    <locator host="localhost" port="10334"/>
+  </pool>
+  -->
+  
+</client-cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/conf/cache-peer.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/conf/cache-peer.xml b/extensions/gemfire-modules-assembly/release/conf/cache-peer.xml
new file mode 100755
index 0000000..1f62cb1
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/conf/cache-peer.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements.  See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version 2.0
+	(the "License"); you may not use this file except in compliance with
+	the License.  You may obtain a copy of the License at
+
+	     http://www.apache.org/licenses/LICENSE-2.0
+
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<cache
+    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd"
+    version="9.0">
+
+  <!-- Uncomment the following disk-store element to modify the default disk store directory -->
+  <!--
+  <disk-store name="DEFAULT">
+    <disk-dirs>
+      <disk-dir>/path/to/persistent/data</disk-dir>
+    </disk-dirs>
+  </disk-store>
+  -->
+
+  <!-- This is the definition of the default session region -->
+  <!--
+  <region name="gemfire_modules_sessions">
+    <region-attributes scope="distributed-ack" enable-gateway="false" data-policy="replicate" statistics-enabled="true">
+      <entry-idle-time>
+        <expiration-attributes timeout="0" action="invalidate">
+          <custom-expiry>
+            <class-name>com.gemstone.gemfire.modules.util.SessionCustomExpiry</class-name>
+          </custom-expiry>
+        </expiration-attributes>
+      </entry-idle-time>
+    </region-attributes>
+  </region>
+  -->
+  
+</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/conf/cache-server.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/conf/cache-server.xml b/extensions/gemfire-modules-assembly/release/conf/cache-server.xml
new file mode 100755
index 0000000..b9d8c2c
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/conf/cache-server.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements.  See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version 2.0
+	(the "License"); you may not use this file except in compliance with
+	the License.  You may obtain a copy of the License at
+
+	     http://www.apache.org/licenses/LICENSE-2.0
+
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<cache
+    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd"
+    version="9.0">
+
+  <!-- Uncomment the following gateway-hub element to create a gateway hub -->
+  <!--
+  <gateway-hub id="NY" port="11110">
+    <gateway id="LN">
+      <gateway-endpoint id="LN-1" host="localhost" port="22220"/>
+      <gateway-queue disk-store-name="NY_GATEWAY"/>
+    </gateway>
+  </gateway-hub>
+  -->
+
+  <!-- Uncomment the following cache-server element to modify the listen port -->
+  <!--
+  <cache-server port="44444"/>
+  -->
+
+  <!-- Uncomment the following disk-store element to modify the default disk store directory -->
+  <!--
+  <disk-store name="DEFAULT">
+    <disk-dirs>
+      <disk-dir>/path/to/persistent/data</disk-dir>
+    </disk-dirs>
+  </disk-store>
+  -->
+  
+  <!-- Uncomment the following disk-store element to create the NY_GATEWAY disk store
+       (for the gateway-hub element defined above) -->
+  <!--
+  <disk-store name="NY_GATEWAY">
+    <disk-dirs>
+      <disk-dir>/path/to/persistent/data</disk-dir>
+    </disk-dirs>
+  </disk-store>
+  -->
+  
+  <!-- This is the definition of the default session region -->
+  <!--
+  <region name="gemfire_modules_sessions">
+    <region-attributes enable-gateway="false" data-policy="partition" statistics-enabled="true">
+      <entry-idle-time>
+        <expiration-attributes timeout="0" action="invalidate">
+          <custom-expiry>
+            <class-name>com.gemstone.gemfire.modules.util.SessionCustomExpiry</class-name>
+          </custom-expiry>
+        </expiration-attributes>
+      </entry-idle-time>
+      <partition-attributes redundant-copies="1" total-num-buckets="113"/>
+    </region-attributes>
+  </region>
+  -->
+
+</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/hibernate/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/hibernate/readme.txt b/extensions/gemfire-modules-assembly/release/hibernate/readme.txt
new file mode 100644
index 0000000..58a4c91
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/hibernate/readme.txt
@@ -0,0 +1,14 @@
+Pivotal(TM) GemFire(R) Hibernate Cache Module @VERSION@
+
+This module provides fast, scalable, distributed L2 caching for JBoss Hibernate.
+
+Access all Pivotal GemFire Documentation at:
+http://gemfire.docs.pivotal.io/
+
+Pivotal Support Services can be accessed from the Pivotal or VMware website.
+Access varies by license type, support offering (contract or per-incident) and 
+product. Please see the Pivotal page at http://www.pivotal.io/support or to 
+file a VMware Support Request, please see the VMware page at 
+https://www.vmware.com/support/policies/howto.html for information on "How to 
+File a Support Request."
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/scripts/cacheserver.bat
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/cacheserver.bat b/extensions/gemfire-modules-assembly/release/scripts/cacheserver.bat
new file mode 100755
index 0000000..8ae0776
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/scripts/cacheserver.bat
@@ -0,0 +1,133 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+setlocal
+setlocal enableextensions
+setlocal enabledelayedexpansion
+set scriptdir=%~dp0
+set gf=%scriptdir:\bin\=%
+if exist "%gf%\lib\gemfire.jar" @goto gfok
+echo Could not determine GEMFIRE location
+rem verify other 2>nul
+goto done
+:gfok
+
+if exist "%gf%\bin\modules.env" (
+  FOR /F "tokens=*" %%i in ('type %gf%\bin\modules.env') do SET %%i
+)
+
+rem Check for the -d argument
+set /a FOUND_ARG=0
+set TC_INSTALL_DIR=
+FOR %%A IN (%*) DO (
+  if !FOUND_ARG! == 1 (
+    set /a FOUND_ARG-=1
+    set TC_INSTALL_DIR=%%~fA
+  )
+  if %%A == -d (
+    set /a FOUND_ARG+=1
+  )
+)
+
+rem Pull out the unused args for the java class
+set CLASS_ARGS=
+:loop
+IF "%1"=="" GOTO ENDLOOP
+  if "%1" == "-d" (
+    shift
+    shift
+  ) else ( 
+    set "CLASS_ARGS=!CLASS_ARGS! %1" 
+    shift
+  )
+GOTO loop
+
+:ENDLOOP
+
+IF NOT "%TC_INSTALL_DIR%" == "" goto SET_TOMCAT_DIR
+FOR /f %%f in ('forfiles /P %gf%\.. /m tomcat-%TOMCAT_MAJOR_VER%* /c "cmd /c echo @path"') do set TOMCAT_DIR=%%f
+REM Strip the surrounding quotes
+set TOMCAT_DIR=%TOMCAT_DIR:"=%
+goto TEST_TOMCAT_DIR
+
+:SET_TOMCAT_DIR
+set /p TOMCAT_VER=<"%gf%\conf\tomcat.version"
+set TOMCAT_DIR="!TC_INSTALL_DIR!\tomcat-!TOMCAT_VER!"
+
+:TEST_TOMCAT_DIR
+if not exist "!TOMCAT_DIR!\lib\catalina.jar" goto TOMCAT_NOT_FOUND
+goto FIND_MOD_JAR
+
+:FIND_MOD_JAR
+FOR %%f in (!gf!\lib\gemfire-modules-?.*.jar) do set MOD_JAR=%%f
+IF NOT "%MOD_JAR%" == "" goto FIND_LOG_API
+rem This is the default modules jar
+set MOD_JAR="!gf!\lib\gemfire-modules.jar"
+
+:FIND_LOG_API
+FOR %%f in (!gf!\lib\log4j-api*.jar) do set LOG_API_JAR=%%f
+IF NOT "%LOG_API_JAR%" == "" goto FIND_LOG_CORE
+echo ERROR: Log4J API jar not found.
+goto LIBS_NOT_FOUND
+
+:FIND_LOG_CORE
+FOR %%f in (!gf!\lib\log4j-core*.jar) do set LOG_CORE_JAR=%%f
+IF NOT "%LOG_CORE_JAR%" == "" goto MAIN_PROCESSING
+echo ERROR: Log4J Core jar not found.
+goto LIBS_NOT_FOUND
+
+
+:LIBS_NOT_FOUND
+echo ERROR: The required libraries could not be located. 
+echo Try using the -d ^<tc Server installation directory^> option or make sure it was installed correctly.
+echo Example: cacheserver.bat start -d "c:\Program Files\Pivotal\tcServer\pivotal-tc-server-standard"
+exit /b 1
+
+:TOMCAT_NOT_FOUND
+echo ERROR: The TOMCAT libraries could not be located. 
+echo Try using the -d ^<tc Server installation directory^> option or make sure it was installed correctly.
+echo Example: cacheserver.bat start -d "c:\Program Files\Pivotal\tcServer\pivotal-tc-server-standard"
+exit /b 1
+
+:MAIN_PROCESSING
+REM Initialize classpath
+
+REM Add GemFire classes
+set GEMFIRE_JARS=%MOD_JAR%;%LOG_API_JAR%;%LOG_CORE_JAR%;%gf%/lib/gemfire.jar;%gf%/lib/antlr.jar;%gf%/lib/mail.jar
+
+REM Add Tomcat classes
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%TOMCAT_DIR%/lib/servlet-api.jar;%TOMCAT_DIR%/lib/catalina.jar;%gf%/lib/gemfire-modules.jar;%TOMCAT_DIR%/bin/tomcat-juli.jar;%TOMCAT_DIR%/lib/tomcat-util.jar
+
+REM Add conf directory
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%/conf
+
+
+if defined CLASSPATH set GEMFIRE_JARS=%GEMFIRE_JARS%;%CLASSPATH%
+
+if not defined GF_JAVA (
+  REM %GF_JAVA% is not defined, assume it is on the PATH
+  set GF_JAVA=java
+)
+
+"%GF_JAVA%" %JAVA_ARGS% -classpath "%GEMFIRE_JARS%" com.gemstone.gemfire.internal.cache.CacheServerLauncher !CLASS_ARGS!
+:done
+set scriptdir=
+set gf=
+set GEMFIRE_JARS=
+
+endlocal

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh b/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
new file mode 100755
index 0000000..e216251
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/scripts/cacheserver.sh
@@ -0,0 +1,104 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set GEMFIRE to the product toplevel directory
+GEMFIRE=`dirname $0`
+OLDPWD=$PWD
+cd $GEMFIRE
+GEMFIRE=`dirname $PWD`
+cd $OLDPWD
+
+TOMCAT_VER=`cat "${GEMFIRE}/conf/tomcat.version"`
+
+if [ -f $GEMFIRE/bin/modules.env ]; then
+  # Pull in TOMCAT_MAJOR_VER
+  . $GEMFIRE/bin/modules.env
+fi
+
+# Pull out the installation directory arguments passed in
+ARGS=( "$@" )
+ARGS_LENGTH=${#ARGS[@]}
+CLASS_ARGS=()
+for (( i==0; i<$ARGS_LENGTH; i++ )); 
+do
+	if [ "${ARGS[$i]}" == "-d" ]; then
+		i=$(($i+1))
+	else 
+		CLASS_ARGS="${CLASS_ARGS} ${ARGS[$i]}"
+	fi
+done
+# End pulling out arguments
+
+# See if the user specified the tomcat installation directory location
+while [ $# -gt 0 ]; do
+  case $1 in
+    -d )
+      TC_INSTALL_DIR="$2"
+      break
+      ;;
+  esac
+  shift
+done
+
+
+if [[ -n $TC_INSTALL_DIR && -d $TC_INSTALL_DIR ]]; then
+  TOMCAT_DIR="$TC_INSTALL_DIR/tomcat-${TOMCAT_VER}"
+else
+  TOMCAT_DIR=`ls -d "${GEMFIRE}"/../tomcat-${TOMCAT_MAJOR_VER}* 2> /dev/null`
+fi
+
+if [[ -z "$TOMCAT_DIR" || ! -f "$TOMCAT_DIR/lib/catalina.jar" ]]; then
+  echo "ERROR: Could not determine TOMCAT library location."
+  echo "       Use the -d <tc Server installation directory> option."
+  echo "       Example: ./cacheserver.sh start -d /opt/pivotal/tcserver/pivotal-tc-server-standard"
+  exit 1
+fi
+
+if [ "x$WINDIR" != "x" ]; then
+  echo "ERROR: The variable WINDIR is set indicating this script is running in a Windows OS, please use the .bat file version instead."
+  exit 1
+fi
+
+if [ ! -f $GEMFIRE/lib/gemfire.jar ]; then
+  echo "ERROR: Could not determine GEMFIRE location."
+  exit 1
+fi
+
+# Initialize classpath
+
+LOG4J_API=$( ls $GEMFIRE/lib/log4j-api*jar )
+LOG4J_CORE=$( ls $GEMFIRE/lib/log4j-core*jar )
+
+MOD_JAR=`ls $GEMFIRE/lib/gemfire-modules-?.*.jar` 2>/dev/null
+if [ -z "$MOD_JAR" ]; then
+  MOD_JAR=$GEMFIRE/lib/gemfire-modules.jar
+fi
+
+# Add GemFire classes
+GEMFIRE_JARS=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:$LOG4J_API:$LOG4J_CORE
+
+# Add Tomcat classes
+GEMFIRE_JARS=$GEMFIRE_JARS:$MOD_JAR:$TOMCAT_DIR/lib/servlet-api.jar:$TOMCAT_DIR/lib/catalina.jar:$TOMCAT_DIR/lib/tomcat-util.jar:$TOMCAT_DIR/bin/tomcat-juli.jar
+
+# Add configuration
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/conf
+
+if [ "x$CLASSPATH" != "x" ]; then
+  GEMFIRE_JARS=$GEMFIRE_JARS:$CLASSPATH
+fi
+
+${GF_JAVA:-java} ${JAVA_ARGS} -classpath ${GEMFIRE_JARS} com.gemstone.gemfire.internal.cache.CacheServerLauncher ${CLASS_ARGS}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/scripts/gemfire.bat
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/gemfire.bat b/extensions/gemfire-modules-assembly/release/scripts/gemfire.bat
new file mode 100755
index 0000000..6102b88
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/scripts/gemfire.bat
@@ -0,0 +1,41 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+@setlocal enableextensions
+@set scriptdir=%~dp0
+@set gf=%scriptdir:\bin\=%
+@if exist "%gf%\lib\gemfire.jar" @goto gfok
+@echo Could not determine GEMFIRE location
+@verify other 2>nul
+@goto done
+:gfok
+
+@set GEMFIRE_JARS=%gf%/lib/gemfire.jar;%gf%/lib/antlr.jar;%gf%/lib/mail.jar
+@if defined CLASSPATH set GEMFIRE_JARS=%GEMFIRE_JARS%;%CLASSPATH%
+
+@if not defined GF_JAVA (
+@REM %GF_JAVA% is not defined, assume it is on the PATH
+@set GF_JAVA=java
+)
+
+@"%GF_JAVA%" %JAVA_ARGS% -classpath "%GEMFIRE_JARS%" com.gemstone.gemfire.internal.SystemAdmin %*
+:done
+@set scriptdir=
+@set gf=
+@set GEMFIRE_JARS=
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh b/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
new file mode 100755
index 0000000..c36c320
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/scripts/gemfire.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set GEMFIRE to the product toplevel directory
+GEMFIRE=`dirname $0`
+OLDPWD=$PWD
+cd $GEMFIRE
+GEMFIRE=`dirname $PWD`
+cd $OLDPWD
+
+if [ "x$WINDIR" != "x" ]; then
+  echo "ERROR: The variable WINDIR is set indicating this script is running in a Windows OS, please use the .bat file version instead."
+  exit 1
+fi
+
+if [ ! -f $GEMFIRE/lib/gemfire.jar ]; then
+  echo "ERROR: Could not determine GEMFIRE location."
+  exit 1
+fi
+
+LOG4J_API=$( ls $GEMFIRE/lib/log4j-api*jar )
+LOG4J_CORE=$( ls $GEMFIRE/lib/log4j-core*jar )
+GEMFIRE_JARS=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:$LOG4J_API:$LOG4J_CORE
+
+if [ "x$CLASSPATH" != "x" ]; then
+  GEMFIRE_JARS=$GEMFIRE_JARS:$CLASSPATH
+fi
+
+# Command line args that start with -J will be passed to the java vm in JARGS.
+# See java --help for a listing of valid vm args.
+# Example: -J-Xmx1g sets the max heap size to 1 gigabyte.
+
+JARGS=
+GEMFIRE_ARGS=
+for i in "$@"
+do
+  if [ "-J" == "${i:0:2}" ]
+  then
+    JARGS="${JARGS} \"${i#-J}\""
+  else
+    GEMFIRE_ARGS="${GEMFIRE_ARGS} \"${i}\""
+  fi
+done
+
+eval ${GF_JAVA:-java} ${JAVA_ARGS} ${JARGS} -classpath ${GEMFIRE_JARS} com.gemstone.gemfire.internal.SystemAdmin ${GEMFIRE_ARGS}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/scripts/setenv.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/scripts/setenv.properties b/extensions/gemfire-modules-assembly/release/scripts/setenv.properties
new file mode 100644
index 0000000..fc8918b
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/scripts/setenv.properties
@@ -0,0 +1,6 @@
+java.opt.1=-Xms${initial.vm.heap.size.mb:512}M
+java.opt.2=-Xmx${maximum.vm.heap.size.mb:512}M
+java.opt.hotspot.1=-XX:+UseParNewGC
+java.opt.hotspot.2=-XX:+UseConcMarkSweepGC
+java.opt.hotspot.3=-XX:CMSInitiatingOccupancyFraction=${cms.initiating.heap.percentage:50}
+java.opt.j9.1=-Xgcpolicy:gencon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.bat
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.bat b/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.bat
new file mode 100755
index 0000000..eb60d3d
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.bat
@@ -0,0 +1,56 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+setlocal enableextensions
+set scriptdir=%~dp0
+set gf=%scriptdir:\bin\=%
+
+set GEMFIRE_JARS=%gf%\lib\gemfire.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\antlr.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\spring-core-3.1.1.RELEASE.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\spring-shell-1.0.0.RC1.jar
+if exist "%GEMFIRE_JARS%" goto gfok
+echo Could not determine GEMFIRE location
+verify other 2>nul
+goto done
+:gfok
+
+REM Initialize classpath
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\gemfire-modules-@GEMFIRE_MODULES_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\gemfire-modules-session-@GEMFIRE_MODULES_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\gemfire-modules-session-external-@GEMFIRE_MODULES_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\servlet-api-@SERVLET_API_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\slf4j-api-@SLF4J_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\slf4j-jdk14-@SLF4J_VERSION@.jar
+
+REM Add conf directory
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\conf
+
+if defined CLASSPATH set GEMFIRE_JARS=%GEMFIRE_JARS%;%CLASSPATH%
+
+if not defined GF_JAVA (
+REM %GF_JAVA% is not defined, assume it is on the PATH
+set GF_JAVA=java
+)
+
+"%GF_JAVA%" %JAVA_ARGS% -classpath "%GEMFIRE_JARS%" com.gemstone.gemfire.internal.cache.CacheServerLauncher %*
+:done
+set scriptdir=
+set gf=
+set GEMFIRE_JARS=
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.sh
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.sh b/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.sh
new file mode 100755
index 0000000..1ac8e0d
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/bin/cacheserver.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set GEMFIRE to the product toplevel directory
+GEMFIRE=`dirname $0`
+OLDPWD=$PWD
+cd $GEMFIRE
+GEMFIRE=`dirname $PWD`
+cd $OLDPWD
+
+if [ "x$WINDIR" != "x" ]; then
+  echo "ERROR: The variable WINDIR is set indicating this script is running in a Windows OS, please use the .bat file version instead."
+  exit 1
+fi
+
+GEMFIRE_JARS=$GEMFIRE/lib/gemfire.jar
+
+if [ ! -f "${GEMFIRE_JARS}" ]; then
+  echo "ERROR: Could not determine GEMFIRE location."
+  exit 1
+fi
+
+LOG4J_API=$( ls $GEMFIRE/lib/log4j-api*jar )
+LOG4J_CORE=$( ls $GEMFIRE/lib/log4j-core*jar )
+
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/antlr.jar:$LOG4J_API:$LOG4J_CORE
+
+# Initialize classpath
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/gemfire-modules-@GEMFIRE_MODULES_VERSION@.jar \
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/gemfire-modules-session-@GEMFIRE_MODULES_VERSION@.jar \
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/servlet-api-@SERVLET_API_VERSION@.jar \
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/gemfire-modules-session-external-@GEMFIRE_MODULES_VERSION@.jar \
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/slf4j-api-@SLF4J_VERSION@.jar \
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/slf4j-jdk14-@SLF4J_VERSION@.jar
+
+# Add configuration
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/conf
+
+if [ "x$CLASSPATH" != "x" ]; then
+  GEMFIRE_JARS=$GEMFIRE_JARS:$CLASSPATH
+fi
+
+${GF_JAVA:-java} ${JAVA_ARGS} -classpath ${GEMFIRE_JARS} com.gemstone.gemfire.internal.cache.CacheServerLauncher "$@"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/bin/gemfire.bat
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/bin/gemfire.bat b/extensions/gemfire-modules-assembly/release/session/bin/gemfire.bat
new file mode 100755
index 0000000..abf1138
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/bin/gemfire.bat
@@ -0,0 +1,53 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+setlocal enableextensions
+set scriptdir=%~dp0
+set gf=%scriptdir:\bin\=%
+
+set GEMFIRE_JARS=%gf%\lib\gemfire.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\antlr.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\spring-core-3.1.1.RELEASE.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\spring-shell-1.0.0.RC1.jar
+if exist "%GEMFIRE_JARS%" goto gfok
+echo Could not determine GEMFIRE location
+verify other 2>nul
+goto done
+:gfok
+
+REM Initialize classpath
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\gemfire-modules-@GEMFIRE_MODULES_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\gemfire-modules-session-@GEMFIRE_MODULES_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\gemfire-modules-session-external-@GEMFIRE_MODULES_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\servlet-api-@SERVLET_API_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\slf4j-api-@SLF4J_VERSION@.jar
+set GEMFIRE_JARS=%GEMFIRE_JARS%;%gf%\lib\slf4j-jdk14-@SLF4J_VERSION@.jar
+
+if defined CLASSPATH set GEMFIRE_JARS=%GEMFIRE_JARS%;%CLASSPATH%
+
+if not defined GF_JAVA (
+REM %GF_JAVA% is not defined, assume it is on the PATH
+set GF_JAVA=java
+)
+
+"%GF_JAVA%" %JAVA_ARGS% -classpath "%GEMFIRE_JARS%" com.gemstone.gemfire.internal.SystemAdmin %*
+:done
+set scriptdir=
+set gf=
+set GEMFIRE_JARS=
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/bin/gemfire.sh
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/bin/gemfire.sh b/extensions/gemfire-modules-assembly/release/session/bin/gemfire.sh
new file mode 100755
index 0000000..1d8abb4
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/bin/gemfire.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set GEMFIRE to the product toplevel directory
+GEMFIRE=`dirname $0`
+OLDPWD=$PWD
+cd $GEMFIRE
+GEMFIRE=`dirname $PWD`
+cd $OLDPWD
+
+if [ "x$WINDIR" != "x" ]; then
+  echo "ERROR: The variable WINDIR is set indicating this script is running in a Windows OS, please use the .bat file version instead."
+  exit 1
+fi
+
+GEMFIRE_JARS=$GEMFIRE/lib/gemfire.jar
+if [ ! -f "${GEMFIRE_JARS}" ]; then
+  echo "ERROR: Could not determine GEMFIRE location."
+  exit 1
+fi
+
+LOG4J_API=$( ls $GEMFIRE/lib/log4j-api*jar )
+LOG4J_CORE=$( ls $GEMFIRE/lib/log4j-core*jar )
+
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/antlr.jar:$LOG4J_API:$LOG4J_CORE
+
+# Initialize classpath
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/gemfire-modules-@GEMFIRE_MODULES_VERSION@.jar
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/gemfire-modules-session-@GEMFIRE_MODULES_VERSION@.jar
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/gemfire-modules-session-external-@GEMFIRE_MODULES_VERSION@.jar
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/servlet-api-@SERVLET_API_VERSION@.jar
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/slf4j-api-@SLF4J_VERSION@.jar
+GEMFIRE_JARS=$GEMFIRE_JARS:$GEMFIRE/lib/slf4j-jdk14-@SLF4J_VERSION@.jar
+
+if [ "x$CLASSPATH" != "x" ]; then
+  GEMFIRE_JARS=$GEMFIRE_JARS:$CLASSPATH
+fi
+
+# Command line args that start with -J will be passed to the java vm in JARGS.
+# See java --help for a listing of valid vm args.
+# Example: -J-Xmx1g sets the max heap size to 1 gigabyte.
+
+JARGS=
+GEMFIRE_ARGS=
+for i in "$@"
+do
+  if [ "-J" == "${i:0:2}" ]
+  then
+    JARGS="${JARGS} \"${i#-J}\""
+  else
+    GEMFIRE_ARGS="${GEMFIRE_ARGS} \"${i}\""
+  fi
+done
+
+eval ${GF_JAVA:-java} ${JAVA_ARGS} ${JARGS} -classpath ${GEMFIRE_JARS} com.gemstone.gemfire.internal.SystemAdmin ${GEMFIRE_ARGS}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/bin/modify_war
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/bin/modify_war b/extensions/gemfire-modules-assembly/release/session/bin/modify_war
new file mode 100755
index 0000000..617a33b
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/bin/modify_war
@@ -0,0 +1,392 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+X=`dirname $0`
+EXE_DIR=`cd $X; pwd`
+LIB_DIR=`cd ${X}/../lib; pwd`
+
+SESSION_JAR="${LIB_DIR}/gemfire-modules-session-external-@GEMFIRE_MODULES_VERSION@.jar"
+
+declare -a OTHER_JARS
+OTHER_JARS=(${LIB_DIR}/gemfire.jar \
+    ${LIB_DIR}/antlr.jar
+    ${LIB_DIR}/gemfire-modules-@GEMFIRE_MODULES_VERSION@.jar \
+    ${LIB_DIR}/gemfire-modules-session-@GEMFIRE_MODULES_VERSION@.jar \
+    ${LIB_DIR}/slf4j-api-@SLF4J_VERSION@.jar)
+
+# This is required for GemFire 8.1
+LOG4J_API=$(ls ${LIB_DIR}/log4j-api*jar)
+LOG4J_CORE=$(ls ${LIB_DIR}/log4j-core*jar)
+if [ -f ${LOG4J_API} -a -f ${LOG4J_CORE} ]; then
+    OTHER_JARS[${#OTHER_JARS[*]}]=$LOG4J_API
+    OTHER_JARS[${#OTHER_JARS[*]}]=$LOG4J_CORE
+fi
+
+TMP_DIR="/tmp/modify_war.$$"
+
+ARG_INPUT_FILE=""
+ARG_WAR_LIB_DIR="WEB-INF/lib"
+ARG_EAR_LIB_DIR="lib"
+ARG_OUTPUT_FILE=""
+ARG_TEST_RUN=0
+ARG_CACHE_TYPE="peer-to-peer"
+ARG_PROCESS_LIBS=1
+declare -a ARG_GEMFIRE_PARAMETERS=""
+declare -a ARG_WAR_LIBS="$SESSION_JAR"
+declare -a ARG_EAR_LIBS=""
+declare -a ARG_JVM_OPTS=""
+
+function usage() {
+    cat <<EOF
+USAGE: modify_war <args>
+WHERE <args>:
+
+    -e <jar>
+                    Assumes the input file is an .ear file and will add the
+                    given jar as a shared, application library. The file will
+                    be added in a /lib directory (by default) and any embedded
+                    .war files will have a corresponding Class-Path entry added
+                    to their MANIFEST.MF file. The option can be given multiple times.
+
+    -h
+                    Displays this help message.
+
+    -j <jar>
+                    Additional library to add to the input file. Can be given
+                    multiple times.
+
+    -J <jvm opt>
+                    JVM argument to pass to sub-commands. Typically this might
+                    be to define proxy values. For example -J"-Dhttp.proxyHost=my-proxy"
+
+    -l <lib>
+                    Library directory where new jars will be placed inside war.
+                    Defaults to WEB-INF/lib.
+
+    -m <lib>
+                    Library directory where new jars will be placed inside ear.
+                    Defaults to /lib.
+
+    -o <file>
+                    The output file.
+
+    -p <param=value>
+                    Specific parameter for inclusion into the session filter
+                    definition as a regular init-param. Can be given multiple times.
+
+    -r
+                    Test run which only outputs an updated web.xml file.
+
+    -t <cache-type>
+                    Type of cache. Must be one of 'peer-to-peer' or
+                    'client-server'. Default is peer-to-peer.
+
+    -v              
+                    Verbose output
+ 
+    -w <war/ear file>
+                    The input file - either a WAR or EAR. The following actions
+                    will be performed depending on the type of file:
+                    WARs will have a <filter> element added to the web.xml and
+                    will have the appropriate jars copied to WEB-INF/lib.
+                    If the file is an EAR, then the appropriate jars will be
+                    copied to lib, within the ear and each embedded war files'
+                    manifest will have a Class-Path entry added (if one does
+                    not already exist).
+                    An appropriate slf4j binding jar must be included for ears
+                    or wars using -e or -j respectively. The following jars are
+                    provided:
+                        slf4j-jdk14
+                        slf4j-log4j12
+                        gemfire-modules-slf4j-weblogic
+
+    -x
+                    Do not create a self-contained war/ear file by copying all
+                    necessary jars into the file. When this option is used,
+                    additional jars will need to be made available to the
+                    container:
+                        gemfire.jar
+                        gemfire-modules.jar
+                        gemfire-modules-session.jar
+                        slf4j-api.jar
+                        slf4j-jdk14.jar (not for WebLogic)
+                        gemfire-modules-slf4j-weblogic.jar (WebLogic only)
+                    This option still modifes any web.xml files.
+                        
+EOF
+}
+
+
+# Two logging levels - 'I'nfo and 'D'ebug
+function log() {
+    local MSG=$1
+    local LVL=${2:-I}
+
+    if [ "$LVL" == "D" ]; then
+        if [ -n "$DEBUG" ]; then
+            echo "$(date '+%Y-%m-%d %H:%M:%S')  $LVL  $MSG" >&2
+        fi
+    else
+        echo "$(date '+%Y-%m-%d %H:%M:%S')  $LVL  $MSG" >&2
+    fi
+}
+
+
+function exiting() {
+    local MSG=$1
+    local CODE=${2:-0}
+
+    if [ -n "$MSG" ]; then
+        echo "ERROR: $MSG"
+    fi
+
+    rm -rf $TMP_DIR
+    exit $CODE
+}
+
+
+function add_war_jars() {
+    local WAR_LIB_DIR=$1/$ARG_WAR_LIB_DIR/
+    mkdir -p $WAR_LIB_DIR
+
+    log "Copying jar(s) into war's '$ARG_WAR_LIB_DIR' directory" D
+    for J in ${ARG_WAR_LIBS[*]}; do
+        log "    $J" D
+        cp $J $WAR_LIB_DIR || exiting "Unable to copy $J to temp location $WAR_LIB_DIR" 1
+    done
+}
+
+
+function process_manifest() {
+    local MANIFEST=$1
+    local TMP_MANIFEST
+
+    log "Processing manifest $MANIFEST" D
+
+    CP_LIBS=""
+    for J in ${OTHER_JARS[*]} ${ARG_EAR_LIBS[*]}; do
+        CP_LIBS="$CP_LIBS $ARG_EAR_LIB_DIR/$(basename $J)"
+    done
+
+    TMP_MANIFEST="$TMP_DIR/manifest.mf.$$"
+    cp $MANIFEST $TMP_MANIFEST
+
+    awk -v CP_LIBS="$CP_LIBS" '
+        BEGIN {
+            cp = 0
+            split(CP_LIBS, cp_array)
+        }
+        /^Class-Path/ {print $0 CP_LIBS; cp = 1; getline}
+        /^ *\r?$/ {
+            if (cp == 0) {
+                print "Class-Path:" CP_LIBS
+                cp = 1
+            }
+        }
+        {print $0}
+        END { if (cp == 0) print "Class-Path:" CP_LIBS }
+    ' $TMP_MANIFEST > $MANIFEST
+
+    rm $TMP_MANIFEST
+}
+
+
+function process_web_xml() {
+    local WORK_DIR=$1
+    local ARG_P=""
+    local JVM_OPTS=""
+
+    for i in ${ARG_GEMFIRE_PARAMETERS[*]}; do
+        ARG_P="$ARG_P -p $i"
+    done
+
+    for j in ${ARG_JVM_OPTS[*]}; do
+        JVM_OPTS="$JVM_OPTS $j"
+    done
+    
+    WEB_XML=$(find $WORK_DIR -name web.xml)
+    TMP_WEB_XML="${WORK_DIR}/web.xml.$$"
+    JAVA_CMD="java $JVM_OPTS -jar $SESSION_JAR $ARG_P -t $ARG_CACHE_TYPE -w $WEB_XML"
+    log "Executing java cmd: $JAVA_CMD" D
+
+    if [ $ARG_TEST_RUN -eq 0 ]; then
+        eval $JAVA_CMD > $TMP_WEB_XML || exiting "Error updating web.xml" 1
+        cp $TMP_WEB_XML $WEB_XML
+        rm -f $TMP_WEB_XML
+    else
+        eval $JAVA_CMD || exiting "Error updating web.xml" 1
+    fi
+}
+
+
+function process_input_file() {
+    local WORK_DIR=$1
+
+    if [[ "$ARG_INPUT_FILE" =~ \.war$ ]]; then
+        process_web_xml $WORK_DIR
+        add_war_jars $WORK_DIR
+        return
+    fi
+ 
+    WAR_LIST=$( find $WORK_DIR -name '*.war' )
+    for WAR in $WAR_LIST; do
+        log "Processing embedded war file $WAR" D
+        TMP_WAR_DIR="${WAR}.$$"
+
+        log "Unzipping war to $TMP_WAR_DIR" D
+        unzip -q -o -d $TMP_WAR_DIR $WAR
+
+        process_web_xml $TMP_WAR_DIR
+        if [ $ARG_TEST_RUN -eq 0 ]; then
+            add_war_jars $TMP_WAR_DIR
+
+            MANIFEST=$( find $TMP_WAR_DIR -name MANIFEST.MF )
+
+            if [ $ARG_PROCESS_LIBS -eq 1 -a -n "$MANIFEST" ]; then
+                process_manifest $MANIFEST
+            fi
+
+            log "Creating new war $WAR" D
+            if [ -n "$MANIFEST" ]; then
+                jar cmf $MANIFEST $WAR -C $TMP_WAR_DIR .
+            else
+                jar cf $WAR -C $TMP_WAR_DIR .
+            fi
+        fi
+
+        rm -rf $TMP_WAR_DIR
+    done
+}
+
+trap exiting INT QUIT TERM
+
+mkdir $TMP_DIR
+
+CMD_ARGS="-j $SESSION_JAR"
+
+while getopts "e:hj:J:l:m:o:p:rt:vw:x" OPT; do
+    case $OPT in
+        e)
+            if [ ! -f $OPTARG ]; then
+                exiting "Cannot read file '$OPTARG' given with option -e" 1
+            fi
+            ARG_EAR_LIBS[${#ARG_EAR_LIBS[@]}]=$OPTARG
+            ;;
+        h)
+            usage
+            exiting "" 1
+            ;;
+        j)
+            if [ ! -f $OPTARG ]; then
+                exiting "Cannot read file '$OPTARG' given with option -j" 1
+            fi
+            ARG_WAR_LIBS[${#ARG_WAR_LIBS[@]}]=$OPTARG
+            ;;
+        J)
+            ARG_JVM_OPTS[${#ARG_JVM_OPTS[@]}]=$OPTARG
+            ;;
+        l)
+            ARG_WAR_LIB_DIR=$OPTARG
+            ;;
+        m)
+            ARG_EAR_LIB_DIR=$OPTARG
+            ;;
+        o)
+            ARG_OUTPUT_FILE=$OPTARG
+            ;;
+        p)
+            ARG_GEMFIRE_PARAMETERS[${#ARG_GEMFIRE_PARAMETERS[@]}]=$OPTARG
+            ;;
+        r)
+            ARG_TEST_RUN=1
+            ;;
+        t)
+            case $OPTARG in
+                peer-to-peer|client-server)
+                    ARG_CACHE_TYPE=$OPTARG
+                    ;;
+                *)
+                    exiting "Invalid cache type '$OPTARG' given with option -t. Options are 'peer-to-peer' or 'client-server'." 1
+                    ;;
+            esac
+            ;;
+        v)
+            DEBUG=1
+            ;;
+        w)
+            if [ ! -f $OPTARG ]; then
+                exiting "Cannot read file '$OPTARG' given with option -w" 1
+            fi
+            ARG_INPUT_FILE=$OPTARG
+            ;;
+        x)
+            ARG_PROCESS_LIBS=0
+            ;;
+        [?])
+            echo "Unknown option '$OPTARG'"
+            echo
+            usage
+            exit 1
+            ;;
+        :)
+            echo "Option '$OPTARG' requires an argument"
+            echo
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+# Some validation
+if [ -z "$ARG_INPUT_FILE" ]; then
+    exiting "Please supply an input file with the -w option" 1
+fi
+
+if [ -z "$ARG_OUTPUT_FILE" ]; then
+    ARG_OUTPUT_FILE="sessions-$(basename $ARG_INPUT_FILE)"
+fi
+
+if [[ "$ARG_INPUT_FILE" =~ \.war$ && -n "${ARG_EAR_LIBS[*]}" ]]; then
+    log "Input file appears to be a war but -e also specified. EAR processing will be skipped." W
+fi
+
+if [[ "$ARG_INPUT_FILE" =~ \.war$ && $ARG_PROCESS_LIBS -eq 1 ]]; then
+    for J in ${OTHER_JARS[*]}; do
+        ARG_WAR_LIBS[${#ARG_WAR_LIBS[@]}]=$J
+    done
+fi
+
+unzip -q -o -d $TMP_DIR $ARG_INPUT_FILE
+process_input_file $TMP_DIR
+
+if [[ $ARG_TEST_RUN -eq 0 && $ARG_PROCESS_LIBS -eq 1 && "$ARG_INPUT_FILE" =~ \.ear$ ]]; then
+    log "Copying additional jars into ear's '$ARG_EAR_LIB_DIR' directory" D
+    mkdir -p $TMP_DIR/$ARG_EAR_LIB_DIR
+    for i in ${OTHER_JARS[*]} ${ARG_EAR_LIBS[*]}; do
+        log "    $i" D
+        cp $i $TMP_DIR/$ARG_EAR_LIB_DIR/ || exiting "Unable to copy $i to $TMP_DIR/$ARG_EAR_LIB_DIR" 1
+    done
+fi
+
+if [ $ARG_TEST_RUN -eq 0 ]; then
+    mkdir -p $TMP_DIR/META-INF
+    touch $TMP_DIR/META-INF/MANIFEST.MF
+    jar cmf $TMP_DIR/META-INF/MANIFEST.MF $ARG_OUTPUT_FILE -C $TMP_DIR .
+    log "Created file: $ARG_OUTPUT_FILE" I
+fi
+
+exiting

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/bin/setenv.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/bin/setenv.properties b/extensions/gemfire-modules-assembly/release/session/bin/setenv.properties
new file mode 100644
index 0000000..fc8918b
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/bin/setenv.properties
@@ -0,0 +1,6 @@
+java.opt.1=-Xms${initial.vm.heap.size.mb:512}M
+java.opt.2=-Xmx${maximum.vm.heap.size.mb:512}M
+java.opt.hotspot.1=-XX:+UseParNewGC
+java.opt.hotspot.2=-XX:+UseConcMarkSweepGC
+java.opt.hotspot.3=-XX:CMSInitiatingOccupancyFraction=${cms.initiating.heap.percentage:50}
+java.opt.j9.1=-Xgcpolicy:gencon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/session/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/session/readme.txt b/extensions/gemfire-modules-assembly/release/session/readme.txt
new file mode 100644
index 0000000..3fa92d8
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/session/readme.txt
@@ -0,0 +1,14 @@
+Pivotal(TM) GemFire(R) Session Management Module @VERSION@ for AppServers
+
+This module provides fast, scalable, distributed L2 caching for Weblogic and other Application Servers.
+
+Access all Pivotal GemFire Documentation at:
+http://gemfire.docs.pivotal.io
+
+Pivotal Support Services can be accessed from the Pivotal or VMware website.
+Access varies by license type, support offering (contract or per-incident) and 
+product. Please see the Pivotal page at http://www.pivotal.io/support or to 
+file a VMware Support Request, please see the VMware page at 
+https://www.vmware.com/support/policies/howto.html for information on "How to 
+File a Support Request."
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/context-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/context-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/context-fragment.xml
new file mode 100644
index 0000000..72faee2
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/context-fragment.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+
+    <remove:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager"/>
+
+    <add:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat7DeltaSessionManager"
+      enableDebugListener="${enable.debug.listener:false}"
+      enableGatewayReplication="${enable.gateway.replication:false}"
+      enableLocalCache="${enable.local.cache:true}"
+      enableCommitValve="${enable.commit.valve:true}"
+      preferDeserializedForm="${prefer.deserialized.form:true}"
+      regionAttributesId="${region.attributes.id:PARTITION_REDUNDANT}"
+      regionName="${region.name:gemfire_modules_sessions}"/>
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/modules.env
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/modules.env b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/modules.env
new file mode 100644
index 0000000..1c14a6c
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-7/modules.env
@@ -0,0 +1 @@
+TOMCAT_MAJOR_VER=7

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/context-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/context-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/context-fragment.xml
new file mode 100644
index 0000000..72faee2
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/context-fragment.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+
+    <remove:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager"/>
+
+    <add:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat7DeltaSessionManager"
+      enableDebugListener="${enable.debug.listener:false}"
+      enableGatewayReplication="${enable.gateway.replication:false}"
+      enableLocalCache="${enable.local.cache:true}"
+      enableCommitValve="${enable.commit.valve:true}"
+      preferDeserializedForm="${prefer.deserialized.form:true}"
+      regionAttributesId="${region.attributes.id:PARTITION_REDUNDANT}"
+      regionName="${region.name:gemfire_modules_sessions}"/>
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/modules.env
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/modules.env b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/modules.env
new file mode 100644
index 0000000..d220675
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs-tomcat-8/modules.env
@@ -0,0 +1 @@
+TOMCAT_MAJOR_VER=8

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt
new file mode 100644
index 0000000..51340e7
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/README.txt
@@ -0,0 +1,14 @@
+Pivotal(TM) GemFire(R) HTTP Session Management Module @VERSION@ for vFabric tc Server (client/server template)
+
+This module provides fast, scalable, and reliable HTTP session replication for tc Server.
+
+Access all Pivotal GemFire Documentation at:
+http://gemfire.docs.pivotal.io
+
+Pivotal Support Services can be accessed from the Pivotal or VMware website.
+Access varies by license type, support offering (contract or per-incident) and 
+product. Please see the Pivotal page at http://www.pivotal.io/support or to 
+file a VMware Support Request, please see the VMware page at 
+https://www.vmware.com/support/policies/howto.html for information on "How to 
+File a Support Request."
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/configuration-prompts.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/configuration-prompts.properties b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/configuration-prompts.properties
new file mode 100644
index 0000000..0ebae97
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/configuration-prompts.properties
@@ -0,0 +1,17 @@
+cache.configuration.file=Please enter the name of the GemFire cache configuration file. Default '${default}':
+critical.heap.percentage=Please enter the percentage of heap at which updates to the cache are refused. 0.0 means disabled. Default '${default}':
+enable.debug.listener=Please specify whether to enable a GemFire listener that logs session create, update, destroy and expiration events. Default '${default}':
+enable.gateway.replication=Please specify whether session modifications should be replicated across the WAN. Default '${default}':
+enable.local.cache=Please specify whether to maintain a local GemFire cache. Default '${default}':
+enable.commit.valve=Please specify whether to commit sessions once per request. Default '${default}':
+prefer.deserialized.form=Please specify whether to prefer keeping attributes in deserialized form. Default '${default}':
+eviction.heap.percentage=Please enter the percentage of heap at which sessions will be evicted from the local cache. Default '${default}':
+log.file=Please enter the name of the file used to log GemFire messages. Default '${default}':
+region.attributes.id=Please enter the id of the attributes of the GemFire region used to cache sessions. Default '${default}':
+region.name=Please enter the name of the GemFire region used to cache sessions. Default '${default}':
+statistic.archive.file=Please enter the name of the file used to store GemFire statistics. Default '${default}':
+statistic.sampling.enabled=Please specify whether GemFire statistic sampling should be enabled. Default '${default}':
+initial.vm.heap.size.mb=Please specify the initial VM heap size in MB (-Xms). Default '${default}':
+maximum.vm.heap.size.mb=Please specify the maximum VM heap size in MB (-Xmx). Default '${default}':
+cms.initiating.heap.percentage=Please specify the percentage of VM heap utilization before a concurrent collection is initiated (--XX:CMSInitiatingOccupancyFraction [Hotspot-only]). Default '${default}':
+tomcat.version=Please enter the major version of Tomcat you will be using (6, 7 or 8). Default '${default}'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/context-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/context-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/context-fragment.xml
new file mode 100644
index 0000000..fac3044
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/context-fragment.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+
+    <add:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager"
+      enableDebugListener="${enable.debug.listener:false}"
+      enableGatewayReplication="${enable.gateway.replication:false}"
+      enableLocalCache="${enable.local.cache:true}"
+      enableCommitValve="${enable.commit.valve:true}"
+      preferDeserializedForm="${prefer.deserialized.form:true}"
+      regionAttributesId="${region.attributes.id:PARTITION_REDUNDANT}"
+      regionName="${region.name:gemfire_modules_sessions}"/>
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/modules.env
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/modules.env b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/modules.env
new file mode 100644
index 0000000..9c4c00a
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/modules.env
@@ -0,0 +1 @@
+TOMCAT_MAJOR_VER=6

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/server-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/server-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/server-fragment.xml
new file mode 100644
index 0000000..c4adc66
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-cs/server-fragment.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='utf-8'?>
+<Server>
+
+    <add:Listener className="com.gemstone.gemfire.modules.session.catalina.ClientServerCacheLifecycleListener"
+      cache-xml-file="${cache.configuration.file:cache-client.xml}"
+      criticalHeapPercentage="${critical.heap.percentage:0.0}"
+      evictionHeapPercentage="${eviction.heap.percentage:80.0}"
+      log-file="${log.file:gemfire_modules.log}"
+      statistic-archive-file="${statistic.archive.file:gemfire_modules.gfs}"
+      statistic-sampling-enabled="${statistic.sampling.enabled:false}"/>
+
+</Server>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/context-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/context-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/context-fragment.xml
new file mode 100644
index 0000000..155aa2a
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/context-fragment.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+
+    <remove:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager"/>
+
+    <add:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat7DeltaSessionManager"
+      enableDebugListener="${enable.debug.listener:false}"
+      enableGatewayReplication="${enable.gateway.replication:false}"
+      enableLocalCache="${enable.local.cache:false}"
+      enableCommitValve="${enable.commit.valve:true}"
+      preferDeserializedForm="${prefer.deserialized.form:true}"
+      regionAttributesId="${region.attributes.id:REPLICATE}"
+      regionName="${region.name:gemfire_modules_sessions}"/>
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/modules.env
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/modules.env b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/modules.env
new file mode 100644
index 0000000..1c14a6c
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-7/modules.env
@@ -0,0 +1 @@
+TOMCAT_MAJOR_VER=7

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/context-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/context-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/context-fragment.xml
new file mode 100644
index 0000000..155aa2a
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/context-fragment.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+
+    <remove:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager"/>
+
+    <add:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat7DeltaSessionManager"
+      enableDebugListener="${enable.debug.listener:false}"
+      enableGatewayReplication="${enable.gateway.replication:false}"
+      enableLocalCache="${enable.local.cache:false}"
+      enableCommitValve="${enable.commit.valve:true}"
+      preferDeserializedForm="${prefer.deserialized.form:true}"
+      regionAttributesId="${region.attributes.id:REPLICATE}"
+      regionName="${region.name:gemfire_modules_sessions}"/>
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/modules.env
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/modules.env b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/modules.env
new file mode 100644
index 0000000..d220675
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p-tomcat-8/modules.env
@@ -0,0 +1 @@
+TOMCAT_MAJOR_VER=8

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt
new file mode 100644
index 0000000..db6ebce
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/README.txt
@@ -0,0 +1,14 @@
+Pivotal(TM) GemFire(R) HTTP Session Management Module @VERSION@ for vFabric tc Server (peer-to-peer template)
+
+This module provides fast, scalable, and reliable HTTP session replication for tc Server.
+
+Access all Pivotal GemFire Documentation at:
+http://gemfire.docs.pivotal.io
+
+Pivotal Support Services can be accessed from the Pivotal or VMware website.
+Access varies by license type, support offering (contract or per-incident) and 
+product. Please see the Pivotal page at http://www.pivotal.io/support or to 
+file a VMware Support Request, please see the VMware page at 
+https://www.vmware.com/support/policies/howto.html for information on "How to 
+File a Support Request."
+


[15/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
new file mode 100644
index 0000000..c81a232
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSession.java
@@ -0,0 +1,597 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Delta;
+import com.gemstone.gemfire.InvalidDeltaException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.cache.lru.Sizeable;
+import com.gemstone.gemfire.internal.util.BlobHelper;
+import com.gemstone.gemfire.modules.gatewaydelta.GatewayDelta;
+import com.gemstone.gemfire.modules.gatewaydelta.GatewayDeltaEvent;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionAttributeEvent;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionAttributeEventBatch;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionDestroyAttributeEvent;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionUpdateAttributeEvent;
+import org.apache.catalina.Manager;
+import org.apache.catalina.ha.session.SerializablePrincipal;
+import org.apache.catalina.realm.GenericPrincipal;
+import org.apache.catalina.security.SecurityUtil;
+import org.apache.catalina.session.StandardSession;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
+import javax.servlet.http.HttpSession;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.Principal;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+@SuppressWarnings("serial")
+public class DeltaSession extends StandardSession implements DataSerializable, Delta, GatewayDelta, Sizeable {
+
+  private transient Region<String, HttpSession> operatingRegion;
+
+  private String sessionRegionName;
+
+  private String contextName;
+
+  private boolean hasDelta;
+
+  private boolean applyRemotely;
+
+  private boolean enableGatewayDeltaReplication;
+
+  private transient final Object changeLock = new Object();
+
+  private final List<DeltaSessionAttributeEvent> eventQueue = new ArrayList<DeltaSessionAttributeEvent>();
+
+  private transient GatewayDeltaEvent currentGatewayDeltaEvent;
+
+  private transient boolean expired = false;
+
+  private transient boolean preferDeserializedForm = true;
+
+  private byte[] serializedPrincipal;
+
+  private final Log LOG = LogFactory.getLog(DeltaSession.class.getName());
+
+  /**
+   * The string manager for this package.
+   */
+//  protected static StringManager STRING_MANAGER =
+//    StringManager.getManager("com.gemstone.gemfire.modules.session.catalina");
+
+  /**
+   * Construct a new <code>Session</code> associated with no <code>Manager</code>. The <code>Manager</code> will be
+   * assigned later using {@link #setOwner(Object)}.
+   */
+  public DeltaSession() {
+    super(null);
+  }
+
+  /**
+   * Construct a new Session associated with the specified Manager.
+   *
+   * @param manager The manager with which this Session is associated
+   */
+  public DeltaSession(Manager manager) {
+    super(manager);
+    setOwner(manager);
+  }
+
+  /**
+   * Return the <code>HttpSession</code> for which this object is the facade.
+   */
+  @SuppressWarnings("unchecked")
+  public HttpSession getSession() {
+    if (facade == null) {
+      if (SecurityUtil.isPackageProtectionEnabled()) {
+        final DeltaSession fsession = this;
+        facade = (DeltaSessionFacade) AccessController.doPrivileged(new PrivilegedAction() {
+          public Object run() {
+            return new DeltaSessionFacade(fsession);
+          }
+        });
+      } else {
+        facade = new DeltaSessionFacade(this);
+      }
+    }
+    return (facade);
+  }
+
+  public Principal getPrincipal() {
+    if (this.principal == null && this.serializedPrincipal != null) {
+      SerializablePrincipal sp = null;
+      try {
+        sp = (SerializablePrincipal) BlobHelper.deserializeBlob(this.serializedPrincipal);
+      } catch (Exception e) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(this)
+            .append(
+                ": Serialized principal contains a byte[] that cannot be deserialized due to the following exception");
+        ((DeltaSessionManager) getManager()).getLogger().warn(builder.toString(), e);
+        return null;
+      }
+      this.principal = sp.getPrincipal(this.manager.getContainer().getRealm());
+      if (getManager() != null) {
+        DeltaSessionManager mgr = (DeltaSessionManager) getManager();
+        if (mgr.getLogger().isDebugEnabled()) {
+          mgr.getLogger().debug(this + ": Deserialized principal: " + this.principal);
+          //mgr.logCurrentStack();
+        }
+      }
+    }
+    return this.principal;
+  }
+
+  public void setPrincipal(Principal principal) {
+    super.setPrincipal(principal);
+
+    // Put the session into the region to serialize the principal
+    if (getManager() != null) {
+      // TODO convert this to a delta
+      getManager().add(this);
+      DeltaSessionManager mgr = (DeltaSessionManager) getManager();
+      if (mgr.getLogger().isDebugEnabled()) {
+        mgr.getLogger().debug(this + ": Cached principal: " + principal);
+        //mgr.logCurrentStack();
+      }
+    }
+  }
+
+  private byte[] getSerializedPrincipal() {
+    if (this.serializedPrincipal == null) {
+      if (this.principal != null && this.principal instanceof GenericPrincipal) {
+        GenericPrincipal gp = (GenericPrincipal) this.principal;
+        SerializablePrincipal sp = SerializablePrincipal.createPrincipal(gp);
+        this.serializedPrincipal = serialize(sp);
+        if (manager != null) {
+          DeltaSessionManager mgr = (DeltaSessionManager) getManager();
+          if (mgr.getLogger().isDebugEnabled()) {
+            mgr.getLogger().debug(this + ": Serialized principal: " + sp);
+            //mgr.logCurrentStack();
+          }
+        }
+      }
+    }
+    return this.serializedPrincipal;
+  }
+
+  protected Region<String, HttpSession> getOperatingRegion() {
+    // This region shouldn't be null when it is needed.
+    // It should have been set by the setOwner method.
+    return this.operatingRegion;
+  }
+
+  public boolean isCommitEnabled() {
+    DeltaSessionManager mgr = (DeltaSessionManager) getManager();
+    return mgr.isCommitValveEnabled();
+  }
+
+  public GatewayDeltaEvent getCurrentGatewayDeltaEvent() {
+    return this.currentGatewayDeltaEvent;
+  }
+
+  public void setCurrentGatewayDeltaEvent(GatewayDeltaEvent currentGatewayDeltaEvent) {
+    this.currentGatewayDeltaEvent = currentGatewayDeltaEvent;
+  }
+
+  @SuppressWarnings("unchecked")
+  public void setOwner(Object manager) {
+    if (manager instanceof DeltaSessionManager) {
+      DeltaSessionManager sessionManager = (DeltaSessionManager) manager;
+      this.manager = sessionManager;
+      initializeRegion(sessionManager);
+      this.hasDelta = false;
+      this.applyRemotely = false;
+      this.enableGatewayDeltaReplication = sessionManager.getEnableGatewayDeltaReplication();
+      this.preferDeserializedForm = sessionManager.getPreferDeserializedForm();
+
+      // Initialize transient variables
+      if (this.listeners == null) {
+        this.listeners = new ArrayList();
+      }
+
+      if (this.notes == null) {
+        this.notes = new Hashtable();
+      }
+
+      contextName = ((DeltaSessionManager) manager).getContainer().getName();
+    } else {
+      throw new IllegalArgumentException(this + ": The Manager must be an AbstractManager");
+    }
+  }
+
+  private void checkBackingCacheAvailable() {
+    if (!((SessionManager) getManager()).isBackingCacheAvailable()) {
+      throw new IllegalStateException("No backing cache server is available.");
+    }
+  }
+
+  public void setAttribute(String name, Object value, boolean notify) {
+    checkBackingCacheAvailable();
+    synchronized (this.changeLock) {
+      // Serialize the value
+      byte[] serializedValue = serialize(value);
+
+      // Store the attribute locally
+      if (this.preferDeserializedForm) {
+        super.setAttribute(name, value, true);
+      } else {
+        super.setAttribute(name, serializedValue, true);
+      }
+
+      if (serializedValue == null) {
+        return;
+      }
+
+      // Create the update attribute message
+      DeltaSessionAttributeEvent event = new DeltaSessionUpdateAttributeEvent(name, serializedValue);
+      queueAttributeEvent(event, true);
+
+      // Distribute the update
+      if (!isCommitEnabled()) {
+        putInRegion(getOperatingRegion(), true, null);
+      }
+    }
+  }
+
+  public void removeAttribute(String name, boolean notify) {
+    checkBackingCacheAvailable();
+    synchronized (this.changeLock) {
+      // Remove the attribute locally
+      super.removeAttribute(name, true);
+
+      // Create the destroy attribute message
+      DeltaSessionAttributeEvent event = new DeltaSessionDestroyAttributeEvent(name);
+      queueAttributeEvent(event, true);
+
+      // Distribute the update
+      if (!isCommitEnabled()) {
+        putInRegion(getOperatingRegion(), true, null);
+      }
+    }
+  }
+
+  public Object getAttribute(String name) {
+    checkBackingCacheAvailable();
+    Object value = super.getAttribute(name);
+
+    // If the attribute is a byte[] (meaning it came from the server),
+    // deserialize it and add it to attributes map before returning it.
+    if (value instanceof byte[]) {
+      try {
+        value = BlobHelper.deserializeBlob((byte[]) value);
+      } catch (Exception e) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(this)
+            .append(": Attribute named ")
+            .append(name)
+            .append(" contains a byte[] that cannot be deserialized due to the following exception");
+        ((DeltaSessionManager) getManager()).getLogger().warn(builder.toString(), e);
+      }
+      if (this.preferDeserializedForm) {
+        localUpdateAttribute(name, value);
+      }
+    }
+
+    // Touch the session region if necessary. This is an asynchronous operation
+    // that prevents the session region from prematurely expiring a session that
+    // is only getting attributes.
+    ((DeltaSessionManager) getManager()).addSessionToTouch(getId());
+
+    return value;
+  }
+
+  public void invalidate() {
+    super.invalidate();
+    //getOperatingRegion().destroy(this.id, true); // already done in super (remove)
+    ((DeltaSessionManager) getManager()).getStatistics().incSessionsInvalidated();
+  }
+
+  public void processExpired() {
+    if (((DeltaSessionManager) getManager()).getLogger().isDebugEnabled()) {
+      ((DeltaSessionManager) getManager()).getLogger().debug(this + ": Expired");
+    }
+    // Set expired (so region.destroy is not called again)
+    setExpired(true);
+
+    // Do expire processing
+    expire();
+
+    // Update statistics
+    DeltaSessionManager manager = (DeltaSessionManager) getManager();
+    if (manager != null) {
+      manager.getStatistics().incSessionsExpired();
+    }
+  }
+
+  public void setMaxInactiveInterval(int interval) {
+    super.setMaxInactiveInterval(interval);
+  }
+
+  public void localUpdateAttribute(String name, Object value) {
+    super.setAttribute(name, value, false); // don't do notification since this is a replication
+  }
+
+  public void localDestroyAttribute(String name) {
+    super.removeAttribute(name, false); // don't do notification since this is a replication
+  }
+
+  public void applyAttributeEvents(Region<String, DeltaSession> region, List<DeltaSessionAttributeEvent> events) {
+    for (DeltaSessionAttributeEvent event : events) {
+      event.apply(this);
+      queueAttributeEvent(event, false);
+    }
+
+    putInRegion(region, false, true);
+  }
+
+  private void initializeRegion(DeltaSessionManager sessionManager) {
+    // Get the session region name
+    this.sessionRegionName = sessionManager.getRegionName();
+
+    // Get the operating region.
+    // If a P2P manager is used, then this will be a local region fronting the
+    // session region if local cache is enabled; otherwise, it will be the
+    // session region itself.
+    // If a CS manager is used, it will be the session proxy region.
+    this.operatingRegion = sessionManager.getSessionCache().getOperatingRegion();
+    if (sessionManager.getLogger().isDebugEnabled()) {
+      sessionManager.getLogger().debug(this + ": Set operating region: " + this.operatingRegion);
+    }
+  }
+
+  private void queueAttributeEvent(DeltaSessionAttributeEvent event, boolean checkAddToCurrentGatewayDelta) {
+    // Add to current gateway delta if necessary
+    if (checkAddToCurrentGatewayDelta) {
+      // If the manager has enabled gateway delta replication and is a P2P
+      // manager, the GatewayDeltaForwardCacheListener will be invoked in this
+      // VM. Add the event to the currentDelta.
+      DeltaSessionManager mgr = (DeltaSessionManager) this.manager;
+      if (this.enableGatewayDeltaReplication && mgr.isPeerToPeer()) {
+        // If commit is not enabled, add the event to the current batch; else,
+        // the current batch will be initialized to the events in the queue will
+        // be added at commit time.
+        if (!isCommitEnabled()) {
+          List<DeltaSessionAttributeEvent> events = new ArrayList<DeltaSessionAttributeEvent>();
+          events.add(event);
+          this.currentGatewayDeltaEvent = new DeltaSessionAttributeEventBatch(this.sessionRegionName, this.id, events);
+        }
+      }
+    }
+    this.eventQueue.add(event);
+  }
+
+  @SuppressWarnings("unchecked")
+  private void putInRegion(Region region, boolean applyRemotely, Object callbackArgument) {
+    this.hasDelta = true;
+    this.applyRemotely = applyRemotely;
+    region.put(this.id, this, callbackArgument);
+    this.eventQueue.clear();
+  }
+
+  public void commit() {
+    if (!isValidInternal()) throw new IllegalStateException("commit: Session " + getId() +
+        " already invalidated");
+//          (STRING_MANAGER.getString("deltaSession.commit.ise", getId()));
+
+    synchronized (this.changeLock) {
+      // Jens - there used to be a check to only perform this if the queue is
+      // empty, but we want this to always run so that the lastAccessedTime
+      // will be updated even when no attributes have been changed.
+      DeltaSessionManager mgr = (DeltaSessionManager) this.manager;
+      if (this.enableGatewayDeltaReplication && mgr.isPeerToPeer()) {
+        setCurrentGatewayDeltaEvent(
+            new DeltaSessionAttributeEventBatch(this.sessionRegionName, this.id, this.eventQueue));
+      }
+      this.hasDelta = true;
+      this.applyRemotely = true;
+      putInRegion(getOperatingRegion(), true, null);
+      this.eventQueue.clear();
+    }
+  }
+
+  public void abort() {
+    synchronized (this.changeLock) {
+      this.eventQueue.clear();
+    }
+  }
+
+  private void setExpired(boolean expired) {
+    this.expired = expired;
+  }
+
+  protected boolean getExpired() {
+    return this.expired;
+  }
+
+  public String getContextName() {
+    return contextName;
+  }
+
+  public boolean hasDelta() {
+    return this.hasDelta;
+  }
+
+  public void toDelta(DataOutput out) throws IOException {
+    // Write whether to apply the changes to another DS if necessary
+    out.writeBoolean(this.applyRemotely);
+
+    // Write the events
+    DataSerializer.writeArrayList((ArrayList) this.eventQueue, out);
+
+    out.writeLong(this.lastAccessedTime);
+    out.writeInt(this.maxInactiveInterval);
+  }
+
+  public void fromDelta(DataInput in) throws IOException, InvalidDeltaException {
+    // Read whether to apply the changes to another DS if necessary
+    this.applyRemotely = in.readBoolean();
+
+    // Read the events
+    List<DeltaSessionAttributeEvent> events = null;
+    try {
+      events = DataSerializer.readArrayList(in);
+    } catch (ClassNotFoundException e) {
+      throw new InvalidDeltaException(e);
+    }
+
+    // This allows for backwards compatibility with 2.1 clients
+    if (((InputStream) in).available() > 0) {
+      this.lastAccessedTime = in.readLong();
+      this.maxInactiveInterval = in.readInt();
+    }
+
+    // Iterate and apply the events
+    for (DeltaSessionAttributeEvent event : events) {
+      event.apply(this);
+    }
+
+    // Add the events to the gateway delta region if necessary
+    if (this.enableGatewayDeltaReplication && this.applyRemotely) {
+      setCurrentGatewayDeltaEvent(new DeltaSessionAttributeEventBatch(this.sessionRegionName, this.id, events));
+    }
+
+    // Access it to set the last accessed time. End access it to set not new.
+    access();
+    endAccess();
+  }
+
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    // Write the StandardSession state
+    DataSerializer.writeString(this.id, out);
+    out.writeLong(this.creationTime);
+    out.writeLong(this.lastAccessedTime);
+    out.writeLong(this.thisAccessedTime);
+    out.writeInt(this.maxInactiveInterval);
+    out.writeBoolean(this.isNew);
+    out.writeBoolean(this.isValid);
+    DataSerializer.writeObject(getSerializedAttributes(), out);
+    DataSerializer.writeByteArray(getSerializedPrincipal(), out);
+
+    // Write the DeltaSession state
+    out.writeBoolean(this.enableGatewayDeltaReplication);
+    DataSerializer.writeString(this.sessionRegionName, out);
+
+    DataSerializer.writeString(this.contextName, out);
+  }
+
+  @Override
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    // Read the StandardSession state
+    this.id = DataSerializer.readString(in);
+    this.creationTime = in.readLong();
+    this.lastAccessedTime = in.readLong();
+    this.thisAccessedTime = in.readLong();
+    this.maxInactiveInterval = in.readInt();
+    this.isNew = in.readBoolean();
+    this.isValid = in.readBoolean();
+    this.attributes = DataSerializer.readObject(in);
+    this.serializedPrincipal = DataSerializer.readByteArray(in);
+
+    // Read the DeltaSession state
+    this.enableGatewayDeltaReplication = in.readBoolean();
+    this.sessionRegionName = DataSerializer.readString(in);
+
+    // This allows for backwards compatibility with 2.1 clients
+    if (((InputStream) in).available() > 0) {
+      this.contextName = DataSerializer.readString(in);
+    }
+
+    // Initialize the transients if necessary
+    if (this.listeners == null) {
+      this.listeners = new ArrayList();
+    }
+
+    if (this.notes == null) {
+      this.notes = new Hashtable();
+    }
+  }
+
+  @Override
+  public int getSizeInBytes() {
+    int size = 0;
+    for (Enumeration<String> e = getAttributeNames(); e.hasMoreElements(); ) {
+      // Don't use this.getAttribute() because we don't want to deserialize
+      // the value.
+      Object value = super.getAttribute(e.nextElement());
+      if (value instanceof byte[]) {
+        size += ((byte[]) value).length;
+      }
+    }
+
+    return size;
+  }
+
+  @SuppressWarnings({"unchecked", "rawtypes"})
+  private Map<String, byte[]> getSerializedAttributes() {
+    // Iterate the values and serialize them if necessary before sending them to the server. This makes the application classes unnecessary on the server.
+    Map<String, byte[]> serializedAttributes = new ConcurrentHashMap<String, byte[]>();
+    for (Iterator i = this.attributes.entrySet().iterator(); i.hasNext(); ) {
+      Map.Entry<String, Object> entry = (Map.Entry<String, Object>) i.next();
+      Object value = entry.getValue();
+      byte[] serializedValue = value instanceof byte[] ? (byte[]) value : serialize(value);
+      serializedAttributes.put(entry.getKey(), serializedValue);
+    }
+    return serializedAttributes;
+  }
+
+  private byte[] serialize(Object obj) {
+    byte[] serializedValue = null;
+    try {
+      serializedValue = BlobHelper.serializeToBlob(obj);
+    } catch (IOException e) {
+      StringBuilder builder = new StringBuilder();
+      builder.append(this)
+          .append(": Object ")
+          .append(obj)
+          .append(" cannot be serialized due to the following exception");
+      ((DeltaSessionManager) getManager()).getLogger().warn(builder.toString(), e);
+    }
+    return serializedValue;
+  }
+
+  @Override
+  public String toString() {
+    return new StringBuilder().append("DeltaSession[")
+        .append("id=")
+        .append(getId())
+        .append("; context=")
+        .append(this.contextName)
+        .append("; sessionRegionName=")
+        .append(this.sessionRegionName)
+        .append("; operatingRegionName=")
+        .append(getOperatingRegion() == null ? "unset" : getOperatingRegion().getFullPath())
+        .append("]")
+        .toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionFacade.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionFacade.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionFacade.java
new file mode 100644
index 0000000..1ac4da2
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionFacade.java
@@ -0,0 +1,49 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import org.apache.catalina.session.StandardSessionFacade;
+
+import javax.servlet.http.HttpSession;
+
+public class DeltaSessionFacade extends StandardSessionFacade {
+
+  private DeltaSession session;
+
+  /**
+   * Construct a new session facade.
+   */
+  public DeltaSessionFacade(DeltaSession session) {
+    super((HttpSession) session);
+    // Store session locally since the super session is private and provides no accessor.
+    this.session = session;
+  }
+
+  // ----------- DeltaSession Methods
+
+  public void commit() {
+    this.session.commit();
+  }
+
+  public void abort() {
+    this.session.abort();
+  }
+
+  boolean isValid() {
+    return this.session.isValid();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionManager.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionManager.java
new file mode 100644
index 0000000..92d9ef6
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/DeltaSessionManager.java
@@ -0,0 +1,992 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.query.Query;
+import com.gemstone.gemfire.cache.query.QueryService;
+import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionStatistics;
+import com.gemstone.gemfire.modules.util.ContextMapper;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import com.gemstone.gemfire.modules.util.RegionHelper;
+import org.apache.catalina.Container;
+import org.apache.catalina.Context;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.Loader;
+import org.apache.catalina.Session;
+import org.apache.catalina.Valve;
+import org.apache.catalina.session.ManagerBase;
+import org.apache.catalina.session.StandardSession;
+import org.apache.catalina.util.CustomObjectInputStream;
+import org.apache.catalina.util.LifecycleSupport;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+abstract public class DeltaSessionManager extends ManagerBase implements Lifecycle, PropertyChangeListener, SessionManager {
+
+  /**
+   * The <code>LifecycleSupport</code> for this component.
+   */
+  protected LifecycleSupport lifecycle = new LifecycleSupport(this);
+
+  /**
+   * The number of rejected sessions.
+   */
+  private AtomicInteger rejectedSessions;
+
+  /**
+   * The maximum number of active Sessions allowed, or -1 for no limit.
+   */
+  protected int maxActiveSessions = -1;
+
+  /**
+   * Has this <code>Manager</code> been started?
+   */
+  protected AtomicBoolean started = new AtomicBoolean(false);
+
+  /**
+   * The name of this <code>Manager</code>
+   */
+  protected String name;
+
+  protected Valve jvmRouteBinderValve;
+
+  protected Valve commitSessionValve;
+
+  protected SessionCache sessionCache;
+
+  protected static final String DEFAULT_REGION_NAME = RegionHelper.NAME + "_sessions";
+
+  protected static final boolean DEFAULT_ENABLE_GATEWAY_DELTA_REPLICATION = false;
+
+  protected static final boolean DEFAULT_ENABLE_GATEWAY_REPLICATION = false;
+
+  protected static final boolean DEFAULT_ENABLE_DEBUG_LISTENER = false;
+
+  protected static final boolean DEFAULT_ENABLE_COMMIT_VALVE = true;
+
+  protected static final boolean DEFAULT_ENABLE_COMMIT_VALVE_FAILFAST = false;
+
+  protected static final boolean DEFAULT_PREFER_DESERIALIZED_FORM = true;
+
+  /*
+   * This *MUST* only be assigned during start/startInternal otherwise it will be associated
+   * with the incorrect context class loader.
+   */
+  protected Log LOGGER;
+
+  protected String regionName = DEFAULT_REGION_NAME;
+
+  protected String regionAttributesId; // the default is different for client-server and peer-to-peer
+
+  protected Boolean enableLocalCache; // the default is different for client-server and peer-to-peer
+
+  protected boolean enableCommitValve = DEFAULT_ENABLE_COMMIT_VALVE;
+
+  protected boolean enableCommitValveFailfast = DEFAULT_ENABLE_COMMIT_VALVE_FAILFAST;
+
+  protected boolean enableGatewayDeltaReplication = DEFAULT_ENABLE_GATEWAY_DELTA_REPLICATION;
+
+  protected boolean enableGatewayReplication = DEFAULT_ENABLE_GATEWAY_REPLICATION;
+
+  protected boolean enableDebugListener = DEFAULT_ENABLE_DEBUG_LISTENER;
+
+  protected boolean preferDeserializedForm = DEFAULT_PREFER_DESERIALIZED_FORM;
+
+  private Timer timer;
+
+  private final Set<String> sessionsToTouch;
+
+  private static final long TIMER_TASK_PERIOD = Long.getLong("gemfiremodules.sessionTimerTaskPeriod", 10000);
+
+  private static final long TIMER_TASK_DELAY = Long.getLong("gemfiremodules.sessionTimerTaskDelay", 10000);
+
+  public DeltaSessionManager() {
+    // Create the set to store sessions to be touched after get attribute requests
+    this.sessionsToTouch = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
+  }
+
+  @Override
+  public String getRegionName() {
+    return this.regionName;
+  }
+
+  public void setRegionName(String regionName) {
+    this.regionName = regionName;
+  }
+
+  @Override
+  public String getRegionAttributesId() {
+    // This property will be null if it hasn't been set in the context.xml file.
+    // Since its default is dependent on the session cache, get the default from
+    // the session cache.
+    if (this.regionAttributesId == null) {
+      this.regionAttributesId = getSessionCache().getDefaultRegionAttributesId();
+    }
+    return this.regionAttributesId;
+  }
+
+  public void setRegionAttributesId(String regionType) {
+    this.regionAttributesId = regionType;
+  }
+
+  @Override
+  public boolean getEnableLocalCache() {
+    // This property will be null if it hasn't been set in the context.xml file.
+    // Since its default is dependent on the session cache, get the default from
+    // the session cache.
+    if (this.enableLocalCache == null) {
+      this.enableLocalCache = getSessionCache().getDefaultEnableLocalCache();
+    }
+    return this.enableLocalCache;
+  }
+
+  public void setEnableLocalCache(boolean enableLocalCache) {
+    this.enableLocalCache = enableLocalCache;
+  }
+
+  public int getMaxActiveSessions() {
+    return this.maxActiveSessions;
+  }
+
+  public void setMaxActiveSessions(int maxActiveSessions) {
+    int oldMaxActiveSessions = this.maxActiveSessions;
+    this.maxActiveSessions = maxActiveSessions;
+    support.firePropertyChange("maxActiveSessions", new Integer(oldMaxActiveSessions),
+        new Integer(this.maxActiveSessions));
+  }
+
+  @Override
+  public boolean getEnableGatewayDeltaReplication() {
+    //return this.enableGatewayDeltaReplication;
+    return false; // disabled
+  }
+
+  public void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication) {
+    this.enableGatewayDeltaReplication = enableGatewayDeltaReplication;
+  }
+
+  @Override
+  public boolean getEnableGatewayReplication() {
+    return this.enableGatewayReplication;
+  }
+
+  public void setEnableGatewayReplication(boolean enableGatewayReplication) {
+    this.enableGatewayReplication = enableGatewayReplication;
+  }
+
+  @Override
+  public boolean getEnableDebugListener() {
+    return this.enableDebugListener;
+  }
+
+  public void setEnableDebugListener(boolean enableDebugListener) {
+    this.enableDebugListener = enableDebugListener;
+  }
+
+  @Override
+  public boolean isCommitValveEnabled() {
+    return this.enableCommitValve;
+  }
+
+  public void setEnableCommitValve(boolean enable) {
+    this.enableCommitValve = enable;
+  }
+
+  @Override
+  public boolean isCommitValveFailfastEnabled() {
+    return this.enableCommitValveFailfast;
+  }
+
+  public void setEnableCommitValveFailfast(boolean enable) {
+    this.enableCommitValveFailfast = enable;
+  }
+
+  @Override
+  public boolean isBackingCacheAvailable() {
+    return sessionCache.isBackingCacheAvailable();
+  }
+
+  public void setPreferDeserializedForm(boolean enable) {
+    this.preferDeserializedForm = enable;
+  }
+
+  @Override
+  public boolean getPreferDeserializedForm() {
+    return this.preferDeserializedForm;
+  }
+
+  @Override
+  public String getStatisticsName() {
+    return getContainer().getName().replace("/", "");
+  }
+
+  @Override
+  public Log getLogger() {
+    if (LOGGER == null) {
+      LOGGER = LogFactory.getLog(DeltaSessionManager.class);
+    }
+    return LOGGER;
+  }
+
+  public SessionCache getSessionCache() {
+    return this.sessionCache;
+  }
+
+  public DeltaSessionStatistics getStatistics() {
+    return getSessionCache().getStatistics();
+  }
+
+  public boolean isPeerToPeer() {
+    return getSessionCache().isPeerToPeer();
+  }
+
+  public boolean isClientServer() {
+    return getSessionCache().isClientServer();
+  }
+
+  /**
+   * This method was taken from StandardManager to set the default maxInactiveInterval based on the container (to 30
+   * minutes).
+   * <p>
+   * Set the Container with which this Manager has been associated. If it is a Context (the usual case), listen for
+   * changes to the session timeout property.
+   *
+   * @param container The associated Container
+   */
+  @Override
+  public void setContainer(Container container) {
+    // De-register from the old Container (if any)
+    if ((this.container != null) && (this.container instanceof Context)) {
+      ((Context) this.container).removePropertyChangeListener(this);
+    }
+
+    // Default processing provided by our superclass
+    super.setContainer(container);
+
+    // Register with the new Container (if any)
+    if ((this.container != null) && (this.container instanceof Context)) {
+      // Overwrite the max inactive interval with the context's session timeout.
+      setMaxInactiveInterval(((Context) this.container).getSessionTimeout() * 60);
+      ((Context) this.container).addPropertyChangeListener(this);
+    }
+  }
+
+  @Override
+  public Session findSession(String id) throws IOException {
+    if (id == null) {
+      return null;
+    }
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Finding session " + id + " in " + getSessionCache().getOperatingRegionName());
+    }
+    DeltaSession session = (DeltaSession) getSessionCache().getSession(id);
+    /*
+     * Check that the context name for this session is the same as this manager's.
+     * This comes into play when multiple versions of a webapp are deployed and
+     * active at the same time; the context name will contain an embedded
+     * version number; something like /test###2.
+     */
+    if (session != null &&
+        !session.getContextName().isEmpty() &&
+        !getContainer().getName().equals(session.getContextName())) {
+      getLogger().info(this + ": Session " + id +
+          " rejected as container name and context do not match: " +
+          getContainer().getName() + " != " + session.getContextName());
+      session = null;
+    }
+
+    if (session == null) {
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug(this + ": Did not find session " + id + " in " + getSessionCache().getOperatingRegionName());
+      }
+    } else {
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug(
+            this + ": Found session " + id + " in " + getSessionCache().getOperatingRegionName() + ": " + session);
+      }
+      // The session was previously stored. Set new to false.
+      session.setNew(false);
+
+      // Check the manager.
+      // If the manager is null, the session was replicated and this is a
+      // failover situation. Reset the manager and activate the session.
+      if (session.getManager() == null) {
+        DeltaSession ds = (DeltaSession) session;
+        ds.setOwner(this);
+        ds.activate();
+      }
+    }
+    return session;
+  }
+
+  protected void initializeSessionCache() {
+    // Retrieve the cache
+    GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.getAnyInstance();
+    if (cache == null) {
+      throw new IllegalStateException(
+          "No cache exists. Please configure either a PeerToPeerCacheLifecycleListener or ClientServerCacheLifecycleListener in the server.xml file.");
+    }
+
+    // Create the appropriate session cache
+    this.sessionCache = cache.isClient() ? new ClientServerSessionCache(this, cache) : new PeerToPeerSessionCache(this,
+        cache);
+
+    // Initialize the session cache
+    this.sessionCache.initialize();
+  }
+
+  @Override
+  protected StandardSession getNewSession() {
+    return new DeltaSession(this);
+  }
+
+  @Override
+  public void remove(Session session) {
+    remove(session, false);
+  }
+
+  public void remove(Session session, boolean update) {
+    //super.remove(session);
+    // Remove the session from the region if necessary.
+    // It will have already been removed if it expired implicitly.
+    DeltaSession ds = (DeltaSession) session;
+    if (ds.getExpired()) {
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug(
+            this + ": Expired session " + session.getId() + " from " + getSessionCache().getOperatingRegionName());
+      }
+    } else {
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug(
+            this + ": Destroying session " + session.getId() + " from " + getSessionCache().getOperatingRegionName());
+      }
+      getSessionCache().destroySession(session.getId());
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug(
+            this + ": Destroyed session " + session.getId() + " from " + getSessionCache().getOperatingRegionName());
+      }
+    }
+  }
+
+  @Override
+  public void add(Session session) {
+    //super.add(session);
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(
+          this + ": Storing session " + session.getId() + " into " + getSessionCache().getOperatingRegionName());
+    }
+    getSessionCache().putSession(session);
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(
+          this + ": Stored session " + session.getId() + " into " + getSessionCache().getOperatingRegionName());
+    }
+    getSessionCache().getStatistics().incSessionsCreated();
+  }
+
+  @Override
+  public int getRejectedSessions() {
+    return this.rejectedSessions.get();
+  }
+
+  public void setRejectedSessions(int rejectedSessions) {
+    this.rejectedSessions.set(rejectedSessions);
+  }
+
+  private void incrementRejectedSessions() {
+    this.rejectedSessions.incrementAndGet();
+  }
+
+  /**
+   * Returns the number of active sessions
+   *
+   * @return number of sessions active
+   */
+  @Override
+  public int getActiveSessions() {
+    return getSessionCache().size();
+  }
+
+  /**
+   * For debugging: return a list of all session ids currently active
+   */
+  @Override
+  public String listSessionIds() {
+    StringBuilder builder = new StringBuilder();
+    Iterator<String> sessionIds = getSessionCache().keySet().iterator();
+    while (sessionIds.hasNext()) {
+      builder.append(sessionIds.next());
+      if (sessionIds.hasNext()) {
+        builder.append(" ");
+      }
+    }
+    return builder.toString();
+  }
+
+  /*
+   * If local caching is enabled, add the session to the set of sessions to be
+   * touched. A timer task will be periodically invoked to get the session in
+   * the session region to update its last accessed time. This prevents the
+   * session from expiring in the case where the application is only getting
+   * attributes from the session and never putting attributes into the
+   * session. If local caching is disabled. the session's last accessed time
+   * would already have been updated properly in the sessions region.
+   *
+   * Note: Due to issues in GemFire expiry, sessions are always asynchronously
+   * touched using a function regardless whether or not local caching is
+   * enabled. This prevents premature expiration.
+   */
+  protected void addSessionToTouch(String sessionId) {
+    this.sessionsToTouch.add(sessionId);
+  }
+
+  protected Set<String> getSessionsToTouch() {
+    return this.sessionsToTouch;
+  }
+
+  protected boolean removeTouchedSession(String sessionId) {
+    return this.sessionsToTouch.remove(sessionId);
+  }
+
+  protected void scheduleTimerTasks() {
+    // Create the timer
+    this.timer = new Timer("Timer for " + toString(), true);
+
+    // Schedule the task to handle sessions to be touched
+    scheduleTouchSessionsTask();
+
+    // Schedule the task to maintain the maxActive sessions
+    scheduleDetermineMaxActiveSessionsTask();
+  }
+
+  private void scheduleTouchSessionsTask() {
+    TimerTask task = new TimerTask() {
+      @Override
+      public void run() {
+        // Get the sessionIds to touch and clear the set inside synchronization
+        Set<String> sessionIds = null;
+        sessionIds = new HashSet<String>(getSessionsToTouch());
+        getSessionsToTouch().clear();
+
+        // Touch the sessions we currently have
+        if (sessionIds != null && (!sessionIds.isEmpty())) {
+          getSessionCache().touchSessions(sessionIds);
+          if (getLogger().isDebugEnabled()) {
+            getLogger().debug(DeltaSessionManager.this + ": Touched sessions: " + sessionIds);
+          }
+        }
+      }
+    };
+    this.timer.schedule(task, TIMER_TASK_DELAY, TIMER_TASK_PERIOD);
+  }
+
+  protected void cancelTimer() {
+    if (timer != null) {
+      this.timer.cancel();
+    }
+  }
+
+  private void scheduleDetermineMaxActiveSessionsTask() {
+    TimerTask task = new TimerTask() {
+      @Override
+      public void run() {
+        int currentActiveSessions = getSessionCache().size();
+        if (currentActiveSessions > getMaxActive()) {
+          setMaxActive(currentActiveSessions);
+          if (getLogger().isDebugEnabled()) {
+            getLogger().debug(DeltaSessionManager.this + ": Set max active sessions: " + currentActiveSessions);
+          }
+        }
+      }
+    };
+    this.timer.schedule(task, TIMER_TASK_DELAY, TIMER_TASK_PERIOD);
+  }
+
+  @Override
+  public void load() throws ClassNotFoundException, IOException {
+    doLoad();
+    ContextMapper.addContext(getContainer().getName(), this);
+  }
+
+  @Override
+  public void unload() throws IOException {
+    doUnload();
+    ContextMapper.removeContext(getContainer().getName());
+  }
+
+  protected void registerJvmRouteBinderValve() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Registering JVM route binder valve");
+    }
+    jvmRouteBinderValve = new JvmRouteBinderValve();
+    getContainer().getPipeline().addValve(jvmRouteBinderValve);
+  }
+
+  protected void unregisterJvmRouteBinderValve() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Unregistering JVM route binder valve");
+    }
+    if (jvmRouteBinderValve != null) {
+      getContainer().getPipeline().removeValve(jvmRouteBinderValve);
+    }
+  }
+
+  protected void registerCommitSessionValve() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Registering CommitSessionValve");
+    }
+    commitSessionValve = new CommitSessionValve();
+    getContainer().getPipeline().addValve(commitSessionValve);
+  }
+
+  protected void unregisterCommitSessionValve() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Unregistering CommitSessionValve");
+    }
+    if (commitSessionValve != null) {
+      getContainer().getPipeline().removeValve(commitSessionValve);
+    }
+  }
+
+  // ------------------------------ Lifecycle Methods
+
+  /**
+   * Add a lifecycle event listener to this component.
+   *
+   * @param listener The listener to add
+   */
+  @Override
+  public void addLifecycleListener(LifecycleListener listener) {
+    this.lifecycle.addLifecycleListener(listener);
+  }
+
+  /**
+   * Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a
+   * zero-length array is returned.
+   */
+  @Override
+  public LifecycleListener[] findLifecycleListeners() {
+    return this.lifecycle.findLifecycleListeners();
+  }
+
+  /**
+   * Remove a lifecycle event listener from this component.
+   *
+   * @param listener The listener to remove
+   */
+  @Override
+  public void removeLifecycleListener(LifecycleListener listener) {
+    this.lifecycle.removeLifecycleListener(listener);
+  }
+
+  /**
+   * Process property change events from our associated Context.
+   * <p>
+   * Part of this method implementation was taken from StandardManager. The sessionTimeout can be changed in the web.xml
+   * which is processed after the context.xml. The context (and the default session timeout) would already have been set
+   * in this Manager. This is the way to get the new session timeout value specified in the web.xml.
+   * <p>
+   * The precedence order for setting the session timeout value is:
+   * <p>
+   * <ol> <li>the max inactive interval is set based on the Manager defined in the context.xml <li>the max inactive
+   * interval is then overwritten by the value of the Context's session timeout when setContainer is called <li>the max
+   * inactive interval is then overwritten by the value of the session-timeout specified in the web.xml (if any) </ol>
+   *
+   * @param event The property change event that has occurred
+   */
+  @Override
+  public void propertyChange(PropertyChangeEvent event) {
+
+    // Validate the source of this event
+    if (!(event.getSource() instanceof Context)) {
+      return;
+    }
+    Context context = (Context) event.getSource();
+
+    // Process a relevant property change
+    if (event.getPropertyName().equals("sessionTimeout")) {
+      try {
+        int interval = ((Integer) event.getNewValue()).intValue();
+        if (interval < RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL) {
+          getLogger().warn(
+              "The configured session timeout of " + interval + " minutes is invalid. Using the original value of " + event
+                  .getOldValue() + " minutes.");
+          interval = ((Integer) event.getOldValue()).intValue();
+          ;
+        }
+        // StandardContext.setSessionTimeout passes -1 if the configured timeout
+        // is 0; otherwise it passes the value set in web.xml. If the interval
+        // parameter equals the default, set the max inactive interval to the
+        // default (no expiration); otherwise set it in seconds.
+        setMaxInactiveInterval(
+            interval == RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL ? RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL : interval * 60);
+      } catch (NumberFormatException e) {
+        getLogger().error(sm.getString("standardManager.sessionTimeout", event.getNewValue().toString()));
+      }
+    }
+  }
+
+  /**
+   * Save any currently active sessions in the appropriate persistence mechanism, if any.  If persistence is not
+   * supported, this method returns without doing anything.
+   *
+   * @throws IOException if an input/output error occurs
+   */
+  protected void doUnload() throws IOException {
+    QueryService querySvc = sessionCache.getCache().getQueryService();
+    Context context;
+    if (getContainer() instanceof Context) {
+      context = (Context) getContainer();
+    } else {
+      getLogger().error("Unable to unload sessions - container is of type " +
+          getContainer().getClass().getName() + " instead of StandardContext");
+      return;
+    }
+    String regionName;
+    if (getRegionName().startsWith("/")) {
+      regionName = getRegionName();
+    } else {
+      regionName = "/" + getRegionName();
+    }
+    Query query = querySvc.newQuery("select s.id from " + regionName +
+        " as s where s.contextName = '" + context.getPath() + "'");
+    getLogger().debug("Query: " + query.getQueryString());
+
+    SelectResults results;
+    try {
+      results = (SelectResults) query.execute();
+    } catch (Exception ex) {
+      getLogger().error("Unable to perform query during doUnload", ex);
+      return;
+    }
+
+    if (results.isEmpty()) {
+      getLogger().debug("No sessions to unload for context " + context.getPath());
+      return; // nothing to do
+    }
+
+    // Open an output stream to the specified pathname, if any
+    File store = sessionStore(context.getPath());
+    if (store == null) {
+      return;
+    }
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug("Unloading sessions to " + store.getAbsolutePath());
+    }
+    FileOutputStream fos = null;
+    BufferedOutputStream bos = null;
+    ObjectOutputStream oos = null;
+    boolean error = false;
+    try {
+      fos = new FileOutputStream(store.getAbsolutePath());
+      bos = new BufferedOutputStream(fos);
+      oos = new ObjectOutputStream(bos);
+    } catch (IOException e) {
+      error = true;
+      getLogger().error("Exception unloading sessions", e);
+      throw e;
+    } finally {
+      if (error) {
+        if (oos != null) {
+          try {
+            oos.close();
+          } catch (IOException ioe) {
+            // Ignore
+          }
+        }
+        if (bos != null) {
+          try {
+            bos.close();
+          } catch (IOException ioe) {
+            // Ignore
+          }
+        }
+        if (fos != null) {
+          try {
+            fos.close();
+          } catch (IOException ioe) {
+            // Ignore
+          }
+        }
+      }
+    }
+
+    ArrayList<StandardSession> list = new ArrayList<StandardSession>();
+    Iterator<String> elements = results.iterator();
+    while (elements.hasNext()) {
+      String id = elements.next();
+      DeltaSession session = (DeltaSession) findSession(id);
+      if (session != null) {
+        list.add(session);
+      }
+    }
+
+    // Write the number of active sessions, followed by the details
+    if (getLogger().isDebugEnabled()) getLogger().debug("Unloading " + list.size() + " sessions");
+    try {
+      oos.writeObject(new Integer(list.size()));
+      for (StandardSession session : list) {
+        session.passivate();
+        session.writeObjectData(oos);
+      }
+    } catch (IOException e) {
+      getLogger().error("Exception unloading sessions", e);
+      try {
+        oos.close();
+      } catch (IOException f) {
+        // Ignore
+      }
+      throw e;
+    }
+
+    // Flush and close the output stream
+    try {
+      oos.flush();
+    } finally {
+      try {
+        oos.close();
+      } catch (IOException f) {
+        // Ignore
+      }
+    }
+
+    // Locally destroy the sessions we just wrote
+    if (getSessionCache().isClientServer()) {
+      for (StandardSession session : list) {
+        if (getLogger().isDebugEnabled()) {
+          getLogger().debug("Locally destroying session " + session.getId());
+        }
+        getSessionCache().getOperatingRegion().localDestroy(session.getId());
+      }
+    }
+
+//    // Expire all the sessions we just wrote
+//    if (getLogger().isDebugEnabled()) {
+//      getLogger().debug("Expiring " + list.size() + " persisted sessions");
+//    }
+//    Iterator<StandardSession> expires = list.iterator();
+//    while (expires.hasNext()) {
+//      StandardSession session = expires.next();
+//      try {
+//        session.expire(false);
+//      } catch (Throwable t) {
+////        ExceptionUtils.handleThrowable(t);
+//      } finally {
+//        session.recycle();
+//      }
+//    }
+
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug("Unloading complete");
+    }
+  }
+
+  /**
+   * Load any currently active sessions that were previously unloaded to the appropriate persistence mechanism, if any.
+   * If persistence is not supported, this method returns without doing anything.
+   *
+   * @throws ClassNotFoundException if a serialized class cannot be found during the reload
+   * @throws IOException            if an input/output error occurs
+   */
+  protected void doLoad() throws ClassNotFoundException, IOException {
+    Context context;
+    if (getContainer() instanceof Context) {
+      context = (Context) getContainer();
+    } else {
+      getLogger().error("Unable to unload sessions - container is of type " +
+          getContainer().getClass().getName() + " instead of StandardContext");
+      return;
+    }
+
+    // Open an input stream to the specified pathname, if any
+    File store = sessionStore(context.getPath());
+    if (store == null) {
+      getLogger().debug("No session store file found");
+      return;
+    }
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug("Loading sessions from " + store.getAbsolutePath());
+    }
+    FileInputStream fis = null;
+    BufferedInputStream bis = null;
+    ObjectInputStream ois = null;
+    Loader loader = null;
+    ClassLoader classLoader = null;
+    try {
+      fis = new FileInputStream(store.getAbsolutePath());
+      bis = new BufferedInputStream(fis);
+      if (container != null) {
+        loader = container.getLoader();
+      }
+      if (loader != null) {
+        classLoader = loader.getClassLoader();
+      }
+      if (classLoader != null) {
+        if (getLogger().isDebugEnabled()) {
+          getLogger().debug("Creating custom object input stream for class loader");
+        }
+        ois = new CustomObjectInputStream(bis, classLoader);
+      } else {
+        if (getLogger().isDebugEnabled()) {
+          getLogger().debug("Creating standard object input stream");
+        }
+        ois = new ObjectInputStream(bis);
+      }
+    } catch (FileNotFoundException e) {
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug("No persisted data file found");
+      }
+      return;
+    } catch (IOException e) {
+      getLogger().error("Exception loading sessions", e);
+      if (fis != null) {
+        try {
+          fis.close();
+        } catch (IOException f) {
+          // Ignore
+        }
+      }
+      if (bis != null) {
+        try {
+          bis.close();
+        } catch (IOException f) {
+          // Ignore
+        }
+      }
+      throw e;
+    }
+
+    // Load the previously unloaded active sessions
+    try {
+      Integer count = (Integer) ois.readObject();
+      int n = count.intValue();
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug("Loading " + n + " persisted sessions");
+      }
+      for (int i = 0; i < n; i++) {
+        StandardSession session = getNewSession();
+        session.readObjectData(ois);
+        session.setManager(this);
+
+        Region region = getSessionCache().getOperatingRegion();
+        DeltaSession existingSession = (DeltaSession) region.get(session.getId());
+        // Check whether the existing session is newer
+        if (existingSession != null && existingSession.getLastAccessedTime() > session.getLastAccessedTime()) {
+          if (getLogger().isDebugEnabled()) {
+            getLogger().debug("Loaded session " + session.getId() + " is older than cached copy");
+          }
+          continue;
+        }
+
+        // Check whether the new session has already expired
+        if (!session.isValid()) {
+          if (getLogger().isDebugEnabled()) {
+            getLogger().debug("Loaded session " + session.getId() + " is invalid");
+          }
+          continue;
+        }
+
+        getLogger().debug("Loading session " + session.getId());
+        session.activate();
+        add(session);
+      }
+    } catch (ClassNotFoundException e) {
+      getLogger().error(e);
+      try {
+        ois.close();
+      } catch (IOException f) {
+        // Ignore
+      }
+      throw e;
+    } catch (IOException e) {
+      getLogger().error(e);
+      try {
+        ois.close();
+      } catch (IOException f) {
+        // Ignore
+      }
+      throw e;
+    } finally {
+      // Close the input stream
+      try {
+        ois.close();
+      } catch (IOException f) {
+        // ignored
+      }
+
+      // Delete the persistent storage file
+      if (store.exists()) {
+        store.delete();
+      }
+    }
+  }
+
+  /**
+   * Return a File object representing the pathname to our persistence file, if any.
+   */
+  private File sessionStore(String ctxPath) {
+    String storeDir = System.getProperty("catalina.base");
+    if (storeDir == null || storeDir.isEmpty()) {
+      storeDir = System.getProperty("java.io.tmpdir");
+    } else {
+      storeDir += System.getProperty("file.separator") + "temp";
+    }
+    File file = new File(storeDir, ctxPath.replaceAll("/", "_") + ".sessions.ser");
+
+    return (file);
+  }
+
+  @Override
+  public String toString() {
+    return new StringBuilder().append(getClass().getSimpleName())
+        .append("[")
+        .append("container=")
+        .append(getContainer())
+        .append("; regionName=")
+        .append(this.regionName)
+        .append("; regionAttributesId=")
+        .append(this.regionAttributesId)
+        .append("]")
+        .toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/JvmRouteBinderValve.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/JvmRouteBinderValve.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/JvmRouteBinderValve.java
new file mode 100644
index 0000000..98481c7
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/JvmRouteBinderValve.java
@@ -0,0 +1,108 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import org.apache.catalina.Manager;
+import org.apache.catalina.Session;
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.valves.ValveBase;
+
+import javax.servlet.ServletException;
+import java.io.IOException;
+
+public class JvmRouteBinderValve extends ValveBase {
+
+  protected static final String info = "com.gemstone.gemfire.modules.session.JvmRouteBinderValve/1.0";
+
+  @Override
+  public void invoke(Request request, Response response) throws IOException, ServletException {
+
+    // Get the Manager
+    Manager manager = request.getContext().getManager();
+
+    // If it is an AbstractManager, handle possible failover
+    if (manager instanceof DeltaSessionManager) {
+      DeltaSessionManager absMgr = (DeltaSessionManager) manager;
+      String localJvmRoute = absMgr.getJvmRoute();
+      if (localJvmRoute != null) {
+        handlePossibleFailover(request, absMgr, localJvmRoute);
+      }
+    }
+
+    // Invoke the next Valve
+    getNext().invoke(request, response);
+  }
+
+  private void handlePossibleFailover(Request request, DeltaSessionManager manager, String localJvmRoute) {
+    String sessionId = request.getRequestedSessionId();
+    if (sessionId != null) {
+      // Get request JVM route
+      String requestJvmRoute = null;
+      int index = sessionId.indexOf(".");
+      if (index > 0) {
+        requestJvmRoute = sessionId.substring(index + 1, sessionId.length());
+      }
+
+      // If the requested JVM route doesn't equal the session's JVM route, handle failover
+      if (requestJvmRoute != null && !requestJvmRoute.equals(localJvmRoute)) {
+        if (manager.getLogger().isDebugEnabled()) {
+          StringBuilder builder = new StringBuilder();
+          builder.append(this)
+              .append(": Handling failover of session ")
+              .append(sessionId)
+              .append(" from ")
+              .append(requestJvmRoute)
+              .append(" to ")
+              .append(localJvmRoute);
+          manager.getLogger().debug(builder.toString());
+        }
+        // Get the original session
+        Session session = null;
+        try {
+          session = manager.findSession(sessionId);
+        } catch (IOException e) {
+          StringBuilder builder = new StringBuilder();
+          builder.append(this)
+              .append(": Caught exception attempting to find session ")
+              .append(sessionId)
+              .append(" in ")
+              .append(manager);
+          manager.getLogger().warn(builder.toString(), e);
+        }
+
+        if (session == null) {
+          StringBuilder builder = new StringBuilder();
+          builder.append(this)
+              .append(": Did not find session ")
+              .append(sessionId)
+              .append(" to failover in ")
+              .append(manager);
+          manager.getLogger().warn(builder.toString());
+        } else {
+          // Change its session id. This removes the previous session and creates the new one.
+          String baseSessionId = sessionId.substring(0, index);
+          String newSessionId = baseSessionId + "." + localJvmRoute;
+          session.setId(newSessionId);
+
+          // Change the request's session id
+          request.changeSessionId(newSessionId);
+        }
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/LocalStrings.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/LocalStrings.properties b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/LocalStrings.properties
new file mode 100644
index 0000000..679cad3
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/LocalStrings.properties
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+deltaSession.commit.ise=commit: Session {0} already invalidated

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerCacheLifecycleListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerCacheLifecycleListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerCacheLifecycleListener.java
new file mode 100644
index 0000000..a86486c
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerCacheLifecycleListener.java
@@ -0,0 +1,29 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.modules.session.bootstrap.PeerToPeerCache;
+
+/**
+ * This is a thin wrapper around a peer-to-peer cache.
+ */
+public class PeerToPeerCacheLifecycleListener extends AbstractCacheLifecycleListener {
+
+  public PeerToPeerCacheLifecycleListener() {
+    cache = PeerToPeerCache.getInstance();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
new file mode 100644
index 0000000..75b5d41
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
@@ -0,0 +1,215 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.execute.Execution;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.modules.session.catalina.callback.LocalSessionCacheLoader;
+import com.gemstone.gemfire.modules.session.catalina.callback.LocalSessionCacheWriter;
+import com.gemstone.gemfire.modules.session.catalina.callback.SessionExpirationCacheListener;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import com.gemstone.gemfire.modules.util.RegionHelper;
+import com.gemstone.gemfire.modules.util.SessionCustomExpiry;
+import com.gemstone.gemfire.modules.util.TouchPartitionedRegionEntriesFunction;
+import com.gemstone.gemfire.modules.util.TouchReplicatedRegionEntriesFunction;
+
+import javax.servlet.http.HttpSession;
+import java.util.Set;
+
+public class PeerToPeerSessionCache extends AbstractSessionCache {
+
+  private Cache cache;
+
+  protected static final String DEFAULT_REGION_ATTRIBUTES_ID = RegionShortcut.REPLICATE.toString();
+
+  protected static final boolean DEFAULT_ENABLE_LOCAL_CACHE = false;
+
+  public PeerToPeerSessionCache(SessionManager sessionManager, Cache cache) {
+    super(sessionManager);
+    this.cache = cache;
+  }
+
+  @Override
+  public void initialize() {
+    // Register Functions
+    registerFunctions();
+
+    // Create or retrieve the region
+    createOrRetrieveRegion();
+
+    // If local cache is enabled, create the local region fronting the session region
+    // and set it as the operating region; otherwise, use the session region directly
+    // as the operating region.
+    this.operatingRegion = getSessionManager().getEnableLocalCache() ? createOrRetrieveLocalRegion() : this.sessionRegion;
+
+    // Create or retrieve the statistics
+    createStatistics();
+  }
+
+  @Override
+  public String getDefaultRegionAttributesId() {
+    return DEFAULT_REGION_ATTRIBUTES_ID;
+  }
+
+  @Override
+  public boolean getDefaultEnableLocalCache() {
+    return DEFAULT_ENABLE_LOCAL_CACHE;
+  }
+
+  @Override
+  public void touchSessions(Set<String> sessionIds) {
+    // Get the region attributes id to determine the region type. This is
+    // problematic since the region attributes id doesn't really define the
+    // region type. This should look at the actual session region.
+    String regionAttributesID = getSessionManager().getRegionAttributesId().toLowerCase();
+
+    // Invoke the appropriate function depending on the type of region
+    ResultCollector collector = null;
+    if (regionAttributesID.startsWith("partition")) {
+      // Execute the partitioned touch function on the primary server(s)
+      Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(sessionIds);
+      collector = execution.execute(TouchPartitionedRegionEntriesFunction.ID, true, false, true);
+    } else {
+      // Execute the member touch function on all the server(s)
+      Execution execution = FunctionService.onMembers(getCache().getDistributedSystem())
+          .withArgs(new Object[]{this.sessionRegion.getFullPath(), sessionIds});
+      collector = execution.execute(TouchReplicatedRegionEntriesFunction.ID, true, false, false);
+    }
+
+    // Get the result
+    try {
+      collector.getResult();
+    } catch (Exception e) {
+      // If an exception occurs in the function, log it.
+      getSessionManager().getLogger().warn("Caught unexpected exception:", e);
+    }
+  }
+
+  @Override
+  public boolean isPeerToPeer() {
+    return true;
+  }
+
+  @Override
+  public boolean isClientServer() {
+    return false;
+  }
+
+  @Override
+  public Set<String> keySet() {
+    return getSessionRegion().keySet();
+  }
+
+  @Override
+  public int size() {
+    return getSessionRegion().size();
+  }
+
+  @Override
+  public GemFireCache getCache() {
+    return this.cache;
+  }
+
+  /**
+   * For peer-to-peer the backing cache *is* what's embedded in tomcat so it's always available
+   *
+   * @return
+   */
+  @Override
+  public boolean isBackingCacheAvailable() {
+    return true;
+  }
+
+  private void registerFunctions() {
+    // Register the touch partitioned region entries function if it is not already registered
+    if (!FunctionService.isRegistered(TouchPartitionedRegionEntriesFunction.ID)) {
+      FunctionService.registerFunction(new TouchPartitionedRegionEntriesFunction());
+    }
+
+    // Register the touch replicated region entries function if it is not already registered
+    if (!FunctionService.isRegistered(TouchReplicatedRegionEntriesFunction.ID)) {
+      FunctionService.registerFunction(new TouchReplicatedRegionEntriesFunction());
+    }
+  }
+
+  @SuppressWarnings("unchecked")
+  protected void createOrRetrieveRegion() {
+    // Create the RegionConfiguration
+    RegionConfiguration configuration = createRegionConfiguration();
+    configuration.setSessionExpirationCacheListener(true);
+
+    // Attempt to retrieve the region
+    // If it already exists, validate it
+    // If it doesn't already exist, create it
+    Region region = this.cache.getRegion(getSessionManager().getRegionName());
+    if (region == null) {
+      // Create the region
+      region = RegionHelper.createRegion((Cache) getCache(), configuration);
+      if (getSessionManager().getLogger().isDebugEnabled()) {
+        getSessionManager().getLogger().debug("Created new session region: " + region);
+      }
+    } else {
+      // Validate the existing region
+      if (getSessionManager().getLogger().isDebugEnabled()) {
+        getSessionManager().getLogger().debug("Retrieved existing session region: " + region);
+      }
+      RegionHelper.validateRegion((Cache) getCache(), configuration, region);
+    }
+
+    // Set the session region
+    this.sessionRegion = region;
+  }
+
+  private Region<String, HttpSession> createOrRetrieveLocalRegion() {
+    // Attempt to retrieve the fronting region
+    String frontingRegionName = this.sessionRegion.getName() + "_local";
+    Region<String, HttpSession> frontingRegion = this.cache.getRegion(frontingRegionName);
+    if (frontingRegion == null) {
+      // Create the region factory
+      RegionFactory<String, HttpSession> factory = this.cache.createRegionFactory(RegionShortcut.LOCAL_HEAP_LRU);
+
+      // Add the cache loader and writer
+      factory.setCacheLoader(new LocalSessionCacheLoader(this.sessionRegion));
+      factory.setCacheWriter(new LocalSessionCacheWriter(this.sessionRegion));
+
+      // Set the expiration time, action and listener if necessary
+      int maxInactiveInterval = getSessionManager().getMaxInactiveInterval();
+      if (maxInactiveInterval != RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL) {
+        factory.setStatisticsEnabled(true);
+        factory.setCustomEntryIdleTimeout(new SessionCustomExpiry());
+        factory.addCacheListener(new SessionExpirationCacheListener());
+      }
+
+      // Create the region
+      frontingRegion = factory.create(frontingRegionName);
+      if (getSessionManager().getLogger().isDebugEnabled()) {
+        getSessionManager().getLogger().debug("Created new local session region: " + frontingRegion);
+      }
+    } else {
+      if (getSessionManager().getLogger().isDebugEnabled()) {
+        getSessionManager().getLogger().debug("Retrieved existing local session region: " + frontingRegion);
+      }
+    }
+    return frontingRegion;
+  }
+}  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionCache.java
new file mode 100644
index 0000000..b1128e7
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionCache.java
@@ -0,0 +1,64 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionStatistics;
+import org.apache.catalina.Session;
+
+import javax.servlet.http.HttpSession;
+import java.util.Set;
+
+public interface SessionCache {
+
+  public void initialize();
+
+  public String getDefaultRegionAttributesId();
+
+  public boolean getDefaultEnableLocalCache();
+
+  public String getSessionRegionName();
+
+  public String getOperatingRegionName();
+
+  public void putSession(Session session);
+
+  public HttpSession getSession(String sessionId);
+
+  public void destroySession(String sessionId);
+
+  public void touchSessions(Set<String> sessionIds);
+
+  public DeltaSessionStatistics getStatistics();
+
+  public GemFireCache getCache();
+
+  public Region<String, HttpSession> getSessionRegion();
+
+  public Region<String, HttpSession> getOperatingRegion();
+
+  public boolean isPeerToPeer();
+
+  public boolean isClientServer();
+
+  public Set<String> keySet();
+
+  public int size();
+
+  public boolean isBackingCacheAvailable();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionManager.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionManager.java
new file mode 100644
index 0000000..e3d6c7e
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/SessionManager.java
@@ -0,0 +1,48 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import org.apache.juli.logging.Log;
+
+public interface SessionManager {
+
+  public String getRegionName();
+
+  public String getRegionAttributesId();
+
+  public int getMaxInactiveInterval();
+
+  public boolean getEnableGatewayReplication();
+
+  public boolean getEnableGatewayDeltaReplication();
+
+  public boolean getEnableDebugListener();
+
+  public boolean getEnableLocalCache();
+
+  public boolean isCommitValveEnabled();
+
+  public boolean isCommitValveFailfastEnabled();
+
+  public boolean isBackingCacheAvailable();
+
+  public boolean getPreferDeserializedForm();
+
+  public String getStatisticsName();
+
+  public Log getLogger();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat6DeltaSessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat6DeltaSessionManager.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat6DeltaSessionManager.java
new file mode 100644
index 0000000..d5b5991
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat6DeltaSessionManager.java
@@ -0,0 +1,98 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import org.apache.catalina.LifecycleException;
+
+public class Tomcat6DeltaSessionManager extends DeltaSessionManager {
+
+  /**
+   * Prepare for the beginning of active use of the public methods of this component.  This method should be called
+   * after <code>configure()</code>, and before any of the public methods of the component are utilized.
+   *
+   * @throws LifecycleException if this component detects a fatal error that prevents this component from being used
+   */
+  @Override
+  public void start() throws LifecycleException {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Starting");
+    }
+    if (this.started.get()) {
+      return;
+    }
+    this.lifecycle.fireLifecycleEvent(START_EVENT, null);
+    try {
+      init();
+    } catch (Throwable t) {
+      getLogger().error(t.getMessage(), t);
+    }
+
+    // Register our various valves
+    registerJvmRouteBinderValve();
+
+    if (isCommitValveEnabled()) {
+      registerCommitSessionValve();
+    }
+
+    // Initialize the appropriate session cache interface
+    initializeSessionCache();
+
+    // Create the timer and schedule tasks
+    scheduleTimerTasks();
+
+    this.started.set(true);
+  }
+
+  /**
+   * Gracefully terminate the active use of the public methods of this component.  This method should be the last one
+   * called on a given instance of this component.
+   *
+   * @throws LifecycleException if this component detects a fatal error that needs to be reported
+   */
+  @Override
+  public void stop() throws LifecycleException {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Stopping");
+    }
+    this.started.set(false);
+    this.lifecycle.fireLifecycleEvent(STOP_EVENT, null);
+
+    // StandardManager expires all Sessions here.
+    // All Sessions are not known by this Manager.
+
+    // Require a new random number generator if we are restarted
+    this.random = null;
+
+    // Remove from RMI registry
+    if (this.initialized) {
+      destroy();
+    }
+
+    // Clear any sessions to be touched
+    getSessionsToTouch().clear();
+
+    // Cancel the timer
+    cancelTimer();
+
+    // Unregister the JVM route valve
+    unregisterJvmRouteBinderValve();
+
+    if (isCommitValveEnabled()) {
+      unregisterCommitSessionValve();
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheLoader.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheLoader.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheLoader.java
new file mode 100644
index 0000000..a4afad4
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheLoader.java
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.callback;
+
+import com.gemstone.gemfire.cache.CacheLoader;
+import com.gemstone.gemfire.cache.CacheLoaderException;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.LoaderHelper;
+import com.gemstone.gemfire.cache.Region;
+
+import javax.servlet.http.HttpSession;
+import java.util.Properties;
+
+public class LocalSessionCacheLoader implements CacheLoader<String, HttpSession>, Declarable {
+
+  private final Region<String, HttpSession> backingRegion;
+
+  public LocalSessionCacheLoader(Region<String, HttpSession> backingRegion) {
+    this.backingRegion = backingRegion;
+  }
+
+  public HttpSession load(LoaderHelper<String, HttpSession> helper) throws CacheLoaderException {
+    return this.backingRegion.get(helper.getKey());
+  }
+
+  public void close() {
+  }
+
+  public void init(Properties p) {
+  }
+}


[25/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt
new file mode 100644
index 0000000..e60114d
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt
@@ -0,0 +1,1326 @@
+
+VMware vFabric GemFire HTTP Session Management Module 2.1.1
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> antlr-2.7.3
+   >>> backport-util-concurrent-java_5.0
+   >>> mx4j-2.0.1
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-modeler-2.0
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+SECTION 4: GNU Lesser General Public License, V2.1
+
+   >>> jgroups-2.10
+   >>> trove-1.1.b3
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> GNU Lesser General Public License, V2.1
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> antlr-2.7.3
+
+SOFTWARE RIGHTS
+
+ANTLR 1989-2004 Developed by Terence Parr
+Partially supported by University of San Francisco & jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
+parrt@cs.usfca.edu
+parrt@antlr.org
+
+
+>>> backport-util-concurrent-java_5.0
+
+License
+This software is released to the public domain, in the spirit of the original code written by Doug Lea. 
+The code can be used for any purpose, modified, and redistributed without acknowledgment. No 
+warranty is provided, either express or implied.
+
+
+>>> mx4j-2.0.1
+
+The MX4J License, Version 1.0
+
+Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+         1. Redistributions of source code must retain the above copyright
+            notice, this list of conditions and the following disclaimer.
+
+         2. Redistributions in binary form must reproduce the above copyright
+            notice, this list of conditions and the following disclaimer in
+            the documentation and/or other materials provided with the
+            distribution.
+
+         3. The end-user documentation included with the redistribution,
+            if any, must include the following acknowledgment:
+               "This product includes software developed by the
+                MX4J project (http://mx4j.sourceforge.net)."
+            Alternately, this acknowledgment may appear in the software itself,
+            if and wherever such third-party acknowledgments normally appear.
+
+         4. The name "MX4J" must not be used to endorse or promote
+            products derived from this software without prior written
+            permission.
+            For written permission, please contact
+            biorn_steedom [at] users [dot] sourceforge [dot] net
+
+         5. Products derived from this software may not be called "MX4J",
+            nor may "MX4J" appear in their name, without prior written
+            permission of Simone Bordet.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the MX4J project.  For more information on
+MX4J, please see
+the MX4J website.
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-modeler-2.0
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
+
+GNU Lesser General Public License, V2.1 is applicable to the following component(s).
+
+
+>>> jgroups-2.10
+
+This library 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 library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+>>> trove-1.1.b3
+
+The Trove library is licensed under the Lesser GNU Public License,
+which is included with the distribution in a file called LICENSE.txt.
+
+The PrimeFinder and HashFunctions classes in Trove are subject to the
+following license restrictions:
+
+Copyright (c) 1999 CERN - European Organization for Nuclear Research.
+
+Permission to use, copy, modify, distribute and sell this software and
+its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. CERN makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without expressed or implied warranty.
+
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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 library 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 library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[VFABRICGEMFIREHTTPSESSIONMANAGEMENTMODULE211GAKL051812]


[09/50] [abbrv] incubator-geode git commit: reverting a change from 91b4389

Posted by kl...@apache.org.
reverting a change from 91b4389

reenabling timestamp recording when heartbeats/messages are received
from other members


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6bfb8ce5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6bfb8ce5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6bfb8ce5

Branch: refs/heads/feature/GEODE-268
Commit: 6bfb8ce52d476ee6f40b44451d053b71443d821d
Parents: 4f50862
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Feb 5 16:15:09 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Feb 5 16:15:09 2016 -0800

----------------------------------------------------------------------
 .../internal/membership/gms/fd/GMSHealthMonitor.java           | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6bfb8ce5/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 44186ba..b20fe03 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -367,9 +367,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   public void contactedBy(InternalDistributedMember sender) {
     TimeStamp cTS = new TimeStamp(currentTimeStamp);
     cTS = memberTimeStamps.putIfAbsent(sender, cTS);
-//    if (cTS != null) {
-//      cTS.setTimeStamp(currentTimeStamp);
-//    }
+    if (cTS != null) {
+      cTS.setTimeStamp(currentTimeStamp);
+    }
     if (suspectedMemberInView.remove(sender) != null) {
       logger.info("No longer suspecting {}", sender);
     }


[20/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
new file mode 100644
index 0000000..7490fdd
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
@@ -0,0 +1,652 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.filter;
+
+import com.gemstone.gemfire.modules.session.internal.filter.GemfireHttpSession;
+import com.gemstone.gemfire.modules.session.internal.filter.GemfireSessionManager;
+import com.gemstone.gemfire.modules.session.internal.filter.SessionManager;
+import com.gemstone.gemfire.modules.session.internal.filter.util.ThreadLocalSession;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.security.Principal;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Primary class which orchestrates everything. This is the class which gets
+ * configured in the web.xml.
+ */
+public class SessionCachingFilter implements Filter {
+
+  /**
+   * Logger instance
+   */
+  private static final Logger LOG =
+      LoggerFactory.getLogger(SessionCachingFilter.class.getName());
+
+  /**
+   * The filter configuration object we are associated with.  If this value is
+   * null, this filter instance is not currently configured.
+   */
+  private FilterConfig filterConfig = null;
+
+  /**
+   * Some containers will want to instantiate multiple instances of this filter,
+   * but we only need one SessionManager
+   */
+  private static SessionManager manager = null;
+
+  /**
+   * Can be overridden during testing.
+   */
+  private static AtomicInteger started =
+      new AtomicInteger(
+          Integer.getInteger("gemfire.override.session.manager.count", 1));
+
+  private static int percentInactiveTimeTriggerRebuild =
+      Integer.getInteger("gemfire.session.inactive.trigger.rebuild", 80);
+
+  /**
+   * This latch ensures that at least one thread/instance has fired up the
+   * session manager before any other threads complete the init method.
+   */
+  private static CountDownLatch startingLatch = new CountDownLatch(1);
+
+  /**
+   * This request wrapper class extends the support class
+   * HttpServletRequestWrapper, which implements all the methods in the
+   * HttpServletRequest interface, as delegations to the wrapped request. You
+   * only need to override the methods that you need to change. You can get
+   * access to the wrapped request using the method getRequest()
+   */
+  public static class RequestWrapper extends HttpServletRequestWrapper {
+
+    private static final String URL_SESSION_IDENTIFIER = ";jsessionid=";
+
+    private ResponseWrapper response;
+
+    private boolean sessionFromCookie = false;
+
+    private boolean sessionFromURL = false;
+
+    private String requestedSessionId = null;
+
+    private GemfireHttpSession session = null;
+
+    private SessionManager manager;
+
+    private HttpServletRequest outerRequest = null;
+
+    /**
+     * Need to save this in case we need the original {@code RequestDispatcher}
+     */
+    private HttpServletRequest originalRequest;
+
+    public RequestWrapper(SessionManager manager,
+        HttpServletRequest request,
+        ResponseWrapper response) {
+
+      super(request);
+      this.response = response;
+      this.manager = manager;
+      this.originalRequest = request;
+
+      final Cookie[] cookies = request.getCookies();
+      if (cookies != null) {
+        for (final Cookie cookie : cookies) {
+          if (cookie.getName().equalsIgnoreCase(
+              manager.getSessionCookieName()) &&
+              cookie.getValue().endsWith("-GF")) {
+            requestedSessionId = cookie.getValue();
+            sessionFromCookie = true;
+
+            LOG.debug("Cookie contains sessionId: {}",
+                requestedSessionId);
+          }
+        }
+      }
+
+      if (requestedSessionId == null) {
+        requestedSessionId = extractSessionId();
+        LOG.debug("Extracted sessionId from URL {}", requestedSessionId);
+        if (requestedSessionId != null) {
+          sessionFromURL = true;
+        }
+      }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public HttpSession getSession() {
+      return getSession(true);
+    }
+
+    /**
+     * Create our own sessions. TODO: Handle invalidated sessions
+     *
+     * @return a HttpSession
+     */
+    @Override
+    public HttpSession getSession(boolean create) {
+      if (session != null && session.isValid()) {
+        session.setIsNew(false);
+        session.updateAccessTime();
+                /*
+                 * This is a massively gross hack. Currently, there is no way
+                 * to actually update the last accessed time for a session, so
+                 * what we do here is once we're into X% of the session's TTL
+                 * we grab a new session from the container.
+                 *
+                 * (inactive * 1000) * (pct / 100) ==> (inactive * 10 * pct)
+                 */
+        if (session.getLastAccessedTime() - session.getCreationTime() >
+            (session.getMaxInactiveInterval() * 10 * percentInactiveTimeTriggerRebuild)) {
+          HttpSession nativeSession = super.getSession();
+          session.failoverSession(nativeSession);
+        }
+        return session;
+      }
+
+      if (requestedSessionId != null) {
+        session = (GemfireHttpSession) manager.getSession(
+            requestedSessionId);
+        if (session != null) {
+          session.setIsNew(false);
+          // This means we've failed over to another node
+          if (session.getNativeSession() == null) {
+            try {
+              ThreadLocalSession.set(session);
+              HttpSession nativeSession = super.getSession();
+              session.failoverSession(nativeSession);
+              session.putInRegion();
+            } finally {
+              ThreadLocalSession.remove();
+            }
+          }
+        }
+      }
+
+      if (session == null || !session.isValid()) {
+        if (create) {
+          try {
+            session = (GemfireHttpSession) manager.wrapSession(null);
+            ThreadLocalSession.set(session);
+            HttpSession nativeSession = super.getSession();
+            if (session.getNativeSession() == null) {
+              session.setNativeSession(nativeSession);
+            } else {
+              assert (session.getNativeSession() == nativeSession);
+            }
+            session.setIsNew(true);
+            manager.putSession(session);
+          } finally {
+            ThreadLocalSession.remove();
+          }
+        } else {
+          // create is false, and session is either null or not valid.
+          // The spec says return a null:
+          return null;
+        }
+      }
+
+      if (session != null) {
+        addSessionCookie(response);
+        session.updateAccessTime();
+      }
+
+      return session;
+    }
+
+    private void addSessionCookie(HttpServletResponse response) {
+      // Don't bother if the response is already committed
+      if (response.isCommitted()) {
+        return;
+      }
+
+      // Get the existing cookies
+      Cookie[] cookies = getCookies();
+
+      Cookie cookie = new Cookie(manager.getSessionCookieName(),
+          session.getId());
+      cookie.setPath("".equals(getContextPath()) ? "/" : getContextPath());
+      // Clear out all old cookies and just set ours
+      response.addCookie(cookie);
+
+      // Replace all other cookies which aren't JSESSIONIDs
+      if (cookies != null) {
+        for (Cookie c : cookies) {
+          if (manager.getSessionCookieName().equals(c.getName())) {
+            continue;
+          }
+          response.addCookie(c);
+        }
+      }
+
+    }
+
+    private String getCookieString(Cookie c) {
+      StringBuilder cookie = new StringBuilder();
+      cookie.append(c.getName()).append("=").append(c.getValue());
+
+      if (c.getPath() != null) {
+        cookie.append("; ").append("Path=").append(c.getPath());
+      }
+      if (c.getDomain() != null) {
+        cookie.append("; ").append("Domain=").append(c.getDomain());
+      }
+      if (c.getSecure()) {
+        cookie.append("; ").append("Secure");
+      }
+
+      cookie.append("; HttpOnly");
+
+      return cookie.toString();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isRequestedSessionIdFromCookie() {
+      return sessionFromCookie;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isRequestedSessionIdFromURL() {
+      return sessionFromURL;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getRequestedSessionId() {
+      if (requestedSessionId != null) {
+        return requestedSessionId;
+      } else {
+        return super.getRequestedSessionId();
+      }
+    }
+
+        /*
+         * Hmmm... not sure if this is right or even good to do. So, in some
+         * cases - for ex. using a Spring security filter, we have 3 possible
+         * wrappers to deal with - the original, this one and one created by
+         * Spring. When a servlet or JSP is forwarded to the original request
+         * is passed in, but then this (the wrapped) request is used by the JSP.
+         * In some cases, the outer wrapper also contains information relevant
+         * to the request - in this case security info. So here we allow access
+         * to that. There's probably a better way....
+         */
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Principal getUserPrincipal() {
+      if (outerRequest != null) {
+        return outerRequest.getUserPrincipal();
+      } else {
+        return super.getUserPrincipal();
+      }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getRemoteUser() {
+      if (outerRequest != null) {
+        return outerRequest.getRemoteUser();
+      } else {
+        return super.getRemoteUser();
+      }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isUserInRole(String role) {
+      if (outerRequest != null) {
+        return outerRequest.isUserInRole(role);
+      } else {
+        return super.isUserInRole(role);
+      }
+    }
+
+    //////////////////////////////////////////////////////////////
+    // Non-API methods
+
+    void setOuterWrapper(HttpServletRequest outer) {
+      this.outerRequest = outer;
+    }
+
+    //////////////////////////////////////////////////////////////
+    // Private methods
+    private String extractSessionId() {
+      final int prefix = getRequestURL().indexOf(URL_SESSION_IDENTIFIER);
+      if (prefix != -1) {
+        final int start = prefix + URL_SESSION_IDENTIFIER.length();
+        int suffix = getRequestURL().indexOf("?", start);
+        if (suffix < 0) {
+          suffix = getRequestURL().indexOf("#", start);
+        }
+        if (suffix <= prefix) {
+          return getRequestURL().substring(start);
+        }
+        return getRequestURL().substring(start, suffix);
+      }
+      return null;
+    }
+  }
+
+  /**
+   * This response wrapper class extends the support class
+   * HttpServletResponseWrapper, which implements all the methods in the
+   * HttpServletResponse interface, as delegations to the wrapped response. You
+   * only need to override the methods that you need to change. You can get
+   * access to the wrapped response using the method getResponse()
+   */
+  class ResponseWrapper extends HttpServletResponseWrapper {
+
+    HttpServletResponse originalResponse;
+
+    public ResponseWrapper(HttpServletResponse response) throws IOException {
+      super(response);
+      originalResponse = response;
+    }
+
+    public HttpServletResponse getOriginalResponse() {
+      return originalResponse;
+    }
+
+    @Override
+    public void setHeader(String name, String value) {
+      super.setHeader(name, value);
+    }
+
+    @Override
+    public void setIntHeader(String name, int value) {
+      super.setIntHeader(name, value);
+    }
+  }
+
+
+  public SessionCachingFilter() {
+  }
+
+  /**
+   * @param request  The servlet request we are processing
+   * @param response The servlet response we are creating
+   * @param chain    The filter chain we are processing
+   * @throws IOException      if an input/output error occurs
+   * @throws ServletException if a servlet error occurs
+   */
+  @Override
+  public void doFilter(ServletRequest request, ServletResponse response,
+      FilterChain chain)
+      throws IOException, ServletException {
+
+    HttpServletRequest httpReq = (HttpServletRequest) request;
+    HttpServletResponse httpResp = (HttpServletResponse) response;
+
+    /**
+     * Early out if this isn't the right kind of request. We might see a
+     * RequestWrapper instance during a forward or include request.
+     */
+    if (request instanceof RequestWrapper ||
+        !(request instanceof HttpServletRequest)) {
+      LOG.debug("Handling already-wrapped request");
+      chain.doFilter(request, response);
+      return;
+    }
+
+    // Create wrappers for the request and response objects.
+    // Using these, you can extend the capabilities of the
+    // request and response, for example, allow setting parameters
+    // on the request before sending the request to the rest of the filter chain,
+    // or keep track of the cookies that are set on the response.
+    //
+    // Caveat: some servers do not handle wrappers very well for forward or
+    // include requests.
+
+    ResponseWrapper wrappedResponse = new ResponseWrapper(httpResp);
+    final RequestWrapper wrappedRequest =
+        new RequestWrapper(manager, httpReq, wrappedResponse);
+
+    Throwable problem = null;
+
+    try {
+      chain.doFilter(wrappedRequest, wrappedResponse);
+    } catch (Throwable t) {
+      // If an exception is thrown somewhere down the filter chain,
+      // we still want to execute our after processing, and then
+      // rethrow the problem after that.
+      problem = t;
+      LOG.error("Exception processing filter chain", t);
+    }
+
+    GemfireHttpSession session =
+        (GemfireHttpSession) wrappedRequest.getSession(false);
+
+    // If there was a problem, we want to rethrow it if it is
+    // a known type, otherwise log it.
+    if (problem != null) {
+      if (problem instanceof ServletException) {
+        throw (ServletException) problem;
+      }
+      if (problem instanceof IOException) {
+        throw (IOException) problem;
+      }
+      sendProcessingError(problem, response);
+    }
+
+    /**
+     * Commit any updates. What actually happens at that point is
+     * dependent on the type of attributes defined for use by the sessions.
+     */
+    if (session != null) {
+      session.commit();
+    }
+  }
+
+  /**
+   * Return the filter configuration object for this filter.
+   */
+  public FilterConfig getFilterConfig() {
+    return (this.filterConfig);
+  }
+
+  /**
+   * Set the filter configuration object for this filter.
+   *
+   * @param filterConfig The filter configuration object
+   */
+  public void setFilterConfig(FilterConfig filterConfig) {
+    this.filterConfig = filterConfig;
+  }
+
+  /**
+   * Destroy method for this filter
+   */
+  @Override
+  public void destroy() {
+    if (manager != null) {
+      manager.stop();
+    }
+  }
+
+  /**
+   * This is where all the initialization happens.
+   *
+   * @param config
+   * @throws ServletException
+   */
+  @Override
+  public void init(final FilterConfig config) {
+    LOG.info("Starting Session Filter initialization");
+    this.filterConfig = config;
+
+    if (started.getAndDecrement() > 0) {
+      /**
+       * Allow override for testing purposes
+       */
+      String managerClassStr =
+          config.getInitParameter("session-manager-class");
+
+      // Otherwise default
+      if (managerClassStr == null) {
+        managerClassStr = GemfireSessionManager.class.getName();
+      }
+
+      try {
+        manager = (SessionManager) Class.forName(
+            managerClassStr).newInstance();
+        manager.start(config, this.getClass().getClassLoader());
+      } catch (Exception ex) {
+        LOG.error("Exception creating Session Manager", ex);
+      }
+
+      startingLatch.countDown();
+    } else {
+      try {
+        startingLatch.await();
+      } catch (InterruptedException iex) {
+      }
+
+      LOG.debug("SessionManager and listener initialization skipped - "
+          + "already done.");
+    }
+
+    LOG.info("Session Filter initialization complete");
+    LOG.debug("Filter class loader {}", this.getClass().getClassLoader());
+  }
+
+  /**
+   * Return a String representation of this object.
+   */
+  @Override
+  public String toString() {
+    if (filterConfig == null) {
+      return ("SessionCachingFilter()");
+    }
+    StringBuilder sb = new StringBuilder("SessionCachingFilter(");
+    sb.append(filterConfig);
+    sb.append(")");
+    return (sb.toString());
+
+  }
+
+
+  private void sendProcessingError(Throwable t, ServletResponse response) {
+    String stackTrace = getStackTrace(t);
+
+    if (stackTrace != null && !stackTrace.equals("")) {
+      try {
+        response.setContentType("text/html");
+        PrintStream ps = new PrintStream(response.getOutputStream());
+        PrintWriter pw = new PrintWriter(ps);
+        pw.print(
+            "<html>\n<head>\n<title>Error</title>\n</head>\n<body>\n"); //NOI18N
+
+        // PENDING! Localize this for next official release
+        pw.print("<h1>The resource did not process correctly</h1>\n<pre>\n");
+        pw.print(stackTrace);
+        pw.print("</pre></body>\n</html>"); //NOI18N
+        pw.close();
+        ps.close();
+        response.getOutputStream().close();
+      } catch (Exception ex) {
+      }
+    } else {
+      try {
+        PrintStream ps = new PrintStream(response.getOutputStream());
+        t.printStackTrace(ps);
+        ps.close();
+        response.getOutputStream().close();
+      } catch (Exception ex) {
+      }
+    }
+  }
+
+  public static String getStackTrace(Throwable t) {
+    String stackTrace = null;
+    try {
+      StringWriter sw = new StringWriter();
+      PrintWriter pw = new PrintWriter(sw);
+      t.printStackTrace(pw);
+      pw.close();
+      sw.close();
+      stackTrace = sw.getBuffer().toString();
+    } catch (Exception ex) {
+    }
+    return stackTrace;
+  }
+
+  /**
+   * Retrieve the SessionManager. This is only here so that tests can get access
+   * to the cache.
+   */
+  public static SessionManager getSessionManager() {
+    return manager;
+  }
+
+  /**
+   * Return the GemFire session which wraps a native session
+   *
+   * @param nativeSession the native session for which the corresponding GemFire
+   *                      session should be returned.
+   * @return the GemFire session or null if no session maps to the native
+   * session
+   */
+  public static HttpSession getWrappingSession(HttpSession nativeSession) {
+        /*
+         * This is a special case where the GemFire session has been set as a
+         * ThreadLocal during session creation.
+         */
+    GemfireHttpSession gemfireSession = (GemfireHttpSession) ThreadLocalSession.get();
+    if (gemfireSession != null) {
+      gemfireSession.setNativeSession(nativeSession);
+      return gemfireSession;
+    }
+    return getSessionManager().getWrappingSession(nativeSession.getId());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionListener.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionListener.java
new file mode 100644
index 0000000..7973bc5
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionListener.java
@@ -0,0 +1,51 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.filter;
+
+import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+public class SessionListener implements HttpSessionListener {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(SessionListener.class.getName());
+
+  public void sessionCreated(HttpSessionEvent httpSessionEvent) {
+  }
+
+  /**
+   * This will receive events from the container using the native sessions.
+   */
+  public void sessionDestroyed(HttpSessionEvent event) {
+    String nativeId = event.getSession().getId();
+    try {
+      String sessionId = SessionCachingFilter.getSessionManager().destroyNativeSession(
+          nativeId);
+      LOG.debug(
+          "Received sessionDestroyed event for native session {} (wrapped by {})",
+          nativeId, sessionId);
+    } catch (DistributedSystemDisconnectedException dex) {
+      LOG.debug("Cache disconnected - unable to destroy native session {0}",
+          nativeId);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/Installer.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/Installer.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/Installer.java
new file mode 100644
index 0000000..7ba5b34
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/Installer.java
@@ -0,0 +1,296 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer;
+
+import com.gemstone.gemfire.modules.session.installer.args.Argument;
+import com.gemstone.gemfire.modules.session.installer.args.ArgumentProcessor;
+import com.gemstone.gemfire.modules.session.installer.args.ArgumentValues;
+import com.gemstone.gemfire.modules.session.installer.args.UnknownArgumentHandler;
+import com.gemstone.gemfire.modules.session.installer.args.UsageException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ *
+ */
+public class Installer {
+
+  private static final String GEMFIRE_FILTER_CLASS =
+      "com.gemstone.gemfire.modules.session.filter.SessionCachingFilter";
+
+  private static final String GEMFIRE_LISTENER_CLASS =
+      "com.gemstone.gemfire.modules.session.filter.SessionListener";
+
+  private ArgumentValues argValues;
+
+  private static final Argument ARG_HELP =
+      new Argument("-h", false).
+          setDescription("Displays this help message.");
+
+  private static Argument ARG_GEMFIRE_PARAMETERS =
+      new Argument("-p", false, "param=value").
+          setDescription("Specific parameter for inclusion into the "
+              + "session filter definition as a regular "
+              + "init-param. Can be given multiple times.");
+
+  private static Argument ARG_CACHE_TYPE =
+      new Argument("-t", false, "cache-type").
+          setDescription(
+              "Type of cache. Must be one of 'peer-to-peer' or "
+                  + "'client-server'. Default is peer-to-peer.").
+          setDefaults("peer-to-peer");
+
+  private static Argument ARG_WEB_XML_FILE =
+      new Argument("-w", true, "web.xml file").
+          setDescription("The web.xml file to be modified.");
+
+
+  /**
+   * Class main method
+   *
+   * @param args Arguments passed in via the command line
+   * @throws Exception in the event of any errors
+   */
+  public static void main(final String[] args) throws Exception {
+    new Installer(args).process();
+  }
+
+  public static void log(String message) {
+    System.err.println(message);
+  }
+
+
+  public Installer(String[] args) throws Exception {
+    final ArgumentProcessor processor = new ArgumentProcessor("Installer");
+
+    argValues = null;
+    try {
+      // These are ordered so as to keep the options alphabetical
+      processor.addArgument(ARG_HELP);
+      processor.addArgument(ARG_GEMFIRE_PARAMETERS);
+      processor.addArgument(ARG_CACHE_TYPE);
+      processor.addArgument(ARG_WEB_XML_FILE);
+
+      processor.setUnknownArgumentHandler(new UnknownArgumentHandler() {
+        @Override
+        public void handleUnknownArgument(
+            final String form, final String[] params) {
+          log("Unknown argument being ignored: "
+              + form + " (" + params.length + " params)");
+          log("Use '-h' argument to display usage");
+        }
+      });
+      argValues = processor.process(args);
+
+      if (argValues.isDefined(ARG_HELP)) {
+        final UsageException usageException =
+            new UsageException("Usage requested by user");
+        usageException.setUsage(processor.getUsage());
+        throw (usageException);
+      }
+
+    } catch (UsageException ux) {
+      final StringBuilder error = new StringBuilder();
+      error.append("\nERROR: ");
+      error.append(ux.getMessage());
+      error.append("\n");
+      if (ux.getUsage() != null) {
+        error.append(ux.getUsage());
+      }
+      log(error.toString());
+      System.exit(2);
+    }
+
+  }
+
+
+  /**
+   * The main entry point for processing
+   *
+   * @throws Exception if any errors occur.
+   */
+  public void process() throws Exception {
+    String argInputFile = argValues.getFirstResult(ARG_WEB_XML_FILE);
+
+    ByteArrayOutputStream output = new ByteArrayOutputStream();
+    InputStream input = new FileInputStream(argInputFile);
+
+    processWebXml(input, output);
+    input.close();
+
+    System.out.println(output.toString());
+  }
+
+
+  private void processWebXml(final InputStream webXml,
+      final OutputStream out) throws Exception {
+
+    Document doc = createWebXmlDoc(webXml);
+    mangleWebXml(doc);
+
+    streamXML(doc, out);
+  }
+
+
+  private Document createWebXmlDoc(final InputStream webXml)
+      throws Exception {
+    Document doc;
+    final DocumentBuilderFactory factory =
+        DocumentBuilderFactory.newInstance();
+    final DocumentBuilder builder = factory.newDocumentBuilder();
+    doc = builder.parse(webXml);
+
+    return doc;
+  }
+
+
+  private Document mangleWebXml(final Document doc) {
+    final Element docElement = doc.getDocumentElement();
+    final NodeList nodelist = docElement.getChildNodes();
+    Node firstFilter = null;
+    Node displayElement = null;
+    Node afterDisplayElement = null;
+
+    for (int i = 0; i < nodelist.getLength(); i++) {
+      final Node node = nodelist.item(i);
+      final String name = node.getNodeName();
+      if ("display-name".equals(name)) {
+        displayElement = node;
+      } else {
+        if ("filter".equals(name)) {
+          if (firstFilter == null) {
+            firstFilter = node;
+          }
+        }
+        if (displayElement != null && afterDisplayElement == null) {
+          afterDisplayElement = node;
+        }
+      }
+    }
+
+    Node initParam;
+    final Element filter = doc.createElement("filter");
+    append(doc, filter, "filter-name", "gemfire-session-filter");
+    append(doc, filter, "filter-class", GEMFIRE_FILTER_CLASS);
+
+    // Set the type of cache
+    initParam = append(doc, filter, "init-param", null);
+    append(doc, initParam, "param-name", "cache-type");
+    append(doc, initParam, "param-value",
+        argValues.getFirstResult(ARG_CACHE_TYPE));
+
+
+    if (argValues.isDefined(ARG_GEMFIRE_PARAMETERS)) {
+      for (String[] val : argValues.getAllResults(ARG_GEMFIRE_PARAMETERS)) {
+        String gfParam = val[0];
+        int idx = gfParam.indexOf("=");
+        initParam = append(doc, filter, "init-param", null);
+        append(doc, initParam, "param-name", gfParam.substring(0, idx));
+        append(doc, initParam, "param-value", gfParam.substring(idx + 1));
+      }
+    }
+
+    Node first = firstFilter;
+    if (first == null) {
+      if (afterDisplayElement != null) {
+        first = afterDisplayElement;
+      }
+    }
+    if (first == null) {
+      first = docElement.getFirstChild();
+    }
+    docElement.insertBefore(filter, first);
+    final Element filterMapping = doc.createElement("filter-mapping");
+    append(doc, filterMapping, "filter-name", "gemfire-session-filter");
+    append(doc, filterMapping, "url-pattern", "/*");
+    append(doc, filterMapping, "dispatcher", "FORWARD");
+    append(doc, filterMapping, "dispatcher", "INCLUDE");
+    append(doc, filterMapping, "dispatcher", "REQUEST");
+    append(doc, filterMapping, "dispatcher", "ERROR");
+    final Element contextListener = doc.createElement("listener");
+    append(doc, contextListener, "listener-class", GEMFIRE_LISTENER_CLASS);
+    docElement.insertBefore(filterMapping, after(docElement, "filter"));
+    docElement.insertBefore(contextListener,
+        after(docElement, "filter-mapping"));
+    return doc;
+  }
+
+  private Node after(final Node parent, final String nodeName) {
+    final NodeList nodelist = parent.getChildNodes();
+    int index = -1;
+    for (int i = 0; i < nodelist.getLength(); i++) {
+      final Node node = nodelist.item(i);
+      final String name = node.getNodeName();
+      if (nodeName.equals(name)) {
+        index = i;
+      }
+    }
+    if (index == -1)
+      return null;
+    if (nodelist.getLength() > (index + 1)) {
+      return nodelist.item(index + 1);
+    }
+    return null;
+  }
+
+  private Node append(final Document doc, final Node parent,
+      final String element,
+      final String value) {
+    final Element child = doc.createElement(element);
+    if (value != null)
+      child.setTextContent(value);
+    parent.appendChild(child);
+    return child;
+  }
+
+  private void streamXML(final Document doc, final OutputStream out) {
+    try {// Use a Transformer for output
+      final TransformerFactory tFactory = TransformerFactory.newInstance();
+      final Transformer transformer = tFactory.newTransformer();
+      if (doc.getDoctype() != null) {
+        final String systemId = doc.getDoctype().getSystemId();
+        final String publicId = doc.getDoctype().getPublicId();
+        transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, publicId);
+        transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, systemId);
+      }
+      transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+      transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount",
+          "4");
+      final DOMSource source = new DOMSource(doc);
+      final StreamResult result = new StreamResult(out);
+      transformer.transform(source, result);
+    } catch (final Exception e) {
+      e.printStackTrace();
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/JarClassLoader.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/JarClassLoader.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/JarClassLoader.java
new file mode 100644
index 0000000..ba528ce
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/JarClassLoader.java
@@ -0,0 +1,123 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Enumeration;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+/**
+ * Classloader, which allows finding classes in jars  within jars. This is used to check
+ * whether a listener, as found in web.xml, is a ServletContextListener
+ */
+public class JarClassLoader extends URLClassLoader {
+
+  public JarClassLoader(URL[] urls, ClassLoader parent) {
+    super(urls, parent);
+
+    try {
+      for (URL url : urls) {
+        if (isJar(url.getFile())) {
+          addJarResource(new File(url.getPath()));
+        }
+      }
+    } catch (IOException e) {
+      e.printStackTrace();
+    }
+  }
+
+  private void addJarResource(File file) throws IOException {
+    JarFile jarFile = new JarFile(file);
+    addURL(file.toURL());
+    Enumeration<JarEntry> jarEntries = jarFile.entries();
+    while (jarEntries.hasMoreElements()) {
+      JarEntry jarEntry = jarEntries.nextElement();
+      if (!jarEntry.isDirectory() && isJar(jarEntry.getName())) {
+        addJarResource(jarEntryAsFile(jarFile, jarEntry));
+      }
+    }
+  }
+
+  @Override
+  protected synchronized Class<?> loadClass(String name, boolean resolve)
+      throws ClassNotFoundException {
+    try {
+      Class<?> clazz = findLoadedClass(name);
+      if (clazz == null) {
+        clazz = findClass(name);
+        if (resolve) {
+          resolveClass(clazz);
+        }
+      }
+      return clazz;
+    } catch (ClassNotFoundException e) {
+      return super.loadClass(name, resolve);
+    }
+  }
+
+  private static void close(Closeable closeable) {
+    if (closeable != null) {
+      try {
+        closeable.close();
+      } catch (IOException e) {
+        e.printStackTrace();
+      }
+    }
+  }
+
+  private static boolean isJar(String fileName) {
+    return fileName != null && (fileName.toLowerCase().endsWith(".jar") ||
+        fileName.toLowerCase().endsWith(".war") ||
+        fileName.toLowerCase().endsWith(".ear"));
+  }
+
+  private static File jarEntryAsFile(JarFile jarFile,
+      JarEntry jarEntry) throws IOException {
+    InputStream input = null;
+    OutputStream output = null;
+    try {
+      String name = jarEntry.getName().replace('/', '_');
+      int i = name.lastIndexOf(".");
+      String extension = i > -1 ? name.substring(i) : "";
+      File file = File.createTempFile(
+          name.substring(0, name.length() - extension.length()) + ".",
+          extension);
+      file.deleteOnExit();
+      input = jarFile.getInputStream(jarEntry);
+      output = new FileOutputStream(file);
+      int readCount;
+      byte[] buffer = new byte[4096];
+      while ((readCount = input.read(buffer)) != -1) {
+        output.write(buffer, 0, readCount);
+      }
+      return file;
+    } finally {
+      close(input);
+      close(output);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/Argument.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/Argument.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/Argument.java
new file mode 100644
index 0000000..1125c1b
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/Argument.java
@@ -0,0 +1,275 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Class representing a single command line argument.
+ */
+public class Argument {
+
+  /**
+   * Parameter names.
+   */
+  private final String[] paramNames;
+
+  /**
+   * Default values for the parameters when not explicitly set.
+   */
+  private String[] defaults;
+
+  /**
+   * Environment variable names forfor each parameter where values will be
+   * pulled in, if not explicitly provided and if the environment variable
+   * exists.
+   */
+  private String[] envVars;
+
+  /**
+   * Flag indicating whether this argument is required on the command line.
+   */
+  private final boolean required;
+
+  /**
+   * Handler used to hook into processing.
+   */
+  private ArgumentHandler handler;
+
+  /**
+   * List of all representation forms.
+   */
+  private final List<String> forms = new ArrayList<String>();
+
+  /**
+   * Usage description.
+   */
+  private String description;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Constructor:
+
+  /**
+   * Contructor to create an argument definition.
+   *
+   * @param primaryForm    the form of the argument (e.g., --foo).  Should start
+   *                       with a dash.
+   * @param argRequired    flag indicating whether or not the argument is
+   *                       required to be onthe command line
+   * @param parameterNames names of the parameters to this argument for use in
+   *                       the usage generation
+   */
+  public Argument(
+      final String primaryForm,
+      final boolean argRequired,
+      final String... parameterNames) {
+    forms.add(primaryForm);
+    paramNames = parameterNames;
+    required = argRequired;
+  }
+
+  /**
+   * Returns the number of parameters that this argument takes.
+   *
+   * @return parameter count
+   */
+  public int getParameterCount() {
+    return paramNames.length;
+  }
+
+  /**
+   * Returns the name of the parameter position requested.
+   *
+   * @param idx parameter index
+   * @return parameter name
+   */
+  public String getParameterName(final int idx) {
+    return paramNames[idx];
+  }
+
+  /**
+   * Returns whether or not this argument is required to be defined.
+   *
+   * @return true if required, false if optional
+   */
+  public boolean isRequired() {
+    return required;
+  }
+
+  /**
+   * Determines if the argument provisioning has been done via the environment.
+   */
+  public boolean isDefinedInEnv() {
+    if (envVars == null || paramNames.length == 0) {
+      return false;
+    }
+    for (String var : envVars) {
+      if (System.getenv(var) == null) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Sets the argument handler.
+   *
+   * @param aHandler argument handler
+   * @return this argument (for chained calls)
+   */
+  public Argument setArgumentHandler(final ArgumentHandler aHandler) {
+    handler = aHandler;
+    return this;
+  }
+
+  /**
+   * Returns the argument handler.
+   *
+   * @return argument handler
+   */
+  public ArgumentHandler getArgumentHandler() {
+    return handler;
+  }
+
+  /**
+   * Adds a possible representation of the command line argument.
+   *
+   * @param aliasName additional form to accept
+   * @return this argument (for chained calls)
+   */
+  public Argument addForm(final String aliasName) {
+    forms.add(aliasName);
+    return this;
+  }
+
+  /**
+   * Returns the primary form of the argument.
+   *
+   * @return primary form
+   */
+  public String getPrimaryForm() {
+    if (forms.isEmpty()) {
+      return null;
+    } else {
+      return forms.get(0);
+    }
+  }
+
+  /**
+   * Returns a list of all valid representations of this command line argument.
+   *
+   * @return list of all registered forms
+   */
+  public List<String> getForms() {
+    return forms;
+  }
+
+  /**
+   * Sets a usage description for this argument.
+   *
+   * @param str usage description
+   * @return this argument (for chained calls)
+   */
+  public Argument setDescription(final String str) {
+    description = str;
+    return this;
+  }
+
+  /**
+   * Returns a usage description of this argument.
+   *
+   * @return description
+   */
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Sets the default values when no explicit values were provided.
+   *
+   * @param newDefaults default values for all argument parameters
+   * @return this argument (for chained calls)
+   */
+  public Argument setDefaults(final String... newDefaults) {
+    if (newDefaults.length != paramNames.length) {
+      throw (new IllegalArgumentException(
+          "Defaults array length provided is not the correct size"));
+    }
+    defaults = newDefaults;
+    return this;
+  }
+
+  /**
+   * Returns the defaults.
+   *
+   * @return default parameter values
+   */
+  public String[] getDefaults() {
+    return defaults;
+  }
+
+  /**
+   * Sets the environment variables which will be checked for values before
+   * falling back on the default values.
+   *
+   * @param newEnvVars environment variable name array
+   * @return this argument (for chained calls)
+   */
+  public Argument setEnvVars(final String... newEnvVars) {
+    if (newEnvVars.length != paramNames.length) {
+      throw (new IllegalArgumentException(
+          "Environment variables array length provided is not "
+              + "the correct size"));
+    }
+    envVars = newEnvVars;
+    return this;
+  }
+
+  /**
+   * Returns the environment variable names for each parameter.
+   *
+   * @return environment variable names
+   */
+  public String[] getEnvVars() {
+    return envVars;
+  }
+
+  /**
+   * Returns a human readable form.
+   *
+   * @return human readable string
+   */
+  @Override
+  public String toString() {
+    final StringBuilder builder = new StringBuilder();
+    builder.append("[Argument '");
+    builder.append(forms.get(0));
+    builder.append("'");
+    if (paramNames.length > 0) {
+      for (int i = 0; i < paramNames.length; i++) {
+        builder.append(" <");
+        builder.append(paramNames[i]);
+        builder.append(">");
+      }
+    }
+    builder.append("]");
+    return builder.toString();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentHandler.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentHandler.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentHandler.java
new file mode 100644
index 0000000..97c8108
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentHandler.java
@@ -0,0 +1,38 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+/**
+ * Interface specifying the requirements for objects wiching to be able to
+ * examine arguments (potentially tweaking parameters) at the time of parsing,
+ * thereby allowing for usage display to occur automatically.
+ */
+public interface ArgumentHandler {
+
+  /**
+   * Process the argument values specified.
+   *
+   * @param arg    argument definition
+   * @param form   form which was used on the command line
+   * @param params parameters supplied to the argument
+   * @throws UsageException when usage was suboptimal
+   */
+  void handleArgument(Argument arg, String form, String[] params)
+      throws UsageException;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentProcessor.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentProcessor.java
new file mode 100644
index 0000000..04ecfab
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentProcessor.java
@@ -0,0 +1,397 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+
+/**
+ * This class is used to process command line arguments for Java programs in a
+ * flexible and powerful manner.
+ */
+public class ArgumentProcessor {
+  /**
+   * Logger.
+   */
+  private static final Logger LOG =
+      Logger.getLogger(ArgumentProcessor.class.getName());
+
+  /**
+   * Description line length.
+   */
+  private static final int LINE_LENGTH = 60;
+
+  /**
+   * Map containing all arguments defined, indexed by their unique IDs.
+   */
+  private final List<Argument> args = new ArrayList<Argument>();
+
+  /**
+   * Unknown argument handler.
+   */
+  private UnknownArgumentHandler handler;
+
+  /**
+   * Program name to display in usage.
+   */
+  private String programName;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Classes:
+
+  /**
+   * Structure used to represent an argument match.
+   */
+  private static class Match {
+    /**
+     * The argument which matched.
+     */
+    private final Argument arg;
+
+    /**
+     * The specific form which matched.
+     */
+    private final String form;
+
+    /**
+     * The parameters to the argument form.
+     */
+    private final String[] params;
+
+    /**
+     * Constructor.
+     *
+     * @param theArgument the argument which matched
+     * @param theForm     the form used
+     * @param theParams   the parameters supplied
+     */
+    public Match(
+        final Argument theArgument,
+        final String theForm, final String[] theParams) {
+      arg = theArgument;
+      form = theForm;
+      params = theParams;
+    }
+
+    /**
+     * Accessor.
+     *
+     * @return argument which matched
+     */
+    public Argument getArgument() {
+      return arg;
+    }
+
+    /**
+     * Accessor.
+     *
+     * @return form which was used
+     */
+    public String getForm() {
+      return form;
+    }
+
+    /**
+     * Accessor.
+     *
+     * @return parameters supplied
+     */
+    public String[] getParams() {
+      return params;
+    }
+  }
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Constructors:
+
+  /**
+   * Creates a new Argument processor instance for te program name given.
+   *
+   * @param progName program name used in usage
+   */
+  public ArgumentProcessor(final String progName) {
+    programName = progName;
+  }
+
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Public methods:
+
+  /**
+   * Adds a new argument.
+   *
+   * @param arg argument to add
+   */
+  public void addArgument(final Argument arg) {
+    args.add(arg);
+  }
+
+  /**
+   * Sets the handler to call when an unknown argument is encountered.
+   *
+   * @param aHandler unknown arg handler, or null to unset
+   */
+  public void setUnknownArgumentHandler(
+      final UnknownArgumentHandler aHandler) {
+    handler = aHandler;
+  }
+
+  /**
+   * Process the command line arguments provided.
+   *
+   * @param programArgs command line arguments supplied to program
+   * @return argument values parsed out of command line
+   * @throws UsageException when usge sucked
+   */
+  public ArgumentValues process(final String[] programArgs)
+      throws UsageException {
+    ArgumentHandler argHandler;
+    final ArgumentValues result = new ArgumentValues();
+    List<Argument> unmatched;
+    List<Match> matches;
+
+    // Find all argument matches and set postArgs
+    matches = checkMatches(programArgs, result);
+
+    // Find arguments which didnt match
+    unmatched = new ArrayList<Argument>();
+    unmatched.addAll(args);
+    for (Match match : matches) {
+      unmatched.remove(match.getArgument());
+    }
+
+    // Error on unmatched yet required args
+    for (Argument arg : unmatched) {
+      if (arg.isRequired() && !arg.isDefinedInEnv()) {
+        final UsageException usageException = new UsageException(
+            "Required argument not provided: " + arg);
+        usageException.setUsage(getUsage());
+        throw usageException;
+      }
+    }
+
+    // Handle the arguments
+    for (Match match : matches) {
+      final Argument arg = match.getArgument();
+      argHandler = arg.getArgumentHandler();
+      if (argHandler != null) {
+        argHandler.handleArgument(
+            arg, match.getForm(), match.getParams());
+      }
+      result.addResult(arg, match.getParams());
+    }
+
+    return result;
+  }
+
+
+  /**
+   * Generates command line usage text for display to user.
+   *
+   * @return usage to dusplay to user
+   */
+  public String getUsage() {
+    final StringBuilder builder = new StringBuilder();
+    List<String> descriptionLines;
+    final String blank20 = "                    ";
+
+    builder.append("\nUSAGE: ");
+    if (programName == null) {
+      builder.append("<program>");
+    } else {
+      builder.append(programName);
+    }
+    if (args.isEmpty()) {
+      builder.append("\nNo arguments supported.\n");
+    } else {
+      builder.append(" <args>\nWHERE <args>:\n\n");
+      for (Argument arg : args) {
+        for (String form : arg.getForms()) {
+          builder.append("    ");
+          builder.append(form);
+
+          for (int i = 0; i < arg.getParameterCount(); i++) {
+            builder.append(" <");
+            builder.append(arg.getParameterName(i));
+            builder.append(">");
+          }
+          builder.append("\n");
+        }
+
+        descriptionLines =
+            breakupString(arg.getDescription(), LINE_LENGTH);
+        if (descriptionLines.isEmpty()) {
+          builder.append(blank20);
+          builder.append("No argument description provided.");
+          builder.append("\n\n");
+        } else {
+          for (String line : descriptionLines) {
+            builder.append(blank20);
+            builder.append(line.trim());
+            builder.append("\n");
+          }
+          builder.append("\n");
+        }
+      }
+    }
+    builder.append("\n");
+
+    return builder.toString();
+  }
+
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Private methods:
+
+  /**
+   * Builds a listof all argument matches and sets the postArgs array.
+   *
+   * @param programArgs command line arguments to search through
+   * @param values      values object in which to store results
+   * @return list of matches
+   * @throws UsageException when there is EBKAC
+   */
+  private List<Match> checkMatches(
+      final String[] programArgs, final ArgumentValues values)
+      throws UsageException {
+    final List<Match> result = new ArrayList<Match>();
+    Match match;
+    String[] params;
+    String[] postArgs;
+    int idx = 0;
+    int idx2;
+
+    while (idx < programArgs.length) {
+      // Check for end-of-parameters arg
+      if ("--".equals(programArgs[idx])) {
+        if (++idx < programArgs.length) {
+          postArgs = new String[programArgs.length - idx];
+          System.arraycopy(programArgs, idx,
+              postArgs, 0, postArgs.length);
+          values.setPostArgs(postArgs);
+        }
+        // We're done processing args'
+        break;
+      }
+
+      // Determine parameter count
+      idx2 = idx;
+      while ((idx2 + 1) < programArgs.length
+          && programArgs[idx2 + 1].charAt(0) != '-') {
+        idx2++;
+      }
+
+      // Generate parameter array
+      params = new String[idx2 - idx];
+      System.arraycopy(programArgs, idx + 1, params, 0, params.length);
+
+      LOG.fine("Arg: " + programArgs[idx]);
+      LOG.fine("Params: " + params.length);
+
+      // Find first argument matches
+      match = null;
+      for (Argument arg : args) {
+        match = checkMatch(programArgs[idx], arg, params);
+        if (match != null) {
+          result.add(match);
+          LOG.fine("Match found: ");
+          LOG.fine("     ID: " + arg);
+          LOG.fine("   Form: " + match.getForm());
+          break;
+        }
+      }
+      if (match == null) {
+        if (handler == null) {
+          final UsageException usageException = new UsageException(
+              "Unknown argument: " + programArgs[idx]
+                  + " with " + params.length + " parameters.");
+          usageException.setUsage(getUsage());
+          throw (usageException);
+        } else {
+          handler.handleUnknownArgument(programArgs[idx], params);
+        }
+      }
+
+      idx += params.length + 1;
+    }
+
+    return result;
+  }
+
+  /**
+   * Checks to see if an rgument form matches the suppies parameter list.
+   *
+   * @param argName argument name
+   * @param arg     argument
+   * @param params  parameters supplied
+   * @return match object on match, null otherwise
+   */
+  private Match checkMatch(
+      final String argName, final Argument arg, final String[] params) {
+    // Look for a matching form
+    for (String form : arg.getForms()) {
+      if (
+          form.equals(argName)
+              && arg.getParameterCount() == params.length) {
+        return new Match(arg, form, params);
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * Breaks up a string into sub-strings, each with a length equal to or less
+   * than the max length specified.
+   *
+   * @param str       string to break up
+   * @param maxLength maximum line length to use
+   * @return broken up string
+   */
+  private List<String> breakupString(
+      final String str, final int maxLength) {
+    final List<String> result = new ArrayList<String>();
+    int startIdx = -1;
+    int lastIdx;
+    int idx;
+
+    if (str == null) {
+      return result;
+    }
+
+    do {
+      idx = startIdx;
+      do {
+        lastIdx = idx;
+        idx = str.indexOf(' ', lastIdx + 1);
+        LOG.fine("startIdx=" + startIdx + "  lastIdx=" + lastIdx
+            + "  idx=" + idx);
+        if (idx < 0) {
+          // Canot break line up any further
+          result.add(str.substring(startIdx + 1));
+          return result;
+        }
+      } while ((idx - startIdx) <= maxLength);
+
+      result.add(str.substring(startIdx + 1, lastIdx));
+      startIdx = lastIdx;
+    } while (true);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentValues.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentValues.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentValues.java
new file mode 100644
index 0000000..cd412da
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/ArgumentValues.java
@@ -0,0 +1,222 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Result object capturing the result of processing command line arguments.
+ */
+public class ArgumentValues {
+
+  /**
+   * Storage location for all arguments found after the "--" pseudo-arg.
+   */
+  private String[] postArgs = new String[]{};
+
+  /**
+   * Storage location for the command line argument values.
+   */
+  private final Map<Argument, List<String[]>> values =
+      new LinkedHashMap<Argument, List<String[]>>();
+
+  /**
+   * Constructor.
+   */
+  ArgumentValues() {
+    // Empty.
+  }
+
+  /**
+   * Sets the post-arguments found after the "--" pseudo-argument.
+   *
+   * @param newPostArgs arguments defined after the special "--" argument
+   */
+  void setPostArgs(final String[] newPostArgs) {
+    postArgs = newPostArgs;
+  }
+
+  /**
+   * After processing the command line arguments, this method may be used to
+   * return all arguments which were excluded from processing by their placement
+   * after the "<code>--</code>" psuedo-argument.
+   *
+   * @return all unprocess arguments
+   */
+  public String[] getPostArgs() {
+    return postArgs;
+  }
+
+  /**
+   * Sets the data values found for a specific argument.
+   *
+   * @param arg         argument
+   * @param paramValues parameter values for the argument
+   */
+  public void addResult(final Argument arg, final String[] paramValues) {
+    List<String[]> list = values.get(arg);
+    if (list == null) {
+      list = new ArrayList<String[]>();
+      list.add(paramValues);
+      values.put(arg, list);
+    } else {
+      list.add(paramValues);
+    }
+  }
+
+  /**
+   * Returns a list of all defined arguments.
+   *
+   * @return set of arguments
+   */
+  public Set<Argument> getDefinedArguments() {
+    return values.keySet();
+  }
+
+  /**
+   * Counts the number of arguments defined on the command line which are in the
+   * list provided.
+   *
+   * @param ofThese the arguments to search for, or null to count all supplied
+   *                arguments
+   * @return count of the defined arguments
+   */
+  public int getDefinedCount(Argument... ofThese) {
+    if (ofThese.length == 0) {
+      return values.keySet().size();
+    }
+
+    int count = 0;
+    for (Argument arg : values.keySet()) {
+      boolean found = false;
+      for (int i = 0; !found && i < ofThese.length; i++) {
+        if (ofThese[i].equals(arg)) {
+          count++;
+          found = true;
+        }
+      }
+    }
+    return count;
+  }
+
+  /**
+   * Returns whetheror not the command line argument was actually provided on
+   * the command line.
+   *
+   * @param arg argument to query
+   * @return true if the argument is defined by the command line, false
+   * otherwise
+   */
+  public boolean isDefined(final Argument arg) {
+    final List<String[]> result = values.get(arg);
+    return (result != null);
+  }
+
+  /**
+   * Returns all results for the specified argument.  If a command line option
+   * is specified more than once, this is the method to use to get all values.
+   *
+   * @param arg argument to query
+   * @return list of all parameter lists defined for this argument
+   */
+  public List<String[]> getAllResults(final Argument arg) {
+    List<String[]> result = values.get(arg);
+
+    if (result == null) {
+      final String[] envVars = arg.getEnvVars();
+      final String[] defaults = arg.getDefaults();
+      final String[] vals = new String[arg.getParameterCount()];
+      boolean found = defaults != null;
+
+      for (int i = 0; i < arg.getParameterCount(); i++) {
+        if (defaults != null) {
+          vals[i] = defaults[i];
+        }
+        if (envVars != null) {
+          String val = System.getenv(envVars[i]);
+          if (val != null) {
+            found = true;
+            vals[i] = val;
+          }
+        }
+      }
+
+      if (found) {
+        result = new ArrayList<String[]>();
+        result.add(vals);
+      }
+    }
+    return result;
+  }
+
+  /**
+   * Convenience method to retrieve the first instance of the command line
+   * argument's values.
+   *
+   * @param arg argument to query
+   * @return first parameter list defined for this argument
+   */
+  public String[] getResult(final Argument arg) {
+    final List<String[]> all = getAllResults(arg);
+    if (all == null) {
+      return null;
+    } else {
+      return all.get(0);
+    }
+  }
+
+  /**
+   * Convenience method to return the first value of the first instance of the
+   * command line argument values for the specified argument.
+   *
+   * @param arg argument to query
+   * @return first parameter of the first list of parameters supplied
+   */
+  public String getFirstResult(final Argument arg) {
+    final String[] all = getResult(arg);
+    if (all == null) {
+      return null;
+    } else {
+      return all[0];
+    }
+  }
+
+  /**
+   * Convenience method to return the result of getFirstResult method as an
+   * integer.
+   *
+   * @param arg            argument to query
+   * @param undefinedValue value to return when argument is not defined or is
+   *                       illegally defined
+   * @return value specified, or default value provided
+   */
+  public int getFirstResultAsInt(
+      final Argument arg, final int undefinedValue) {
+    final String value = getFirstResult(arg);
+    if (value == null) {
+      return undefinedValue;
+    } else {
+      return Integer.parseInt(value);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/URLArgumentHandler.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/URLArgumentHandler.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/URLArgumentHandler.java
new file mode 100644
index 0000000..bb4b53a
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/URLArgumentHandler.java
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Argument handler implementation which accepts file paths or URLs and
+ * normalizes the parameters to URLs.
+ */
+public class URLArgumentHandler implements ArgumentHandler {
+
+  /**
+   * Logger.
+   */
+  private static final Logger LOG =
+      Logger.getLogger(URLArgumentHandler.class.getName());
+
+  /**
+   * Ensure that the argument is either a file path or a properly formatted URL.
+   *  If it is a file path, convert to a URL.  If neither, throws a
+   * UsageException.
+   *
+   * @param arg        argument
+   * @param form       form used
+   * @param parameters parameters supplied
+   * @throws UsageException when file not found or not a workable URL
+   */
+  public void handleArgument(
+      final Argument arg,
+      final String form,
+      final String[] parameters)
+      throws UsageException {
+    final File file = new File(parameters[0]);
+    URL result = null;
+
+    if (file.exists()) {
+      try {
+        result = file.toURI().toURL();
+      } catch (MalformedURLException mux) {
+        LOG.log(Level.FINEST, "Caught Exception", mux);
+      }
+    }
+    if (result == null) {
+      try {
+        result = new URL(parameters[0]);
+      } catch (MalformedURLException mux) {
+        LOG.log(Level.FINEST, "Caught Exception", mux);
+      }
+    }
+    if (result == null) {
+      throw (new UsageException(
+          "Argument parameter value is not a valid file "
+              + "path or URL: " + arg));
+    }
+    parameters[0] = result.toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UnknownArgumentHandler.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UnknownArgumentHandler.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UnknownArgumentHandler.java
new file mode 100644
index 0000000..4d52f62
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UnknownArgumentHandler.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+/**
+ * Interface defining unknown argument handlers, given the opportunity to either
+ * ignore the issue or force the parameter to be dealt with.
+ */
+public interface UnknownArgumentHandler {
+
+  /**
+   * Called when an unknown argument is supplied.
+   *
+   * @param form   argument name used
+   * @param params parameters passed into it
+   * @throws UsageException when the user needs to fix it
+   */
+  void handleUnknownArgument(String form, String[] params)
+      throws UsageException;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UsageException.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UsageException.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UsageException.java
new file mode 100644
index 0000000..0879417
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/installer/args/UsageException.java
@@ -0,0 +1,89 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.installer.args;
+
+/**
+ * Invalid usage exception.
+ */
+public class UsageException extends Exception {
+
+  /**
+   * Serial format version.
+   */
+  private static final long serialVersionUID = 1L;
+
+  /**
+   * Stored usage message.
+   */
+  private String usage;
+
+  /**
+   * Creates a new UsageException.
+   */
+  public UsageException() {
+    super();
+  }
+
+  /**
+   * Creates a new UsageException.
+   *
+   * @param message description of exceptional condition
+   */
+  public UsageException(final String message) {
+    super(message);
+  }
+
+  /**
+   * Creates a new UsageException.
+   *
+   * @param message description of exceptional condition
+   * @param cause   provoking exception
+   */
+  public UsageException(final String message, final Throwable cause) {
+    super(message, cause);
+  }
+
+  /**
+   * Creates a new UsageException.
+   *
+   * @param cause provoking exception
+   */
+  public UsageException(final Throwable cause) {
+    super(cause);
+  }
+
+
+  /**
+   * Attaches a usage message to the exception for later consumption.
+   *
+   * @param usageText text to display to user to guide them to correct usage.
+   *                  This is generated and set by the <code>ArgsProcessor</code>.
+   */
+  public void setUsage(final String usageText) {
+    usage = usageText;
+  }
+
+  /**
+   * Returns the usage message previously set.
+   *
+   * @return message or null if not set.
+   */
+  public String getUsage() {
+    return usage;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/AbstractSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/AbstractSessionCache.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/AbstractSessionCache.java
new file mode 100644
index 0000000..965a97f
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/AbstractSessionCache.java
@@ -0,0 +1,102 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.common;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionStatistics;
+import com.gemstone.gemfire.modules.session.internal.filter.util.TypeAwareMap;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+
+import java.util.Map;
+import javax.servlet.http.HttpSession;
+
+public abstract class AbstractSessionCache implements SessionCache {
+
+  /**
+   * The sessionRegion is the <code>Region</code> that actually stores and
+   * replicates the <code>Session</code>s.
+   */
+  protected Region<String, HttpSession> sessionRegion;
+
+  /**
+   * The operatingRegion is the <code>Region</code> used to do HTTP operations.
+   * if local cache is enabled, then this will be the local <code>Region</code>;
+   * otherwise, it will be the session <code>Region</code>.
+   */
+  protected Region<String, HttpSession> operatingRegion;
+
+  protected Map<CacheProperty, Object> properties =
+      new TypeAwareMap<CacheProperty, Object>(CacheProperty.class);
+
+  protected DeltaSessionStatistics statistics;
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void stop() {
+    sessionRegion.close();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Region<String, HttpSession> getOperatingRegion() {
+    return this.operatingRegion;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Region<String, HttpSession> getSessionRegion() {
+    return this.sessionRegion;
+  }
+
+  protected void createStatistics() {
+    this.statistics =
+        new DeltaSessionStatistics(getCache().getDistributedSystem(),
+            (String) properties.get(CacheProperty.STATISTICS_NAME));
+  }
+
+  /**
+   * Build up a {@code RegionConfiguraton} object from parameters originally
+   * passed in as filter initialization parameters.
+   *
+   * @return a {@code RegionConfiguration} object
+   */
+  protected RegionConfiguration createRegionConfiguration() {
+    RegionConfiguration configuration = new RegionConfiguration();
+
+    configuration.setRegionName(
+        (String) properties.get(CacheProperty.REGION_NAME));
+    configuration.setRegionAttributesId(
+        (String) properties.get(CacheProperty.REGION_ATTRIBUTES_ID));
+
+    configuration.setEnableGatewayDeltaReplication(
+        (Boolean) properties.get(
+            CacheProperty.ENABLE_GATEWAY_DELTA_REPLICATION));
+    configuration.setEnableGatewayReplication(
+        (Boolean) properties.get(CacheProperty.ENABLE_GATEWAY_REPLICATION));
+    configuration.setEnableDebugListener(
+        (Boolean) properties.get(CacheProperty.ENABLE_DEBUG_LISTENER));
+
+    return configuration;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/CacheProperty.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/CacheProperty.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/CacheProperty.java
new file mode 100644
index 0000000..e26281e
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/CacheProperty.java
@@ -0,0 +1,65 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.common;
+
+/**
+ * Used to define cache properties
+ */
+public enum CacheProperty {
+
+  ENABLE_DEBUG_LISTENER(Boolean.class),
+
+  ENABLE_GATEWAY_REPLICATION(Boolean.class),
+
+  ENABLE_GATEWAY_DELTA_REPLICATION(Boolean.class),
+
+  ENABLE_LOCAL_CACHE(Boolean.class),
+
+  REGION_NAME(String.class),
+
+  REGION_ATTRIBUTES_ID(String.class),
+
+  STATISTICS_NAME(String.class),
+
+  /**
+   * This parameter can take the following values which match the respective
+   * attribute container classes
+   * <p/>
+   * delta_queued     : QueuedDeltaSessionAttributes delta_immediate  :
+   * DeltaSessionAttributes immediate        : ImmediateSessionAttributes queued
+   * : QueuedSessionAttributes
+   */
+  SESSION_DELTA_POLICY(String.class),
+
+  /**
+   * This parameter can take the following values:
+   * <p/>
+   * set (default) set_and_get
+   */
+  REPLICATION_TRIGGER(String.class);
+
+  Class clazz;
+
+  CacheProperty(Class clazz) {
+    this.clazz = clazz;
+  }
+
+  public Class getClazz() {
+    return clazz;
+  }
+}


[31/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt
deleted file mode 100755
index 6050b30..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt
+++ /dev/null
@@ -1,1325 +0,0 @@
-
-VMware vFabric GemFire HTTP Session Management Module 2.1.0.2
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software components (or portions thereof) that are distributed with
-this VMware software products.
-
-The VMware Product may also include other VMware components, which may contain additional open 
-source software packages. One or more such open_source_licenses.txt files may therefore 
-accompany this VMware Product. 
-
-The VMware product that includes this file does not necessarily use all the
-open source software components referred to below and may also only use
-portions of a given component.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in this
-document.  This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> antlr-2.7.3
-   >>> backport-util-concurrent-java_5.0
-   >>> mx4j-2.0.1
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Apache License, V2.0
-
-   >>> commons-modeler-2.0
-
-
-
-SECTION 3: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-SECTION 4: GNU Lesser General Public License, V2.1
-
-   >>> jgroups-2.10
-   >>> trove-1.1.b3
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Apache License, V2.0
-
-   >>> GNU Lesser General Public License, V2.1
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> antlr-2.7.3
-
-SOFTWARE RIGHTS
-
-ANTLR 1989-2004 Developed by Terence Parr
-Partially supported by University of San Francisco & jGuru.com
-
-We reserve no legal rights to the ANTLR--it is fully in the
-public domain. An individual or company may do whatever
-they wish with source code distributed with ANTLR or the
-code generated by ANTLR, including the incorporation of
-ANTLR, or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However,
-we do ask that credit is given to us for developing
-ANTLR. By "credit", we mean that if you use ANTLR or
-incorporate any source code into one of your programs
-(commercial product, research project, or otherwise) that
-you acknowledge this fact somewhere in the documentation,
-research report, etc... If you like ANTLR and have
-developed a nice tool with the output, please mention that
-you developed it using ANTLR. In addition, we ask that the
-headers remain intact in our source code. As long as these
-guidelines are kept, we expect to continue enhancing this
-system and expect to make other tools available as they are
-completed.
-
-The primary ANTLR guy:
-
-Terence Parr
-parrt@cs.usfca.edu
-parrt@antlr.org
-
-
->>> backport-util-concurrent-java_5.0
-
-License
-This software is released to the public domain, in the spirit of the original code written by Doug Lea. 
-The code can be used for any purpose, modified, and redistributed without acknowledgment. No 
-warranty is provided, either express or implied.
-
-
->>> mx4j-2.0.1
-
-The MX4J License, Version 1.0
-
-Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-         1. Redistributions of source code must retain the above copyright
-            notice, this list of conditions and the following disclaimer.
-
-         2. Redistributions in binary form must reproduce the above copyright
-            notice, this list of conditions and the following disclaimer in
-            the documentation and/or other materials provided with the
-            distribution.
-
-         3. The end-user documentation included with the redistribution,
-            if any, must include the following acknowledgment:
-               "This product includes software developed by the
-                MX4J project (http://mx4j.sourceforge.net)."
-            Alternately, this acknowledgment may appear in the software itself,
-            if and wherever such third-party acknowledgments normally appear.
-
-         4. The name "MX4J" must not be used to endorse or promote
-            products derived from this software without prior written
-            permission.
-            For written permission, please contact
-            biorn_steedom [at] users [dot] sourceforge [dot] net
-
-         5. Products derived from this software may not be called "MX4J",
-            nor may "MX4J" appear in their name, without prior written
-            permission of Simone Bordet.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the MX4J project.  For more information on
-MX4J, please see
-the MX4J website.
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Apache License, V2.0 ----------
-
-Apache License, V2.0 is applicable to the following component(s).
-
-
->>> commons-modeler-2.0
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
---------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
-
-GNU Lesser General Public License, V2.1 is applicable to the following component(s).
-
-
->>> jgroups-2.10
-
-This library 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 library 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 library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
->>> trove-1.1.b3
-
-The Trove library is licensed under the Lesser GNU Public License,
-which is included with the distribution in a file called LICENSE.txt.
-
-The PrimeFinder and HashFunctions classes in Trove are subject to the
-following license restrictions:
-
-Copyright (c) 1999 CERN - European Organization for Nuclear Research.
-
-Permission to use, copy, modify, distribute and sell this software and
-its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. CERN makes no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without expressed or implied warranty.
-
-
-
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Apache License, V2.0 -----------
-
-Apache License 
-
-Version 2.0, January 2004 
-http://www.apache.org/licenses/ 
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction,
-and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.  
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control
-with that entity. For the purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management
-of such entity, whether by contract or otherwise, or (ii) ownership
-of fifty percent (50%) or more of the outstanding shares, or (iii)
-beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.  
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media
-types.  
-
-"Work" shall mean the work of authorship, whether in Source or
-Object form, made available under the License, as indicated by a copyright
-notice that is included in or attached to the work (an example is provided
-in the Appendix below).  
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent,
-as a whole, an original work of authorship. For the purposes of this
-License, Derivative Works shall not include works that remain separable
-from, or merely link (or bind by name) to the interfaces of, the Work
-and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the
-original version of the Work and any modifications or additions to
-that Work or Derivative Works thereof, that is intentionally submitted
-to Licensor for inclusion in the Work by the copyright owner or by an
-individual or Legal Entity authorized to submit on behalf of the copyright
-owner. For the purposes of this definition, "submitted" means any form of
-electronic, verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems
-that are managed by, or on behalf of, the Licensor for the purpose of
-discussing and improving the Work, but excluding communication that is
-conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity
-on behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty-free, irrevocable copyright license to reproduce, prepare
-Derivative Works of, publicly display, publicly perform, sublicense, and
-distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty- free, irrevocable (except as stated in this section) patent
-license to make, have made, use, offer to sell, sell, import, and
-otherwise transfer the Work, where such license applies only to those
-patent claims licensable by such Contributor that are necessarily
-infringed by their Contribution(s) alone or by combination of
-their Contribution(s) with the Work to which such Contribution(s)
-was submitted. If You institute patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Work or a Contribution incorporated within the Work constitutes direct
-or contributory patent infringement, then any patent licenses granted
-to You under this License for that Work shall terminate as of the date
-such litigation is filed.
-
-4. Redistribution.
-You may reproduce and distribute copies of the Work or Derivative Works
-thereof in any medium, with or without modifications, and in Source or
-Object form, provided that You meet the following conditions:
-
-  a. You must give any other recipients of the Work or Derivative Works
-     a copy of this License; and
-
-  b. You must cause any modified files to carry prominent notices stating
-     that You changed the files; and
-
-  c. You must retain, in the Source form of any Derivative Works that
-     You distribute, all copyright, patent, trademark, and attribution
-     notices from the Source form of the Work, excluding those notices
-     that do not pertain to any part of the Derivative Works; and
-
-  d. If the Work includes a "NOTICE" text file as part of its
-     distribution, then any Derivative Works that You distribute must
-     include a readable copy of the attribution notices contained
-     within such NOTICE file, excluding those notices that do not
-     pertain to any part of the Derivative Works, in at least one of
-     the following places: within a NOTICE text file distributed as part
-     of the Derivative Works; within the Source form or documentation,
-     if provided along with the Derivative Works; or, within a display
-     generated by the Derivative Works, if and wherever such third-party
-     notices normally appear. The contents of the NOTICE file are for
-     informational purposes only and do not modify the License. You
-     may add Your own attribution notices within Derivative Works that
-     You distribute, alongside or as an addendum to the NOTICE text
-     from the Work, provided that such additional attribution notices
-     cannot be construed as modifying the License.  You may add Your own
-     copyright statement to Your modifications and may provide additional
-     or different license terms and conditions for use, reproduction, or
-     distribution of Your modifications, or for any such Derivative Works
-     as a whole, provided Your use, reproduction, and distribution of the
-     Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions.
-Unless You explicitly state otherwise, any Contribution intentionally
-submitted for inclusion in the Work by You to the Licensor shall be
-under the terms and conditions of this License, without any additional
-terms or conditions.  Notwithstanding the above, nothing herein shall
-supersede or modify the terms of any separate license agreement you may
-have executed with Licensor regarding such Contributions.
-
-6. Trademarks.
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-Unless required by applicable law or agreed to in writing, Licensor
-provides the Work (and each Contributor provides its Contributions) on
-an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-express or implied, including, without limitation, any warranties or
-conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
-A PARTICULAR PURPOSE. You are solely responsible for determining the
-appropriateness of using or redistributing the Work and assume any risks
-associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability.
-In no event and under no legal theory, whether in tort (including
-negligence), contract, or otherwise, unless required by applicable law
-(such as deliberate and grossly negligent acts) or agreed to in writing,
-shall any Contributor be liable to You for damages, including any direct,
-indirect, special, incidental, or consequential damages of any character
-arising as a result of this License or out of the use or inability to
-use the Work (including but not limited to damages for loss of goodwill,
-work stoppage, computer failure or malfunction, or any and all other
-commercial damages or losses), even if such Contributor has been advised
-of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-While redistributing the Work or Derivative Works thereof, You may
-choose to offer, and charge a fee for, acceptance of support, warranty,
-indemnity, or other liability obligations and/or rights consistent with
-this License. However, in accepting such obligations, You may act only
-on Your own behalf and on Your sole responsibility, not on behalf of
-any other Contributor, and only if You agree to indemnify, defend, and
-hold each Contributor harmless for any liability incurred by, or claims
-asserted against, such Contributor by reason of your accepting any such
-warranty or additional liability.
-
-END OF TERMS AND CONDITIONS 
-
-
-
---------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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 library 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 library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America. All such
-requests should clearly specify: OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium. This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively,
-the Source Files may accompany the VMware product.
-
-
-[VFABRICGEMFIREHTTPSESSIONMANAGEMENTMODULE21GAKR021412]


[26/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt
new file mode 100755
index 0000000..2809c07
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.txt
@@ -0,0 +1,1334 @@
+open_source_licenses.txt
+
+vFabric GemFire HTTP Session Management Module 2.0
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software packages (or portions thereof) that are distributed with
+this VMware Product.
+
+The VMware Product may also include other VMware components, which may
+contain additional open source software packages. One or more such
+open_source_licenses.txt files may therefore accompany this VMware Product.
+
+The VMware Product that includes this file does not necessarily use all the
+open source software packages referred to below and may also only use
+portions of a given package.
+
+===========================================================================
+TABLE OF CONTENTS
+===========================================================================
+
+The following is a listing of the open source components detailed in this
+document. This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> antlr-2.7.3
+   >>> backport-util-concurrent-java_5.0
+   >>> mx4j-2.0.1
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> blowfishj-2.14
+   >>> commons-modeler-2.0
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+SECTION 4: GNU Lesser General Public License, V2.1
+
+   >>> jgroups-2.10
+   >>> trove-1.1.b3
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> GNU Lesser General Public License, V2.1
+
+   >>> Common Development and Distribution License, V1.0
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> antlr-2.7.3
+
+SOFTWARE RIGHTS
+
+ANTLR 1989-2004 Developed by Terence Parr
+Partially supported by University of San Francisco & jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
+parrt@cs.usfca.edu
+parrt@antlr.org
+
+
+>>> backport-util-concurrent-java_5.0
+
+License
+This software is released to the public domain, in the spirit of the original code written by Doug Lea. The code can be used for any purpose, modified, and redistributed without acknowledgment. No warranty is provided, either express or implied.
+
+
+>>> mx4j-2.0.1
+
+The MX4J License, Version 1.0
+
+Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+         1. Redistributions of source code must retain the above copyright
+            notice, this list of conditions and the following disclaimer.
+
+         2. Redistributions in binary form must reproduce the above copyright
+            notice, this list of conditions and the following disclaimer in
+            the documentation and/or other materials provided with the
+            distribution.
+
+         3. The end-user documentation included with the redistribution,
+            if any, must include the following acknowledgment:
+               "This product includes software developed by the
+                MX4J project (http://mx4j.sourceforge.net)."
+            Alternately, this acknowledgment may appear in the software itself,
+            if and wherever such third-party acknowledgments normally appear.
+
+         4. The name "MX4J" must not be used to endorse or promote
+            products derived from this software without prior written
+            permission.
+            For written permission, please contact
+            biorn_steedom [at] users [dot] sourceforge [dot] net
+
+         5. Products derived from this software may not be called "MX4J",
+            nor may "MX4J" appear in their name, without prior written
+            permission of Simone Bordet.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the MX4J project.  For more information on
+MX4J, please see
+the MX4J website.
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 are applicable to the following component(s).
+
+
+>>> blowfishj-2.14
+
+Copyright 2004 Markus Hahn 
+
+Licensed under the Apache License, Version 2.0 (the "License"); 
+you may not use this file except in compliance with the License. 
+You may obtain a copy of the License at 
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons-modeler-2.0
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 are applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
+
+GNU Lesser General Public License, V2.1 are applicable to the following component(s).
+
+
+>>> jgroups-2.10
+
+This library 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 library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+>>> trove-1.1.b3
+
+The Trove library is licensed under the Lesser GNU Public License,
+which is included with the distribution in a file called LICENSE.txt.
+
+The PrimeFinder and HashFunctions classes in Trove are subject to the
+following license restrictions:
+
+Copyright (c) 1999 CERN - European Organization for Nuclear Research.
+
+Permission to use, copy, modify, distribute and sell this software and
+its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. CERN makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without expressed or implied warranty.
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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 library 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 library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America or email info@vmware.com.  All such
+requests should clearly specify:  OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium.  This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively, 
+the Source Files may accompany the VMware product.
+
+[GFEHTTP20KP082911]


[06/50] [abbrv] incubator-geode git commit: GEODE-841: ClientMembershipDUnitTest.testGetNotifiedClients failed

Posted by kl...@apache.org.
GEODE-841: ClientMembershipDUnitTest.testGetNotifiedClients failed

This test threw an exception when it received a client identifier with a
numeric IP address instead of a host name.  On the servers these IDs are
deserialized and a canonical host name is picked up from SocketCreator,
but this is accessing a static cache of host names that may have been
initialized during a test that turned of DNS name lookup altogether in
order to avoid network delays and possible hangs.

The fix is to just clear the cache between tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c4591fa1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c4591fa1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c4591fa1

Branch: refs/heads/feature/GEODE-268
Commit: c4591fa1cabed90edf045d9e24e6f4100a84d4a6
Parents: f3dd335
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Feb 5 12:18:07 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Feb 5 12:19:17 2016 -0800

----------------------------------------------------------------------
 .../distributed/internal/LonerDistributionManager.java    |  4 ++--
 .../internal/membership/InternalDistributedMember.java    |  2 +-
 .../java/com/gemstone/gemfire/internal/SocketCreator.java | 10 +++++++++-
 .../gemfire/internal/i18n/ParentLocalizedStrings.java     |  2 +-
 .../gemfire/cache30/ClientMembershipDUnitTest.java        |  9 ++++++++-
 .../gemstone/gemfire/internal/AvailablePortJUnitTest.java |  1 +
 .../gemstone/gemfire/test/dunit/DistributedTestCase.java  |  3 +--
 7 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
index b55fe88..419c096 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
@@ -842,10 +842,10 @@ public class LonerDistributionManager implements DM {
    * @param newPort the new port to use
    */
   public void updateLonerPort(int newPort) {
-    this.logger.config(LocalizedStrings.LonerDistributionmanager_CHANGING_PORT_FROM_TO,
-        new Object[]{this.lonerPort, newPort});
     this.lonerPort = newPort;
     this.getId().setPort(this.lonerPort);
+    this.logger.config(LocalizedStrings.LonerDistributionmanager_CHANGING_PORT_FROM_TO,
+        new Object[]{this.lonerPort, newPort, getId()});
   }
   public boolean isCurrentMember(InternalDistributedMember p_id) {
     return getId().equals(p_id);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
index 46c2eb3..8b5c279 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
@@ -784,7 +784,7 @@ public final class InternalDistributedMember
         sb.append(vmStr);
         sb.append(")");
       }
-      if (netMbr.preferredForCoordinator()) {
+      if (vmKind != DistributionManager.LONER_DM_TYPE && netMbr.preferredForCoordinator()) {
         sb.append("<ec>");
       }
       if (this.vmViewId >= 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
index 3ee22c1..9a74abd 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
@@ -133,7 +133,7 @@ public class SocketCreator {
   private static boolean useIPv6Addresses = !Boolean.getBoolean("java.net.preferIPv4Stack") &&
   		Boolean.getBoolean("java.net.preferIPv6Addresses");
   
-  private static final Map hostNames = new HashMap();
+  private static final Map<InetAddress, String> hostNames = new HashMap<>();
   
   /** flag to force always using DNS (regardless of the fact that these lookups can hang) */
   public static final boolean FORCE_DNS_USE = Boolean.getBoolean("gemfire.forceDnsUse");
@@ -376,6 +376,14 @@ public class SocketCreator {
     }
     return result;
   }
+  
+  /**
+   * Reset the hostNames caches
+   */
+  public static synchronized void resetHostNameCache() {
+    hostNames.clear();
+  }
+  
   // -------------------------------------------------------------------------
   //   Initializers (change SocketCreator state)
   // -------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
index c0ef60d..248353f 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
@@ -1020,7 +1020,7 @@ class ParentLocalizedStrings {
   public static final StringId SystemAdmin_MONITOR_OPTION_HELP = new StringId(2005, "-monitor Causes the stats command to keep periodically checking its statistic archives for updates.");
 
   public static final StringId CacheFactory_0_EXISTING_CACHE_WITH_DIFFERENT_CACHE_CONFIG =  new StringId(2006, "Existing cache has different cache configuration, it has:\n{0}");
-  public static final StringId LonerDistributionmanager_CHANGING_PORT_FROM_TO = new StringId(2007, "Updating membership port.  Port changed from {0} to {1}.");
+  public static final StringId LonerDistributionmanager_CHANGING_PORT_FROM_TO = new StringId(2007, "Updating membership port.  Port changed from {0} to {1}.  ID is now {2}");
   public static final StringId ManagerLogWriter_ROLLING_CURRENT_LOG_TO_0 = new StringId(2008, "Rolling current log to {0}");
   
   public static final StringId ExecuteFunction66_TRANSACTIONAL_FUNCTION_WITHOUT_RESULT = new StringId(2009, " Function invoked within transactional context, but hasResults() is false; ordering of transactional operations cannot be guaranteed.  This message is only issued once by a server.");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
old mode 100644
new mode 100755
index 5589453..9251a56
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -45,6 +45,7 @@ import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DurableClientAttributes;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
@@ -80,7 +81,6 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
   public void setUp() throws Exception {
     super.setUp();
-    getSystem();
   }
   
   public void tearDown2() throws Exception {
@@ -225,6 +225,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
   }
 
   public void testSynchronousEvents() throws Exception {
+    getSystem();
     InternalClientMembership.setForceSynchronous(true);
     try {
       doTestBasicEvents();
@@ -238,6 +239,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
    * Tests event notification methods on ClientMembership.
    */
   public void testBasicEvents() throws Exception {
+    getSystem();
     doTestBasicEvents();
   }
   
@@ -419,6 +421,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     final String[] memberId = new String[1];
     final boolean[] isClient = new boolean[1];
     
+    getSystem();
+
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
         fired[0] = true;
@@ -471,6 +475,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     final String[] memberId = new String[NUM_LISTENERS];
     final boolean[] isClient = new boolean[NUM_LISTENERS];
     
+    getSystem();
+
     final ClientMembershipListener[] listeners = new ClientMembershipListener[NUM_LISTENERS];
     for (int i = 0; i < NUM_LISTENERS; i++) {
       final int whichListener = i;
@@ -727,6 +733,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
    * crashes or departs gracefully, the client will detect this as a crash.
    */
   public void testClientMembershipEventsInClient() throws Exception {
+    getSystem();
     addExpectedException("IOException");
     final boolean[] fired = new boolean[3];
     final DistributedMember[] member = new DistributedMember[3];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
index 6ba91b8..103e465 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
@@ -67,6 +67,7 @@ public class AvailablePortJUnitTest {
     socket = new ServerSocket();
     int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     socket.bind(new InetSocketAddress((InetAddress)null, port));
+    System.out.println("bind addr="+System.getProperty("gemfire.bind-address"));
     assertFalse(AvailablePort.isPortAvailable(port, AvailablePort.SOCKET));
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4591fa1/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
index d238dcd..2bf013d 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
@@ -755,6 +755,7 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     closeCache();
     
     SocketCreator.resolve_dns = true;
+    SocketCreator.resetHostNameCache();
     CacheCreation.clearThreadLocals();
     System.getProperties().remove("gemfire.log-level");
     System.getProperties().remove("jgroups.resolve_dns");
@@ -774,8 +775,6 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     DistributionMessageObserver.setInstance(null);
     QueryObserverHolder.reset();
     DiskStoreObserver.setInstance(null);
-    System.getProperties().remove("gemfire.log-level");
-    System.getProperties().remove("jgroups.resolve_dns");
     
     if (InternalDistributedSystem.systemAttemptingReconnect != null) {
       InternalDistributedSystem.systemAttemptingReconnect.stopReconnecting();


[32/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt
deleted file mode 100644
index e60114d..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.1.txt
+++ /dev/null
@@ -1,1326 +0,0 @@
-
-VMware vFabric GemFire HTTP Session Management Module 2.1.1
-
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software components (or portions thereof) that are distributed with
-this VMware software products.
-
-The VMware Product may also include other VMware components, which may contain additional open 
-source software packages. One or more such open_source_licenses.txt files may therefore 
-accompany this VMware Product. 
-
-The VMware product that includes this file does not necessarily use all the
-open source software components referred to below and may also only use
-portions of a given component.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in this
-document.  This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> antlr-2.7.3
-   >>> backport-util-concurrent-java_5.0
-   >>> mx4j-2.0.1
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Apache License, V2.0
-
-   >>> commons-modeler-2.0
-
-
-
-SECTION 3: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-SECTION 4: GNU Lesser General Public License, V2.1
-
-   >>> jgroups-2.10
-   >>> trove-1.1.b3
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Apache License, V2.0
-
-   >>> GNU Lesser General Public License, V2.1
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> antlr-2.7.3
-
-SOFTWARE RIGHTS
-
-ANTLR 1989-2004 Developed by Terence Parr
-Partially supported by University of San Francisco & jGuru.com
-
-We reserve no legal rights to the ANTLR--it is fully in the
-public domain. An individual or company may do whatever
-they wish with source code distributed with ANTLR or the
-code generated by ANTLR, including the incorporation of
-ANTLR, or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However,
-we do ask that credit is given to us for developing
-ANTLR. By "credit", we mean that if you use ANTLR or
-incorporate any source code into one of your programs
-(commercial product, research project, or otherwise) that
-you acknowledge this fact somewhere in the documentation,
-research report, etc... If you like ANTLR and have
-developed a nice tool with the output, please mention that
-you developed it using ANTLR. In addition, we ask that the
-headers remain intact in our source code. As long as these
-guidelines are kept, we expect to continue enhancing this
-system and expect to make other tools available as they are
-completed.
-
-The primary ANTLR guy:
-
-Terence Parr
-parrt@cs.usfca.edu
-parrt@antlr.org
-
-
->>> backport-util-concurrent-java_5.0
-
-License
-This software is released to the public domain, in the spirit of the original code written by Doug Lea. 
-The code can be used for any purpose, modified, and redistributed without acknowledgment. No 
-warranty is provided, either express or implied.
-
-
->>> mx4j-2.0.1
-
-The MX4J License, Version 1.0
-
-Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-         1. Redistributions of source code must retain the above copyright
-            notice, this list of conditions and the following disclaimer.
-
-         2. Redistributions in binary form must reproduce the above copyright
-            notice, this list of conditions and the following disclaimer in
-            the documentation and/or other materials provided with the
-            distribution.
-
-         3. The end-user documentation included with the redistribution,
-            if any, must include the following acknowledgment:
-               "This product includes software developed by the
-                MX4J project (http://mx4j.sourceforge.net)."
-            Alternately, this acknowledgment may appear in the software itself,
-            if and wherever such third-party acknowledgments normally appear.
-
-         4. The name "MX4J" must not be used to endorse or promote
-            products derived from this software without prior written
-            permission.
-            For written permission, please contact
-            biorn_steedom [at] users [dot] sourceforge [dot] net
-
-         5. Products derived from this software may not be called "MX4J",
-            nor may "MX4J" appear in their name, without prior written
-            permission of Simone Bordet.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the MX4J project.  For more information on
-MX4J, please see
-the MX4J website.
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Apache License, V2.0 ----------
-
-Apache License, V2.0 is applicable to the following component(s).
-
-
->>> commons-modeler-2.0
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
---------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
-
-GNU Lesser General Public License, V2.1 is applicable to the following component(s).
-
-
->>> jgroups-2.10
-
-This library 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 library 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 library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
->>> trove-1.1.b3
-
-The Trove library is licensed under the Lesser GNU Public License,
-which is included with the distribution in a file called LICENSE.txt.
-
-The PrimeFinder and HashFunctions classes in Trove are subject to the
-following license restrictions:
-
-Copyright (c) 1999 CERN - European Organization for Nuclear Research.
-
-Permission to use, copy, modify, distribute and sell this software and
-its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. CERN makes no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without expressed or implied warranty.
-
-
-
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Apache License, V2.0 -----------
-
-Apache License 
-
-Version 2.0, January 2004 
-http://www.apache.org/licenses/ 
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction,
-and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.  
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control
-with that entity. For the purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management
-of such entity, whether by contract or otherwise, or (ii) ownership
-of fifty percent (50%) or more of the outstanding shares, or (iii)
-beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.  
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media
-types.  
-
-"Work" shall mean the work of authorship, whether in Source or
-Object form, made available under the License, as indicated by a copyright
-notice that is included in or attached to the work (an example is provided
-in the Appendix below).  
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent,
-as a whole, an original work of authorship. For the purposes of this
-License, Derivative Works shall not include works that remain separable
-from, or merely link (or bind by name) to the interfaces of, the Work
-and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the
-original version of the Work and any modifications or additions to
-that Work or Derivative Works thereof, that is intentionally submitted
-to Licensor for inclusion in the Work by the copyright owner or by an
-individual or Legal Entity authorized to submit on behalf of the copyright
-owner. For the purposes of this definition, "submitted" means any form of
-electronic, verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems
-that are managed by, or on behalf of, the Licensor for the purpose of
-discussing and improving the Work, but excluding communication that is
-conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity
-on behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty-free, irrevocable copyright license to reproduce, prepare
-Derivative Works of, publicly display, publicly perform, sublicense, and
-distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty- free, irrevocable (except as stated in this section) patent
-license to make, have made, use, offer to sell, sell, import, and
-otherwise transfer the Work, where such license applies only to those
-patent claims licensable by such Contributor that are necessarily
-infringed by their Contribution(s) alone or by combination of
-their Contribution(s) with the Work to which such Contribution(s)
-was submitted. If You institute patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Work or a Contribution incorporated within the Work constitutes direct
-or contributory patent infringement, then any patent licenses granted
-to You under this License for that Work shall terminate as of the date
-such litigation is filed.
-
-4. Redistribution.
-You may reproduce and distribute copies of the Work or Derivative Works
-thereof in any medium, with or without modifications, and in Source or
-Object form, provided that You meet the following conditions:
-
-  a. You must give any other recipients of the Work or Derivative Works
-     a copy of this License; and
-
-  b. You must cause any modified files to carry prominent notices stating
-     that You changed the files; and
-
-  c. You must retain, in the Source form of any Derivative Works that
-     You distribute, all copyright, patent, trademark, and attribution
-     notices from the Source form of the Work, excluding those notices
-     that do not pertain to any part of the Derivative Works; and
-
-  d. If the Work includes a "NOTICE" text file as part of its
-     distribution, then any Derivative Works that You distribute must
-     include a readable copy of the attribution notices contained
-     within such NOTICE file, excluding those notices that do not
-     pertain to any part of the Derivative Works, in at least one of
-     the following places: within a NOTICE text file distributed as part
-     of the Derivative Works; within the Source form or documentation,
-     if provided along with the Derivative Works; or, within a display
-     generated by the Derivative Works, if and wherever such third-party
-     notices normally appear. The contents of the NOTICE file are for
-     informational purposes only and do not modify the License. You
-     may add Your own attribution notices within Derivative Works that
-     You distribute, alongside or as an addendum to the NOTICE text
-     from the Work, provided that such additional attribution notices
-     cannot be construed as modifying the License.  You may add Your own
-     copyright statement to Your modifications and may provide additional
-     or different license terms and conditions for use, reproduction, or
-     distribution of Your modifications, or for any such Derivative Works
-     as a whole, provided Your use, reproduction, and distribution of the
-     Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions.
-Unless You explicitly state otherwise, any Contribution intentionally
-submitted for inclusion in the Work by You to the Licensor shall be
-under the terms and conditions of this License, without any additional
-terms or conditions.  Notwithstanding the above, nothing herein shall
-supersede or modify the terms of any separate license agreement you may
-have executed with Licensor regarding such Contributions.
-
-6. Trademarks.
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-Unless required by applicable law or agreed to in writing, Licensor
-provides the Work (and each Contributor provides its Contributions) on
-an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-express or implied, including, without limitation, any warranties or
-conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
-A PARTICULAR PURPOSE. You are solely responsible for determining the
-appropriateness of using or redistributing the Work and assume any risks
-associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability.
-In no event and under no legal theory, whether in tort (including
-negligence), contract, or otherwise, unless required by applicable law
-(such as deliberate and grossly negligent acts) or agreed to in writing,
-shall any Contributor be liable to You for damages, including any direct,
-indirect, special, incidental, or consequential damages of any character
-arising as a result of this License or out of the use or inability to
-use the Work (including but not limited to damages for loss of goodwill,
-work stoppage, computer failure or malfunction, or any and all other
-commercial damages or losses), even if such Contributor has been advised
-of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-While redistributing the Work or Derivative Works thereof, You may
-choose to offer, and charge a fee for, acceptance of support, warranty,
-indemnity, or other liability obligations and/or rights consistent with
-this License. However, in accepting such obligations, You may act only
-on Your own behalf and on Your sole responsibility, not on behalf of
-any other Contributor, and only if You agree to indemnify, defend, and
-hold each Contributor harmless for any liability incurred by, or claims
-asserted against, such Contributor by reason of your accepting any such
-warranty or additional liability.
-
-END OF TERMS AND CONDITIONS 
-
-
-
---------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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 library 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 library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America. All such
-requests should clearly specify: OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium. This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively,
-the Source Files may accompany the VMware product.
-
-
-[VFABRICGEMFIREHTTPSESSIONMANAGEMENTMODULE211GAKL051812]


[03/50] [abbrv] incubator-geode git commit: Changing HealthMonitor.checkIfAvailable() to perform "final" check

Posted by kl...@apache.org.
Changing HealthMonitor.checkIfAvailable() to perform "final" check

Somehow we missed modifying checkIfAvailable to use the "final" check
method after Jianxia implemented the tcp/ip checks.  This modifies
checkIfAvailable to do so.

I also noticed an exception being thrown while closing a PR during
forced-disconnect and changed the method to use getDM instead of
getDistributionManager, which can throw a cancellation exception.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ab25e41c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ab25e41c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ab25e41c

Branch: refs/heads/feature/GEODE-268
Commit: ab25e41c6281ef90f04c7534e4d65ba4f24d7fc9
Parents: 77f9811
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Feb 4 09:07:42 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Thu Feb 4 09:11:13 2016 -0800

----------------------------------------------------------------------
 .../membership/gms/fd/GMSHealthMonitor.java     | 132 +++++++++++--------
 .../membership/gms/membership/GMSJoinLeave.java |  12 +-
 .../internal/cache/PartitionedRegion.java       |   8 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |   8 +-
 .../membership/gms/MembershipManagerHelper.java |   2 +-
 .../gms/fd/GMSHealthMonitorJUnitTest.java       |  86 ++++--------
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  20 +--
 7 files changed, 128 insertions(+), 140 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 172926b..44186ba 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -32,6 +32,7 @@ import java.net.SocketTimeoutException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -44,6 +45,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ThreadFactory;
@@ -565,11 +567,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
 
   @Override
   public boolean checkIfAvailable(DistributedMember mbr, String reason, boolean initiateRemoval) {
-    boolean pinged = doCheckMember((InternalDistributedMember) mbr);
-    if (!pinged && initiateRemoval) {
-      suspect((InternalDistributedMember) mbr, reason);
-    }
-    return pinged;
+    return inlineCheckIfAvailable(localAddress, currentView, initiateRemoval, (InternalDistributedMember)mbr, reason);
   }
 
   public void start() {
@@ -656,9 +654,11 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
               if (GMSHealthMonitor.this.playingDead) {
                 continue;
               }
-              // [bruce] do we really want a timeout on the server-side?
-//              socket.setSoTimeout((int) services.getConfig().getMemberTimeout());
               serverSocketExecutor.execute(new ClientSocketHandler(socket)); //start();  [bruce] I'm seeing a lot of failures due to this thread not being created fast enough, sometimes as long as 30 seconds
+            
+            } catch (RejectedExecutionException e) {
+              // this can happen during shutdown
+
             } catch (IOException e) {
               if (!isStopping) {
                 logger.trace("Unexpected exception", e);
@@ -1095,7 +1095,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
         logger.info("received suspect message from {} for {}: {}",
            sender, req.getSuspectMember(), req.getReason());
       }
-      doFinalCheck(sender, sMembers, cv, localAddress);
+      checkIfAvailable(sender, sMembers, cv);
     }// coordinator ends
     else {
 
@@ -1119,7 +1119,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           logger.info("received suspect message from {} for {}: {}",
              sender, req.getSuspectMember(), req.getReason());
         }
-        doFinalCheck(sender, smbr, cv, localAddress);
+        checkIfAvailable(sender, smbr, cv);
       } else {
         recordSuspectRequests(sMembers, cv);
       }
@@ -1148,8 +1148,19 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     }
   }
 
-  private void doFinalCheck(final InternalDistributedMember initiator,
-      List<SuspectRequest> sMembers, final NetView cv, InternalDistributedMember localAddress) {
+  /**
+   * performs a "final" health check on the member.  If failure-detection
+   * socket information is available for the member (in the view) then
+   * we attempt to connect to its socket and ask if it's the expected member.
+   * Otherwise we send a heartbeat request and wait for a reply.
+   *  
+   * @param initiator
+   * @param sMembers
+   * @param cv
+   * @param initiateRemoval
+   */
+  private void checkIfAvailable(final InternalDistributedMember initiator,
+      List<SuspectRequest> sMembers, final NetView cv) {
 
 //    List<InternalDistributedMember> membersChecked = new ArrayList<>(10);
     try {
@@ -1184,48 +1195,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           @Override
           public void run() {
             try {
-              services.memberSuspected(initiator, mbr, reason);
-              long startTime = System.currentTimeMillis();
-              // for some reason we used to update the timestamp for the member
-              // with the startTime, but we don't want to do that because it looks
-              // like a heartbeat has been received
-
-              logger.info("Performing final check for suspect member {} reason={}", mbr, reason);
-              boolean pinged;
-              int port = cv.getFailureDetectionPort(mbr);
-              if (port <= 0) {
-                logger.info("Unable to locate failure detection port - requesting a heartbeat");
-                if (logger.isDebugEnabled()) {
-                  logger.debug("\ncurrent view: {}\nports: {}", cv, Arrays.toString(cv.getFailureDetectionPorts()));
-                }
-                pinged = GMSHealthMonitor.this.doCheckMember(mbr);
-                GMSHealthMonitor.this.stats.incFinalCheckRequestsSent();
-                GMSHealthMonitor.this.stats.incUdpFinalCheckRequestsSent();
-                if (pinged) {
-                  GMSHealthMonitor.this.stats.incFinalCheckResponsesReceived();
-                  GMSHealthMonitor.this.stats.incUdpFinalCheckResponsesReceived();
-                }
-              } else {
-                pinged = GMSHealthMonitor.this.doTCPCheckMember(mbr, port);
-              }
-
-              boolean failed = false;
-              if (!pinged && !isStopping) {
-                TimeStamp ts = memberTimeStamps.get(mbr);
-                if (ts == null || ts.getTime() <= startTime) {
-                  logger.info("Final check failed - requesting removal of suspect member " + mbr);
-                  services.getJoinLeave().remove(mbr, reason);
-                  failed = true;
-                } else {
-                  logger.info("Final check failed but detected recent message traffic for suspect member " + mbr);
-                }
-              }
-              if (!failed) {
-                logger.info("Final check passed for suspect member " + mbr);
-              }
-              // whether it's alive or not, at this point we allow it to
-              // be watched again
-              suspectedMemberInView.remove(mbr);
+              inlineCheckIfAvailable(initiator, cv, true, mbr,
+                  reason);
             } catch (DistributedSystemDisconnectedException e) {
               return;
             } catch (Exception e) {
@@ -1234,6 +1205,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
               GMSHealthMonitor.this.suspectedMemberInView.remove(mbr);
             }
           }
+
+          
         });
         //      }// scheduling for final check and removing it..
       }
@@ -1241,6 +1214,59 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
 //      membersInFinalCheck.removeAll(membersChecked);
     }
   }
+
+  private boolean inlineCheckIfAvailable(
+      final InternalDistributedMember initiator, final NetView cv,
+      boolean initiateRemoval,
+      final InternalDistributedMember mbr, final String reason) {
+
+    services.memberSuspected(initiator, mbr, reason);
+    long startTime = System.currentTimeMillis();
+    // for some reason we used to update the timestamp for the member
+    // with the startTime, but we don't want to do that because it looks
+    // like a heartbeat has been received
+
+    logger.info("Performing final check for suspect member {} reason={}", mbr, reason);
+    boolean pinged;
+    int port = cv.getFailureDetectionPort(mbr);
+    if (port <= 0) {
+      logger.info("Unable to locate failure detection port - requesting a heartbeat");
+      if (logger.isDebugEnabled()) {
+        logger.debug("\ncurrent view: {}\nports: {}", cv, Arrays.toString(cv.getFailureDetectionPorts()));
+      }
+      pinged = GMSHealthMonitor.this.doCheckMember(mbr);
+      GMSHealthMonitor.this.stats.incFinalCheckRequestsSent();
+      GMSHealthMonitor.this.stats.incUdpFinalCheckRequestsSent();
+      if (pinged) {
+        GMSHealthMonitor.this.stats.incFinalCheckResponsesReceived();
+        GMSHealthMonitor.this.stats.incUdpFinalCheckResponsesReceived();
+      }
+    } else {
+      pinged = GMSHealthMonitor.this.doTCPCheckMember(mbr, port);
+    }
+
+    boolean failed = false;
+    if (!pinged && !isStopping) {
+      TimeStamp ts = memberTimeStamps.get(mbr);
+      if (ts == null || ts.getTime() <= startTime) {
+        logger.info("Final check failed - requesting removal of suspect member " + mbr);
+        if (initiateRemoval) {
+          services.getJoinLeave().remove(mbr, reason);
+        }
+        failed = true;
+      } else {
+        logger.info("Final check failed but detected recent message traffic for suspect member " + mbr);
+      }
+    }
+    if (!failed) {
+      logger.info("Final check passed for suspect member " + mbr);
+    }
+    // whether it's alive or not, at this point we allow it to
+    // be watched again
+    suspectedMemberInView.remove(mbr);
+    return !failed;
+  }
+    
   @Override
   public void memberShutdown(DistributedMember mbr, String reason) {
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 0b0cfa0..0f16ba9 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -2161,16 +2161,16 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       filterMembers(mbrs, newLeaves, LEAVE_REQUEST_MESSAGE);   
       
       for (InternalDistributedMember mbr : mbrs) {
-        final InternalDistributedMember fmbr = mbr;
         checkers.add(new Callable<InternalDistributedMember>() {
           @Override
           public InternalDistributedMember call() throws Exception {
             // return the member id if it fails health checks
-            InternalDistributedMember mbr = GMSJoinLeave.this.checkIfAvailable(fmbr);
+            boolean available = GMSJoinLeave.this.checkIfAvailable(mbr);
             
             synchronized (viewRequests) {
-              if(mbr != null)
+              if (available) {
                 mbrs.remove(mbr);
+              }
               viewRequests.notifyAll();
             }
             return mbr;
@@ -2259,14 +2259,14 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
   }
   
-  InternalDistributedMember checkIfAvailable(InternalDistributedMember fmbr) {
+  boolean checkIfAvailable(InternalDistributedMember fmbr) {
  // return the member id if it fails health checks
     logger.info("checking state of member " + fmbr);
     if (services.getHealthMonitor().checkIfAvailable(fmbr, "Member failed to acknowledge a membership view", false)) {
       logger.info("member " + fmbr + " passed availability check");
-      return fmbr;
+      return true;
     }
     logger.info("member " + fmbr + " failed availability check");
-    return null;
+    return false;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 09e945b..b145a91 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -9760,17 +9760,13 @@ public class PartitionedRegion extends LocalRegion implements
     }
 
     // Include current VM in the status...
-    // remoteInfos.add(new Object[] {
-    // getDistributionManager().getId(),
-    // new Boolean(
-    // getRegionAdvisor().getBucket(bucketId).isHosting())});
     if (getRegionAdvisor().getBucket(bucketId).isHosting()) {
       if (getRegionAdvisor().isPrimaryForBucket(bucketId)) {
-        remoteInfos.add(new Object[] { getDistributionManager().getId(),
+        remoteInfos.add(new Object[] { getSystem().getDM().getId(),
             Boolean.TRUE, "" });
       }
       else {
-        remoteInfos.add(new Object[] { getDistributionManager().getId(),
+        remoteInfos.add(new Object[] { getSystem().getDM().getId(),
             Boolean.FALSE, "" });
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
index cdc3283..0700074 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
@@ -434,9 +434,11 @@ public class ReconnectDUnitTest extends CacheTestCase
           fail("interrupted while waiting for reconnect");
         }
         assertTrue("expected system to be reconnected", ds.getReconnectedSystem() != null);
-        int viewId = MembershipManagerHelper.getMembershipManager(ds.getReconnectedSystem()).getView().getViewId();
-        int memberViewId = ((InternalDistributedMember)ds.getReconnectedSystem().getDistributedMember()).getVmViewId();
-        assertEquals("expected a new ID to be assigned", viewId, memberViewId);
+        int oldViewId = MembershipManagerHelper.getMembershipManager(ds).getLocalMember().getVmViewId();
+        int newViewId = ((InternalDistributedMember)ds.getReconnectedSystem().getDistributedMember()).getVmViewId();
+        if ( !(newViewId > oldViewId) ) {
+          fail("expected a new ID to be assigned.  oldViewId="+oldViewId + "; newViewId=" + newViewId);
+        }
         return ds.getReconnectedSystem().getDistributedMember();
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
index 2c2d4a9..cda4e29 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
@@ -41,7 +41,7 @@ public class MembershipManagerHelper
   /** returns the JGroupMembershipManager for the given distributed system */
   public static MembershipManager getMembershipManager(DistributedSystem sys) {
     InternalDistributedSystem isys = (InternalDistributedSystem)sys;
-    DistributionManager dm = (DistributionManager)isys.getDistributionManager();
+    DistributionManager dm = (DistributionManager)isys.getDM();
     MembershipManager mgr = dm.getMembershipManager();
     return mgr;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
index 70285c7..9562e41 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -163,30 +163,14 @@ public class GMSHealthMonitorJUnitTest {
    */
   @Test
   public void testHMNextNeighborVerify() throws IOException {
-
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-
+    installAView();
     Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
-
   }
 
   @Test
   public void testHMNextNeighborAfterTimeout() throws Exception {
     System.out.println("testHMNextNeighborAfterTimeout starting");
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-
-//    System.out.printf("memberID is %s view is %s\n", mockMembers.get(3), v);
-    
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
+    installAView();
 
     // allow the monitor to give up on the initial "next neighbor" and
     // move on to the one after it
@@ -201,7 +185,7 @@ public class GMSHealthMonitorJUnitTest {
     // neighbor should change to 5th
     System.out.println("testHMNextNeighborAfterTimeout ending");
     Assert.assertEquals("expected " + expected + " but found " + neighbor
-        + ".  view="+v, expected, neighbor);  
+        + ".  view="+joinLeave.getView(), expected, neighbor);  
   }
 
   /**
@@ -210,13 +194,7 @@ public class GMSHealthMonitorJUnitTest {
 
   @Test
   public void testHMNextNeighborBeforeTimeout() throws IOException {
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
+    installAView();
 
     //Should we remove these sleeps and force the checkmember directly instead of waiting?
     try {
@@ -228,7 +206,7 @@ public class GMSHealthMonitorJUnitTest {
     // neighbor should be same
     System.out.println("next neighbor is " + gmsHealthMonitor.getNextNeighbor() +
         "\nmy address is " + mockMembers.get(3) +
-        "\nview is " + v);
+        "\nview is " + joinLeave.getView());
 
     Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
   }
@@ -238,14 +216,7 @@ public class GMSHealthMonitorJUnitTest {
    */
   @Test
   public void testSuspectMembersCalledThroughMemberCheckThread() throws Exception {
-    System.out.println("testSuspectMembersCalledThroughMemberCheckThread starting");
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
+    installAView();
 
     // when the view is installed we start a heartbeat timeout.  After
     // that expires we request a heartbeat
@@ -257,18 +228,23 @@ public class GMSHealthMonitorJUnitTest {
     Assert.assertTrue(gmsHealthMonitor.getStats().getSuspectsSent() > 0);
   }
 
-  /***
-   * checks ping thread didn't sends suspectMembers message before timeout
-   */
-  @Test
-  public void testSuspectMembersNotCalledThroughPingThreadBeforeTimeout() {
+  private void installAView() {
+    System.out.println("testSuspectMembersCalledThroughMemberCheckThread starting");
     NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
 
     // 3rd is current member
     when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
     gmsHealthMonitor.started();
-    
+
     gmsHealthMonitor.installView(v);
+  }
+
+  /***
+   * checks ping thread didn't sends suspectMembers message before timeout
+   */
+  @Test
+  public void testSuspectMembersNotCalledThroughPingThreadBeforeTimeout() {
+    installAView();
     InternalDistributedMember neighbor = gmsHealthMonitor.getNextNeighbor();
 
     try {
@@ -286,12 +262,7 @@ public class GMSHealthMonitorJUnitTest {
    */
   @Test
   public void testSuspectMembersCalledThroughSuspectThread() throws Exception {
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-    
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
+    installAView();
 
     gmsHealthMonitor.suspect(mockMembers.get(1), "Not responding");
 
@@ -308,12 +279,7 @@ public class GMSHealthMonitorJUnitTest {
   @Test
   public void testSuspectMembersNotCalledThroughSuspectThreadBeforeTimeout() {
 
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
+    installAView();
 
     gmsHealthMonitor.suspect(mockMembers.get(1), "Not responding");
 
@@ -437,16 +403,19 @@ public class GMSHealthMonitorJUnitTest {
    */
   @Test
   public void testCheckIfAvailableNoHeartBeatDontRemoveMember() {
+    installAView();
     long startTime = System.currentTimeMillis();
-    boolean retVal = gmsHealthMonitor.checkIfAvailable(mockMembers.get(1), "Not responding", false);
+    boolean retVal = gmsHealthMonitor.checkIfAvailable(mockMembers.get(1), "Not responding", true);
     long timeTaken = System.currentTimeMillis() - startTime;
 
-    assertTrue("This should have taken member ping timeout 100ms ", timeTaken >= gmsHealthMonitor.memberTimeout);
     assertFalse("CheckIfAvailable should have return false", retVal);
+    assertTrue("This should have taken member ping timeout 100ms but it took " + timeTaken, timeTaken >= gmsHealthMonitor.memberTimeout);
   }
 
   @Test
   public void testCheckIfAvailableWithSimulatedHeartBeat() {
+    installAView();
+    
     InternalDistributedMember memberToCheck = mockMembers.get(1);
     HeartbeatMessage fakeHeartbeat = new HeartbeatMessage();
     fakeHeartbeat.setSender(memberToCheck);
@@ -466,12 +435,7 @@ public class GMSHealthMonitorJUnitTest {
   @Test
   public void testShutdown() {
 
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers);
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
+    installAView();
 
     gmsHealthMonitor.stop();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab25e41c/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 5becc6a..5b58c27 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -139,10 +139,12 @@ public class GMSJoinLeaveJUnitTest {
     }
     mockOldMember = new InternalDistributedMember("localhost", 8700, Version.GFE_56);
 
-    if(useTestGMSJoinLeave)
+    if(useTestGMSJoinLeave) {
       gmsJoinLeave = new GMSJoinLeaveTest();
-    else
+    }
+    else {
       gmsJoinLeave = new GMSJoinLeave();
+    }
     gmsJoinLeave.init(services);
     gmsJoinLeave.start();
     gmsJoinLeave.started();
@@ -1105,7 +1107,7 @@ public class GMSJoinLeaveJUnitTest {
       super();
     }
     @Override
-    InternalDistributedMember checkIfAvailable(InternalDistributedMember fmbr) {
+    boolean checkIfAvailable(InternalDistributedMember fmbr) {
       if(removeMember != null) {
         try {
           if(removeMember.equals(fmbr)) {
@@ -1114,17 +1116,17 @@ public class GMSJoinLeaveJUnitTest {
           }
         } catch (InterruptedException e) {
         }
-        return fmbr;
-      }else if(leaveMember != null) {
+        return true;
+      } else if(leaveMember != null) {
         try {
-          if(leaveMember.equals(fmbr)) {
+          if (leaveMember.equals(fmbr)) {
             GMSJoinLeaveJUnitTest.this.processLeaveMessage(fmbr);
             Thread.sleep(1000000);
           }
         } catch (InterruptedException e) {
         }
-        return fmbr;
-      }else {
+        return true;
+      } else {
         return super.checkIfAvailable(fmbr);
       }
     }
@@ -1132,7 +1134,6 @@ public class GMSJoinLeaveJUnitTest {
   
   @Test
   public void testRemoveRequestWhileWaitingForFinalResponse() throws Exception {
-    String reason = "testing";
     initMocks(true, true);
     
     gmsJoinLeave.becomeCoordinatorForTest();
@@ -1155,7 +1156,6 @@ public class GMSJoinLeaveJUnitTest {
   
   @Test
   public void testLeaveRequestWhileWaitingForFinalResponse() throws Exception {
-    String reason = "testing";
     initMocks(true, true);
     
     gmsJoinLeave.becomeCoordinatorForTest();


[21/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java
new file mode 100644
index 0000000..620a332
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java
@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import org.hibernate.cache.CacheDataDescription;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.CollectionRegion;
+import org.hibernate.cache.access.AccessType;
+import org.hibernate.cache.access.CollectionRegionAccessStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.hibernate.GemFireRegionFactory;
+
+public class GemFireCollectionRegion extends GemFireBaseRegion implements CollectionRegion {
+
+  private Logger log = LoggerFactory.getLogger(getClass());
+  
+  public GemFireCollectionRegion(Region<Object, EntityWrapper> region,
+      boolean isClient, CacheDataDescription metadata,
+      GemFireRegionFactory regionFactory) {
+    super(region, isClient, metadata, regionFactory);
+  }
+
+  @Override
+  public boolean isTransactionAware() {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  @Override
+  public CacheDataDescription getCacheDataDescription() {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  @Override
+  public CollectionRegionAccessStrategy buildAccessStrategy(
+      AccessType accessType) throws CacheException {
+    log.debug("creating collection access for region:"+this.region.getName());
+    return new CollectionAccess(this);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java
new file mode 100644
index 0000000..22ac466
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java
@@ -0,0 +1,187 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutorService;
+
+import org.hibernate.cache.CacheDataDescription;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.EntityRegion;
+import org.hibernate.cache.access.AccessType;
+import org.hibernate.cache.access.EntityRegionAccessStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.modules.hibernate.GemFireRegionFactory;
+import com.gemstone.gemfire.modules.util.ModuleStatistics;
+
+public class GemFireEntityRegion extends GemFireBaseRegion implements EntityRegion {
+
+  private final Logger log = LoggerFactory.getLogger(getClass());
+  
+  private final boolean USE_JTA = Boolean.getBoolean("gemfiremodules.useJTA");
+  
+  /**
+   * keys for which interest has been registered already
+   */
+  private ConcurrentMap<Object, Boolean> registeredKeys = new ConcurrentHashMap<Object, Boolean>();
+
+  /**
+   * map to store the entries that were pre-fetched when the underlying region has no local storage
+   */
+  protected ConcurrentMap<Object, EntityWrapper> preFetchMap = new ConcurrentHashMap<Object, EntityWrapper>();
+  
+  public GemFireEntityRegion(Region<Object, EntityWrapper> region,
+      boolean isClient, CacheDataDescription metadata, GemFireRegionFactory regionFactory) {
+    super(region, isClient, metadata, regionFactory);
+  }
+
+  @Override
+  public boolean isTransactionAware() {
+    // there are no colocation guarantees while using hibernate
+    // so return false for a PartitionedRegion for now
+    if (USE_JTA) {
+      return true;
+    }
+    return false;
+  }
+
+  @Override
+  public CacheDataDescription getCacheDataDescription() {
+    return this.metadata;
+  }
+
+  @Override
+  public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType)
+      throws CacheException {
+    if (AccessType.READ_ONLY.equals(accessType)) {
+      log.info("creating read-only access for region: " + this.getName());
+      return new ReadOnlyAccess(this);
+    }
+    else if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
+      log.info("creating nonstrict-read-write access for region: "
+          + this.getName());
+      return new NonStrictReadWriteAccess(this);
+    }
+    else if (AccessType.READ_WRITE.equals(accessType)) {
+    	log.info("creating read-write access for region: "
+    	          + this.getName());
+      return new ReadWriteAccess(this);
+    }
+    else if (AccessType.TRANSACTIONAL.equals(accessType)) {
+    	log.info("creating transactional access for region: "
+    	          + this.getName());
+      return new TransactionalAccess(this);
+    }
+    throw new UnsupportedOperationException("Unknown access type: "
+        + accessType);
+  }
+
+  /**
+   * Should this region should register interest in keys.
+   * @return true for client regions with storage
+   */
+  public boolean isRegisterInterestRequired() {
+    return this.isClientRegion && this.region.getAttributes().getDataPolicy().withStorage();
+  }
+  
+  /**
+   * register interest in this key, if not already registered
+   * @param key
+   */
+  public void registerInterest(Object key) {
+    if (!this.registeredKeys.containsKey(key)) {
+      this.region.registerInterest(key);
+      this.registeredKeys.put(key, Boolean.TRUE);
+      log.debug("registered interest in key{}", key);
+    }
+  }
+  
+  public void registerInterest(Collection<?> list) {
+    // build a list of keys for which interest is not
+    // already registered
+    List<Object> interestList = new ArrayList<Object>();
+    for (Object o : list) {
+      if (!this.registeredKeys.containsKey(o)) {
+        interestList.add(o);
+      }
+    }
+    // register interest in this list
+    this.region.registerInterest(interestList);
+    log.debug("registered interest in {} keys", interestList.size());
+  }
+  
+  /**
+   * wraps the keys in {@link KeyWrapper} and calls getAll
+   * on the underlying GemFire region. When the underlying region
+   * is a proxy region, the fetched entries are stored in a local
+   * map.
+   * @param keys
+   */
+  public void getAll(Collection<?> keys) {
+    Set<KeyWrapper> wrappedKeys = new HashSet<KeyWrapper>();
+    for (Object o : keys) {
+      wrappedKeys.add(new KeyWrapper(o));
+    }
+    if (isRegisterInterestRequired()) {
+      registerInterest(wrappedKeys);
+    } else {
+      Map<Object, EntityWrapper> retVal = this.region.getAll(wrappedKeys);
+      putInLocalMap(retVal);
+    }
+  }
+
+  /**
+   * if the underlying gemfire region does not have local storage, put
+   * the pre-fetched entries in {@link #preFetchMap}
+   * @param map map of prefetched entries
+   */
+  private void putInLocalMap(Map<Object, EntityWrapper> map) {
+    if (!this.region.getAttributes().getDataPolicy().withStorage()) {
+      // if the value is null, do not cache in preFetchMap
+      for (Entry<Object, EntityWrapper> e : map.entrySet()) {
+        if (e.getValue() != null) {
+          this.preFetchMap.put(e.getKey(), e.getValue());
+          log.debug("putting key: {} value: {} in local map", e.getKey(), e.getValue());
+        }
+      }
+    }
+  }
+
+  /**
+   * If this key was pre-fetched, get the entity.
+   * @param key
+   * @return the prefetched entity
+   */
+  public EntityWrapper get(Object key) {
+    return this.preFetchMap.remove(key);
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java
new file mode 100644
index 0000000..ce06b85
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java
@@ -0,0 +1,113 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.QueryResultsRegion;
+import org.hibernate.cache.Timestamper;
+import org.hibernate.cache.TimestampsRegion;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Region;
+
+public class GemFireQueryResultsRegion implements QueryResultsRegion, TimestampsRegion {
+
+  private final Region region;
+  
+  private Logger log = LoggerFactory.getLogger(getClass());
+  
+  public GemFireQueryResultsRegion(Region region) {
+    this.region = region;
+  }
+  
+  @Override
+  public Object get(Object key) throws CacheException {
+    log.debug("get query results for {} ", key);
+    return this.region.get(key);
+  }
+
+  @Override
+  public void put(Object key, Object value) throws CacheException {
+    log.debug("For key {} putting query results {} ", key, value);
+    this.region.put(key, value);
+  }
+
+  @Override
+  public void evict(Object key) throws CacheException {
+    log.debug("removing query results for key {}", key);
+    this.region.remove(key);
+  }
+
+  @Override
+  public void evictAll() throws CacheException {
+    log.debug("clearing the query cache");
+    this.region.clear();
+  }
+
+  @Override
+  public String getName() {
+    return this.region.getName();
+  }
+
+  @Override
+  public void destroy() throws CacheException {
+    if (!this.region.isDestroyed()) {
+      this.region.destroyRegion();
+    }
+  }
+
+  @Override
+  public boolean contains(Object key) {
+    return this.region.containsKey(key);
+  }
+
+  @Override
+  public long getSizeInMemory() {
+    return -1;
+  }
+
+  @Override
+  public long getElementCountInMemory() {
+    return this.region.size();
+  }
+
+  @Override
+  public long getElementCountOnDisk() {
+    // TODO make this an overflow region
+    return -1;
+  }
+
+  @Override
+  public Map toMap() {
+    return Collections.unmodifiableMap(this.region);
+  }
+
+  @Override
+  public long nextTimestamp() {
+    return Timestamper.next();
+  }
+
+  @Override
+  public int getTimeout() {
+    return 60*1000; // all other cache providers have same value
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java
new file mode 100644
index 0000000..c321076
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java
@@ -0,0 +1,93 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.hibernate.cache.CacheKey;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+/**
+ * wraps {@link CacheKey}, and implements equals and
+ * hashCode. This is required for register interest
+ * operation/prefetching
+ * @author sbawaska
+ *
+ */
+public class KeyWrapper implements DataSerializable {
+  
+  private Serializable key;
+  private String entityName;
+  
+  private static final String separator = "#";
+  
+  public KeyWrapper() {
+  }
+  
+  public KeyWrapper(Object p_key) {
+    if (p_key instanceof String) {
+      String stringKey = (String)p_key;
+      this.key = stringKey.substring(stringKey.indexOf(separator)+1);
+      this.entityName = stringKey.substring(0, stringKey.indexOf(separator));
+    } else {
+      CacheKey cacheKey = (CacheKey)p_key;
+      this.key = cacheKey.getKey();
+      this.entityName = cacheKey.getEntityOrRoleName();
+    }
+  }
+  
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof KeyWrapper) {
+      KeyWrapper other = (KeyWrapper)obj;
+      if (this.key.toString().equals(other.key.toString())
+          && this.entityName.equals(other.entityName)) {
+        return true;
+      }
+    }
+    return false;
+  }
+  
+  @Override
+  public int hashCode() {
+    return this.key.toString().hashCode() + this.entityName.hashCode();
+  }
+  
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append(this.entityName).append(separator).append(this.key);
+    return sb.toString();
+  }
+
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeObject(this.key, out);
+    out.writeUTF(this.entityName);
+  }
+
+  @Override
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.key = DataSerializer.readObject(in);
+    this.entityName = in.readUTF();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java
new file mode 100644
index 0000000..ad617e4
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java
@@ -0,0 +1,83 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.access.SoftLock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NonStrictReadWriteAccess extends Access {
+
+  private Logger log = LoggerFactory.getLogger(getClass());
+
+  public NonStrictReadWriteAccess(GemFireEntityRegion region) {
+    super(region);
+  }
+
+  @Override
+  public SoftLock lockItem(Object key, Object version) throws CacheException {
+    log.debug("lock item called for key {}", key);
+    return null;
+  }
+
+  @Override
+  public boolean afterUpdate(Object key, Object value, Object currentVersion,
+      Object previousVersion, SoftLock lock) throws CacheException {
+    log.debug("after update called for key: {} value: {}", key, value);
+    getGemFireRegion().put(getWrappedKey(key), new EntityWrapper(value, -1L));
+    return true;
+  }
+  
+  @Override
+  public boolean update(Object key, Object value, Object currentVersion,
+      Object previousVersion) throws CacheException {
+    log.debug("updating key: {} value: {}", key, value);
+    getGemFireRegion().put(getWrappedKey(key), new EntityWrapper(value, -1L));
+    return true;
+  }
+//  
+//  @Override
+//  public boolean insert(Object key, Object value, Object version)
+//      throws CacheException {
+//    log.debug("inserting key:{} value:{}", key, value);
+//    getGemFireRegion().put(key, new EntityWrapper(value, -1L));
+//    return true;
+//  }
+//  
+//  @Override
+//  public boolean afterInsert(Object key, Object value, Object version)
+//      throws CacheException {
+//    log.debug("after insert called for key:{} value:{}", key, value);
+//    getGemFireRegion().put(key, new EntityWrapper(value, -1L));
+//    return true;
+//  }
+//  
+  @Override
+  public boolean putFromLoad(Object key, Object value, long txTimestamp,
+      Object version) throws CacheException {
+    return putFromLoad(key, value, txTimestamp, version, true);
+  }
+  
+  @Override
+  public boolean putFromLoad(Object key, Object value, long txTimestamp,
+      Object version, boolean minimalPutOverride) throws CacheException {
+    log.debug("putting a new entry from load key:{} value:{}", key, value);
+    getGemFireRegion().put(getWrappedKey(key), new EntityWrapper(value, -1L));
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java
new file mode 100644
index 0000000..6f54067
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java
@@ -0,0 +1,55 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.access.SoftLock;
+
+public class ReadOnlyAccess extends Access {
+
+  public ReadOnlyAccess(GemFireEntityRegion region) {
+    super(region);
+  }
+
+  @Override
+  public boolean insert(Object key, Object value, Object version)
+      throws CacheException {
+    throw new UnsupportedOperationException(
+        "insert not supported on read only access");
+  }
+
+  @Override
+  public boolean update(Object key, Object value, Object currentVersion,
+      Object previousVersion) throws CacheException {
+    throw new UnsupportedOperationException(
+        "update not supported on read only access");
+  }
+
+  @Override
+  public boolean afterInsert(Object key, Object value, Object version)
+      throws CacheException {
+    throw new UnsupportedOperationException(
+        "insert not supported on read only access");
+  }
+
+  @Override
+  public boolean afterUpdate(Object key, Object value, Object currentVersion,
+      Object previousVersion, SoftLock lock) throws CacheException {
+    throw new UnsupportedOperationException(
+        "update not supported on read only access");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java
new file mode 100644
index 0000000..3c80174
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java
@@ -0,0 +1,36 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import org.hibernate.cache.CacheException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ReadWriteAccess extends Access {
+
+  private Logger log = LoggerFactory.getLogger(getClass());
+
+  public ReadWriteAccess(GemFireEntityRegion region) {
+    super(region);
+  }
+
+  @Override
+  public boolean update(Object key, Object value, Object currentVersion,
+      Object previousVersion) throws CacheException {
+    return super.update(key, value, currentVersion, previousVersion);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
new file mode 100644
index 0000000..76fdf77
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
@@ -0,0 +1,153 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.modules.hibernate.GemFireCacheProvider;
+import com.gemstone.gemfire.modules.util.BootstrappingFunction;
+import com.gemstone.gemfire.modules.util.CreateRegionFunction;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+
+public class RegionFactoryDelegate  {
+
+  private static final String LOG_FILE = "log-file";
+
+  private static final String CACHE_XML_FILE = "cache-xml-file";
+
+  private static final String DEFAULT_REGION_TYPE = RegionShortcut.REPLICATE_HEAP_LRU.name();
+
+  private static final String CLIENT_DEFAULT_REGION_TYPE = ClientRegionShortcut.PROXY.name();
+
+  protected final Properties gemfireProperties;
+  protected final Properties regionProperties;
+
+  protected Logger log = LoggerFactory.getLogger(getClass());
+  
+  private Cache cache;
+  
+  public RegionFactoryDelegate(Properties gemfireProperties, Properties regionProperties) {
+    this.gemfireProperties = gemfireProperties;
+    this.regionProperties = regionProperties;
+  }
+  
+  public GemFireCache startCache() {
+    log.info("Creating a GemFire cache");
+    checkExistingCache();
+    cache = new CacheFactory(gemfireProperties).create();
+    log.debug("GemFire cache creation completed");
+    FunctionService.onMembers(this.cache.getDistributedSystem()).execute(new BootstrappingFunction()).getResult();
+    FunctionService.registerFunction(new CreateRegionFunction(cache));
+    return cache;
+  }
+
+  /**
+   * When hibernate module is running within servlet container, we should
+   * check if http module is being used and make sure that we use 
+   * same cache-xml and log-file properties.
+   */
+  protected void checkExistingCache() {
+    Cache existingCache = GemFireCacheImpl.getInstance();
+    if (existingCache == null) {
+      return;
+    }
+    Properties existingProps = existingCache.getDistributedSystem().getProperties();
+    String cacheXML = existingProps.getProperty(CACHE_XML_FILE);
+    String logFile = existingProps.getProperty(LOG_FILE, "");
+    this.gemfireProperties.setProperty(CACHE_XML_FILE, cacheXML);
+    this.gemfireProperties.setProperty(LOG_FILE, logFile);
+    log.info("Existing GemFire cache detected. Using same "+CACHE_XML_FILE+":"+cacheXML+
+    " and "+LOG_FILE+":"+logFile+" as existing cache");
+  }
+  
+  public Region<Object, EntityWrapper> createRegion(String regionName) {
+    Region<Object, EntityWrapper> r = cache.getRegion(regionName);
+    if (r != null) {
+      // for  the peer-to-peer case, for now we assume that
+      // cache.xml will be the same for all peers
+      // TODO validate regions without this assumption
+      return r;
+    }
+    String regionType = getRegionType(regionName);
+    boolean isLocalRegion = regionType.contains("LOCAL") ? true : false;
+    RegionConfiguration regionConfig = new RegionConfiguration();
+    regionConfig.setRegionName(regionName);
+    regionConfig.setRegionAttributesId(regionType);
+    regionConfig.setCacheWriterName(EntityRegionWriter.class.getCanonicalName());
+    com.gemstone.gemfire.cache.RegionFactory<Object, EntityWrapper> rFactory = this.cache
+        .createRegionFactory(RegionShortcut.valueOf(regionType));
+    rFactory.setCacheWriter(new EntityRegionWriter());
+    if (isLocalRegion) {
+      rFactory.setDataPolicy(DataPolicy.REPLICATE);
+    }
+    r = rFactory.create(regionName);
+    // create same region on peers
+    if (!isLocalRegion) {
+      FunctionService.onMembers(this.cache.getDistributedSystem())
+          .withArgs(regionConfig).execute(CreateRegionFunction.ID).getResult();
+    }
+    return r;
+  }
+
+  /**
+   * returns the type of region to create by consulting the properties specified
+   * in hibernate.cfg.xml
+   * 
+   * @see #createRegion(String)
+   * @param regionName
+   * @return string representation of {@link RegionShortcut}
+   * @see GemFireCacheProvider
+   */
+  protected String getRegionType(String regionName) {
+    String rType = getOverridenRegionType(regionName);
+    if (rType != null) {
+      return rType.toUpperCase();
+    }
+    rType = regionProperties
+        .getProperty("gemfire.default-region-attributes-id");
+    if (rType == null) {
+      rType =  DEFAULT_REGION_TYPE;
+    }
+    return rType.toUpperCase();
+  }
+
+  private String getOverridenRegionType(String regionName) {
+    String rType = null;
+    Iterator<Object> it = regionProperties.keySet().iterator();
+    while (it.hasNext()) {
+      String current = (String)it.next();
+      if (current.contains(regionName)) {
+        rType = regionProperties.getProperty(current);
+        break;
+      }
+    }
+    return rType;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java
new file mode 100644
index 0000000..f12eab9
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+public class TransactionalAccess extends Access {
+
+  public TransactionalAccess(GemFireEntityRegion region) {
+    super(region);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Event.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Event.java b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Event.java
new file mode 100644
index 0000000..962c083
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Event.java
@@ -0,0 +1,67 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules;
+
+import java.util.Date;
+
+public class Event {
+    private Long id;
+
+    private String title;
+    private Date date;
+    private int i;
+
+    public Event() {}
+
+    public Long getId() {
+        return id;
+    }
+
+    private void setId(Long id) {
+        this.id = id;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public Integer getVersion() {
+    	return i;
+    }
+    
+    public void setVersion(int i) {
+    	this.i = i;
+    }
+    
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    @Override
+    public String toString() {
+    	StringBuilder b = new StringBuilder();
+    	b.append("Event:id:"+id+" title:"+title+" date:"+date);
+    	return b.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
new file mode 100644
index 0000000..9a86f10
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
@@ -0,0 +1,410 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.Region.Entry;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.modules.Owner.Status;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.cfg.Configuration;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import static org.junit.Assert.assertEquals;
+
+@Category(IntegrationTest.class)
+public class HibernateJUnitTest {
+
+  private Logger log = LoggerFactory.getLogger(getClass());
+
+  //private static final String jdbcURL = "jdbc:hsqldb:hsql://localhost/test";
+  private static final String jdbcURL = "jdbc:hsqldb:mem:test";
+
+  static File tmpDir;
+
+  static String gemfireLog;
+
+  @Before
+  public void setUp() throws Exception {
+    // Create a per-user scratch directory
+    tmpDir = new File(System.getProperty("java.io.tmpdir"),
+            "gemfire_modules-" + System.getProperty("user.name"));
+    tmpDir.mkdirs();
+    tmpDir.deleteOnExit();
+
+    gemfireLog = tmpDir.getPath() +
+            System.getProperty("file.separator") + "gemfire_modules.log";
+  }
+
+  public static SessionFactory getSessionFactory(Properties overrideProps) {
+    System.setProperty("gemfire.home", "GEMFIREHOME");
+    Configuration cfg = new Configuration();
+    cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
+    cfg.setProperty("hibernate.connection.driver_class",
+        "org.hsqldb.jdbcDriver");
+    // cfg.setProperty("hibernate.connection.url", "jdbc:hsqldb:mem:test");
+    cfg.setProperty("hibernate.connection.url", jdbcURL);
+    cfg.setProperty("hibernate.connection.username", "sa");
+    cfg.setProperty("hibernate.connection.password", "");
+    cfg.setProperty("hibernate.connection.pool_size", "1");
+    cfg.setProperty("hibernate.connection.autocommit", "true");
+    cfg.setProperty("hibernate.hbm2ddl.auto", "update");
+
+    cfg.setProperty("hibernate.cache.region.factory_class",
+        "com.gemstone.gemfire.modules.hibernate.GemFireRegionFactory");
+    cfg.setProperty("hibernate.show_sql", "true");
+    cfg.setProperty("hibernate.cache.use_query_cache", "true");
+    //cfg.setProperty("gemfire.mcast-port", AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS)+"");
+    cfg.setProperty("gemfire.mcast-port", "0");
+    cfg.setProperty("gemfire.statistic-sampling-enabled", "true");
+    cfg.setProperty("gemfire.log-file", gemfireLog);
+    cfg.setProperty("gemfire.writable-working-dir", tmpDir.getPath());
+    //cfg.setProperty("gemfire.statistic-archive-file", "plugin-stats-file.gfs");
+    //cfg.setProperty("gemfire.default-client-region-attributes-id", "CACHING_PROXY");
+    //cfg.setProperty("gemfire.cache-topology", "client-server");
+    //cfg.setProperty("gemfire.locators", "localhost[5432]");
+    //cfg.setProperty("gemfire.log-level", "fine");
+    // cfg.setProperty("", "");
+    cfg.addClass(Person.class);
+    cfg.addClass(Event.class);
+    if (overrideProps != null) {
+      Iterator it = overrideProps.keySet().iterator();
+      while (it.hasNext()) {
+        String key = (String)it.next();
+        cfg.setProperty(key, overrideProps.getProperty(key));
+      }
+    }
+    return cfg.buildSessionFactory();
+  }
+
+  @Test
+  public void testpreload() {
+    log.info("SWAP:creating session factory In hibernateTestCase");
+
+    Session session = getSessionFactory(null).openSession();
+    log.info("SWAP:session opened");
+    session.beginTransaction();
+    Event theEvent = new Event();
+    theEvent.setTitle("title");
+    theEvent.setDate(new Date());
+    session.save(theEvent);
+    Long id = theEvent.getId();
+    session.getTransaction().commit();
+    session.beginTransaction();
+    Event ev = (Event)session.get(Event.class, id);
+    log.info("SWAP:load complete: " + ev);
+    session.getTransaction().commit();
+  }
+
+  @Test
+  public void testNothing() throws Exception {
+    java.util.logging.Logger.getLogger("org.hibernate").setLevel(Level.ALL);
+    log.info("SWAP:creating session factory In hibernateTestCase");
+
+    Session session = getSessionFactory(null).openSession();
+    log.info("SWAP:session opened");
+    // session.setFlushMode(FlushMode.COMMIT);
+    session.beginTransaction();
+    Event theEvent = new Event();
+    theEvent.setTitle("title");
+    theEvent.setDate(new Date());
+    //session.save(theEvent);
+    session.persist(theEvent);
+    Long id = theEvent.getId();
+    session.getTransaction().commit();
+    log.info("commit complete...doing load");
+    session.beginTransaction();
+    Event ev = (Event)session.load(Event.class, id);
+    log.info("load complete: " + ev);
+    log.trace("SWAP");
+    ev.setTitle("newTitle");
+    session.save(ev);
+    log.info("commit");
+    session.getTransaction().commit();
+    log.info("save complete " + ev);
+
+    session.beginTransaction();
+    ev = (Event)session.load(Event.class, id);
+    log.info("load complete: " + ev);
+    ev.setTitle("newTitle2");
+    session.save(ev);
+    log.info("commit");
+    session.getTransaction().commit();
+    log.info("save complete " + ev);
+
+    ev = (Event)session.load(Event.class, id);
+    log.info("second load " + ev);
+    session.flush();
+    session.close();
+    log.info("flush complete session:" + session);
+
+    for (int i=0; i<5; i++) {
+      session = getSessionFactory(null).openSession();
+      log.info("doing get "+id);
+      // ev = (Event) session.load(Event.class, id);
+      ev = (Event)session.get(Event.class, id);
+      log.info("third load " + ev);
+    }
+    printExistingDB();
+    Iterator it = GemFireCacheImpl.getInstance().rootRegions().iterator();
+    while (it.hasNext()) {
+      Region r = (Region)it.next();
+      System.out.println("Region:"+r);
+      Iterator enIt = r.entrySet().iterator();
+      while (enIt.hasNext()) {
+        Region.Entry re = (Entry)enIt.next();
+        System.out.println("key:"+re.getKey()+" value:"+re.getValue());
+      }
+    }
+    Thread.sleep(3000);
+     //System.in.read();
+    // try direct data
+
+  }
+
+  public void _testInvalidation() {
+    Session s = getSessionFactory(null).openSession();
+  }
+
+  static Long personId;
+
+  @Test
+  public void testRelationship() throws Exception {
+    //java.util.logging.Logger.getLogger("org.hibernate").setLevel(Level.ALL);
+    Properties props = new Properties();
+    props.put("gemfire.topology", "client-server");
+    Session session = getSessionFactory(null).openSession();
+    session.beginTransaction();
+
+    Person thePerson = new Person();
+    thePerson.setFirstname("foo");
+    thePerson.setLastname("bar");
+    thePerson.setAge(1);
+    thePerson.setId(99L);
+    session.save(thePerson);
+    personId = thePerson.getId();
+    log.info("person saved");
+    
+    Event theEvent = new Event();
+    theEvent.setTitle("title");
+    theEvent.setDate(new Date());
+    session.save(theEvent);
+    Long eventId = theEvent.getId();
+    log.info("event saved");
+    
+    Event theEvent2 = new Event();
+    theEvent2.setTitle("title2");
+    theEvent2.setDate(new Date());
+    session.save(theEvent2);
+    Long eventId2 = theEvent2.getId();
+    log.info("event2 saved");
+    session.getTransaction().commit();
+    
+    session.beginTransaction();
+    Person aPerson = (Person) session.load(Person.class, personId);
+    Event anEvent = (Event) session.load(Event.class, eventId);
+    Event anEvent2 = (Event) session.load(Event.class, eventId2);
+    log.info("adding event to person");
+    aPerson.getE().add(anEvent);
+    aPerson.getE().add(anEvent2);
+    log.info("calling commit");
+
+    session.getTransaction().commit();
+    log.info("commit complete");
+    session.close();
+    log.info("opening new session");
+    session = getSessionFactory(null).openSession();
+    log.info("SWAP:loading person");
+    aPerson = (Person)session.load(Person.class, personId);
+    log.info("loading events");
+    Iterator<Event> e = aPerson.getE().iterator();
+    while (e.hasNext()) {
+      e.next();
+    }
+    session.close();
+    log.info("opening new session");
+    session = getSessionFactory(null).openSession();
+    log.info("SWAP:loading person");
+    aPerson = (Person)session.load(Person.class, personId);
+    log.info("loading events");
+    e = aPerson.getE().iterator();
+    while (e.hasNext()) {
+      e.next();
+    }
+
+    log.info(aPerson.getE()+"");
+    session.close();
+    //System.in.read();
+//    log.info("opening third session");
+//    session = getSessionFactory().openSession();
+//    log.info("loading person");
+//    aPerson = (Person)session.load(Person.class, personId);
+//    log.info("loading events");
+//    log.info(aPerson.getEvents()+"");
+  }
+  
+  public void _testQueryCache() throws Exception {
+    Session session = getSessionFactory(null).openSession();
+    Query q = session.createQuery("from Event");
+    q.setCacheable(true);
+    List l = q.list();
+    log.info("list:"+l);
+//    log.info("Sleeping for 10 seconds");
+//    Thread.sleep(10000);
+    l = q.list();
+    log.info("list2:"+l);
+    log.info("updating an event");
+    session.beginTransaction();
+    Event e = (Event)l.get(0);
+    e.setDate(new Date());
+    session.saveOrUpdate(e);
+    session.getTransaction().commit();
+    l = q.list();
+    log.info("list3:"+l);
+  }
+
+  @Test
+  public void testInsert() {
+    Session session = getSessionFactory(null).openSession();
+    Region r = GemFireCacheImpl.getExisting().getRegion(Person.class.getCanonicalName());
+    int initSize = r.size();
+    session.beginTransaction();
+    log.info("SWAP: Saving Person");
+    Person p = new Person();
+    p.setId(10L);
+    p.setFirstname("foo");
+    p.setLastname("bar");
+    session.saveOrUpdate("Person", p);
+    session.getTransaction().commit();
+    assertEquals(1, session.getStatistics().getEntityCount());
+    assertEquals(initSize+1, r.size());
+
+    session.beginTransaction();
+    p.setAge(1);
+    session.saveOrUpdate(p);
+    session.getTransaction().commit();
+    assertEquals(1, session.getStatistics().getEntityCount());
+  }
+
+  @Test
+  public void testNormalRegion() {
+    Properties props = new Properties();
+    props.setProperty("gemfire.default-region-attributes-id", "LOCAL");
+    Session session = getSessionFactory(props).openSession();
+    session.beginTransaction();
+    Event theEvent = new Event();
+    theEvent.setTitle("title");
+    theEvent.setDate(new Date());
+    session.save(theEvent);
+    Long id = theEvent.getId();
+    session.getTransaction().commit();
+    session.beginTransaction();
+    Event ev = (Event)session.load(Event.class, id);
+    ev.setTitle("newTitle");
+    session.save(ev);
+    session.getTransaction().commit();
+  }
+  
+  private void printExistingDB() throws SQLException {
+    try {
+      Class.forName("org.hsqldb.jdbc.JDBCDriver");
+    }
+    catch (Exception e) {
+      System.err.println("ERROR: failed to load HSQLDB JDBC driver.");
+      e.printStackTrace();
+      return;
+    }
+
+    Connection c = DriverManager.getConnection(jdbcURL, "SA", "");
+    log.info("issuing query...");
+    ResultSet rs = c.createStatement().executeQuery("select * from events");
+    int col = rs.getMetaData().getColumnCount();
+    while (rs.next()) {
+      StringBuilder b = new StringBuilder();
+      for (int i = 1; i <= col; i++) {
+        b.append(" col:" + i + ":" + rs.getString(i));
+      }
+      log.info("Query result:" + b.toString());
+    }
+  }
+
+  @Test
+  public void testEnum() {
+    AnnotationConfiguration cfg = new AnnotationConfiguration();
+    cfg.addAnnotatedClass(Owner.class);
+    cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
+    cfg.setProperty("hibernate.connection.driver_class",
+        "org.hsqldb.jdbcDriver");
+    cfg.setProperty("hibernate.connection.url", jdbcURL);
+    cfg.setProperty("hibernate.connection.username", "sa");
+    cfg.setProperty("hibernate.connection.password", "");
+    cfg.setProperty("hibernate.connection.pool_size", "1");
+    cfg.setProperty("hibernate.connection.autocommit", "true");
+    cfg.setProperty("hibernate.hbm2ddl.auto", "update");
+
+    cfg.setProperty("hibernate.cache.region.factory_class",
+        "com.gemstone.gemfire.modules.hibernate.GemFireRegionFactory");
+    cfg.setProperty("hibernate.show_sql", "true");
+    cfg.setProperty("hibernate.cache.use_query_cache", "true");
+    cfg.setProperty("gemfire.statistic-sampling-enabled", "true");
+    cfg.setProperty("gemfire.log-file", gemfireLog);
+    cfg.setProperty("gemfire.writable-working-dir", tmpDir.getPath());
+    cfg.setProperty("gemfire.mcast-port", "0");
+    //cfg.setProperty("gemfire.cache-topology", "client-server");
+
+    SessionFactory sf = cfg.buildSessionFactory();
+    Session session = sf.openSession();
+    session.beginTransaction();
+    Owner o = new Owner();
+    o.setAddress("addr");
+    o.setCity("pdx");
+    o.setStatus(Status.PREMIUM);
+    session.save(o);
+    long id = o.getId();
+    log.info("testEnum:commiting tx");
+    session.getTransaction().commit();
+    session.close();
+    
+    session = sf.openSession();
+    Owner o1 = (Owner) session.load(Owner.class, id);
+    log.info("loaded:"+o);
+    assertEquals(o.getAddress(), o1.getAddress());
+    assertEquals(o.getCity(), o1.getCity());
+    assertEquals(o.getStatus(), o1.getStatus());
+    o1.setAddress("address2");
+    session.save(o1);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Owner.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Owner.java b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Owner.java
new file mode 100644
index 0000000..92ef56f
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Owner.java
@@ -0,0 +1,186 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.persistence.Column;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.hibernate.annotations.Entity;
+
+
+/**
+ * Simple JavaBean domain object representing an owner.
+ * 
+ * @author Ken Krebs
+ * @author Juergen Hoeller
+ * @author Sam Brannen
+ */
+@javax.persistence.Entity
+@Entity
+public class Owner {
+	private static final long serialVersionUID = 4315791692556052565L;
+
+	@Column(name="address")
+	private String address;
+
+	private String city;
+
+	private String telephone;
+
+//	private Set<Pet> pets;
+	@Id
+	@GeneratedValue
+	private Long id;
+	
+	private long versionNum = -1;
+
+	public enum Status {
+		NORMAL, PREMIUM
+	};
+
+	@Enumerated
+	private Status status = Status.NORMAL;
+
+	  private void setId(Long id) {
+	    this.id = id;
+	  }
+
+	  public Long getId() {
+	    return id;
+	  }
+	  
+	public String getAddress() {
+		return this.address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public String getCity() {
+		return this.city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getTelephone() {
+		return this.telephone;
+	}
+
+	public void setTelephone(String telephone) {
+		this.telephone = telephone;
+	}
+
+	public long getVersionNum() {
+		return versionNum;
+	}
+
+	public void setVersionNum(long versionNum) {
+		this.versionNum = versionNum;
+	}
+
+	public Status getStatus() {
+		return this.status;
+	}
+
+	public void setStatus(Status state) {
+		if (state != null) {
+			this.status = state;
+		}
+	}
+
+//	protected void setPetsInternal(Set<Pet> pets) {
+//		this.pets = pets;
+//	}
+//
+//	protected Set<Pet> getPetsInternal() {
+//		if (this.pets == null) {
+//			this.pets = new HashSet<Pet>();
+//		}
+//		return this.pets;
+//	}
+//
+//	public List<Pet> getPets() {
+//		List<Pet> sortedPets = new ArrayList<Pet>(getPetsInternal());
+//		PropertyComparator.sort(sortedPets, new MutableSortDefinition("name",
+//				true, true));
+//		return Collections.unmodifiableList(sortedPets);
+//	}
+//
+//	public void addPet(Pet pet) {
+//		getPetsInternal().add(pet);
+//		pet.setOwner(this);
+//	}
+//
+//	/**
+//	 * Return the Pet with the given name, or null if none found for this Owner.
+//	 * 
+//	 * @param name
+//	 *            to test
+//	 * @return true if pet name is already in use
+//	 */
+//	public Pet getPet(String name) {
+//		return getPet(name, false);
+//	}
+//
+//	/**
+//	 * Return the Pet with the given name, or null if none found for this Owner.
+//	 * 
+//	 * @param name
+//	 *            to test
+//	 * @return true if pet name is already in use
+//	 */
+//	public Pet getPet(String name, boolean ignoreNew) {
+//		name = name.toLowerCase();
+//		for (Pet pet : getPetsInternal()) {
+//			if (!ignoreNew || !pet.isNew()) {
+//				String compName = pet.getName();
+//				compName = compName.toLowerCase();
+//				if (compName.equals(name)) {
+//					return pet;
+//				}
+//			}
+//		}
+//		return null;
+//	}
+//
+//	@Override
+//	public String toString() {
+//		return new ToStringCreator(this).append("id", this.getId())
+//				.append("new", this.isNew())
+//				.append("lastName", this.getLastName())
+//				.append("firstName", this.getFirstName())
+//				.append("address", this.address).append("city", this.city)
+//				.append("telephone", this.telephone)
+//				.append("version", this.versionNum)
+//				.append("status", this.status)
+//
+//				.toString();
+//	}
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Person.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Person.java b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Person.java
new file mode 100644
index 0000000..559363d
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/Person.java
@@ -0,0 +1,72 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class Person {
+  private Long id;
+  private int age;
+  private String firstname;
+  private String lastname;
+
+  private Set<Event> e = new HashSet<Event>();
+  
+  public Person() {}
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public Long getId() {
+    return id;
+  }
+
+  public void setAge(int age) {
+    this.age = age;
+  }
+
+  public int getAge() {
+    return age;
+  }
+
+  public void setFirstname(String firstname) {
+    this.firstname = firstname;
+  }
+
+  public String getFirstname() {
+    return firstname;
+  }
+
+  public void setLastname(String lastname) {
+    this.lastname = lastname;
+  }
+
+  public String getLastname() {
+    return lastname;
+  }
+
+  public void setE(Set<Event> events) {
+    this.e = events;
+  }
+
+  public Set<Event> getE() {
+    return e;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
new file mode 100644
index 0000000..9459acc
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
@@ -0,0 +1,88 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import junit.framework.TestCase;
+
+import org.hibernate.Session;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.Region.Entry;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+
+public class SecondVMTest extends TestCase {
+
+  private Logger log = LoggerFactory.getLogger(getClass());
+  
+  public void testNoop() {
+    
+  }
+  public void _testStartEmptyVM() throws IOException {
+    Properties gemfireProperties = new Properties();
+    gemfireProperties.setProperty("mcast-port", "5555");
+    gemfireProperties.setProperty("log-level", "fine");
+    Cache cache = new CacheFactory(gemfireProperties).create();
+    System.in.read();
+    Iterator it = cache.rootRegions().iterator();
+    while (it.hasNext()) {
+      Region r = (Region)it.next();
+      System.out.println("Region:"+r);
+      Iterator enIt = r.entrySet().iterator();
+      while (enIt.hasNext()) {
+        Region.Entry re = (Entry)enIt.next();
+        System.out.println("key:"+re.getKey()+" value:"+re.getValue());
+      }
+    }
+  }
+  
+  public void _testStartVM() throws Exception {
+    java.util.logging.Logger.getLogger("org.hibernate").setLevel(Level.ALL);
+    Session session = HibernateJUnitTest.getSessionFactory(null).openSession();
+    log.info("SWAP:new session open");
+    long id = 1;
+    log.info("loading new person:"+(id));
+    GemFireCache cache = GemFireCacheImpl.getInstance();
+    Iterator<Region<?, ?>> rSet = cache.rootRegions().iterator();
+    while (rSet.hasNext()) {
+      Region<?, ?> r = rSet.next();
+      log.info("SWAP:Region "+r);
+      Iterator<?> keySet = r.keySet().iterator();
+      while (keySet.hasNext()) {
+        log.info("key:"+keySet.next());
+      }
+    }
+    log.info("loading new person:"+(id));
+    session.beginTransaction();
+    Person p = (Person)session.load(Person.class, id);
+    p.setFirstname("SecondVMfirstname"+id);
+    log.info("loading events");
+    log.info(p.getE()+"");
+    session.getTransaction().commit();
+    //System.in.read();
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml b/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
new file mode 100644
index 0000000..3ec08c9
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements.  See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version 2.0
+	(the "License"); you may not use this file except in compliance with
+	the License.  You may obtain a copy of the License at
+
+	     http://www.apache.org/licenses/LICENSE-2.0
+
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="com.gemstone.gemfire.modules">
+	<class name="Event" table="EVENTS">
+		<cache usage="read-write"/>
+		<id name="id" column="EVENT_ID">
+			<generator class="native"/>
+		</id>
+		<version name="version"/>
+		<property name="date" type="timestamp" column="EVENT_DATE"/>
+        <property name="title"/>
+	</class>
+</hibernate-mapping>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml b/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
new file mode 100644
index 0000000..7c28734
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements.  See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version 2.0
+	(the "License"); you may not use this file except in compliance with
+	the License.  You may obtain a copy of the License at
+
+	     http://www.apache.org/licenses/LICENSE-2.0
+
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="com.gemstone.gemfire.modules">
+    <class name="Person" table="PERSON">
+        <cache usage="read-write"/>
+        <id name="id" column="PERSON_ID">
+        </id>
+        <property name="age"/>
+        <property name="firstname"/>
+        <property name="lastname"/>
+        <set name="e" table="PERSON_EVENT">
+          <cache usage="read-write"/>
+          <key column="PERSON_ID"/>
+          <many-to-many column="EVENT_ID" class="Event"/>
+        </set>
+    </class>
+</hibernate-mapping>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/resources/log4j.properties b/extensions/gemfire-modules-hibernate/src/test/resources/log4j.properties
new file mode 100644
index 0000000..c136990
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/test/resources/log4j.properties
@@ -0,0 +1,16 @@
+# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
+# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
+#log4j.rootLogger=DEBUG, stdout, logfile
+log4j.rootLogger=DEBUG, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
+
+#log4j.appender.logfile=org.apache.log4j.RollingFileAppender
+#log4j.appender.logfile.MaxFileSize=512KB
+## Keep three backup files.
+#log4j.appender.logfile.MaxBackupIndex=3
+## Pattern to output: date priority [category] - message
+#log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
+#log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/build.gradle b/extensions/gemfire-modules-session/build.gradle
new file mode 100644
index 0000000..71d59dc
--- /dev/null
+++ b/extensions/gemfire-modules-session/build.gradle
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dependencies {
+  compile project(':extensions/gemfire-modules')
+  compile project(':gemfire-core')
+
+  testCompile 'javax.servlet:javax.servlet-api:3.1.0'
+  testCompile 'org.slf4j:slf4j-jdk14:1.7.7'
+  testCompile('com.mockrunner:mockrunner-servlet:1.0.8') {
+    exclude group: 'jboss'
+  }
+  testCompile(group: 'org.eclipse.jetty', name: 'jetty-http', version: project.'jetty.version', classifier: 'tests')
+  testCompile(group: 'org.eclipse.jetty', name: 'jetty-servlet', version: project.'jetty.version', classifier: 'tests')
+
+  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+}
+
+jar {
+  include '**/session/filter/**/*'
+  include '**/session/installer/**/*'
+  includeEmptyDirs = false
+  baseName = 'gemfire-modules-session-external'
+
+  manifest {
+    attributes 'Main-Class': 'com.gemstone.gemfire.modules.session.installer.Installer'
+  }
+}
+
+task internalJar(type: Jar) {
+  from sourceSets.main.output
+  include '**/internal/**/*'
+  includeEmptyDirs = false
+  baseName = 'gemfire-modules-session'
+}
+
+assemble.dependsOn(internalJar)


[08/50] [abbrv] incubator-geode git commit: Disable auto-reconnect in the unit test Locator

Posted by kl...@apache.org.
Disable auto-reconnect in the unit test Locator


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4f508622
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4f508622
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4f508622

Branch: refs/heads/feature/GEODE-268
Commit: 4f508622d51b8b903d4e0c3500e51fe9991572c0
Parents: a8263dd
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Feb 5 15:21:00 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Feb 5 15:21:55 2016 -0800

----------------------------------------------------------------------
 .../gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4f508622/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index 5e7fa0e..99548b3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -53,6 +53,7 @@ import batterytest.greplogs.ExpectedStrings;
 import batterytest.greplogs.LogConsumer;
 
 import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.logging.LogService;
@@ -265,8 +266,11 @@ public class DUnitLauncher {
         p.setProperty("enable-cluster-configuration", "false");
         //Tell the locator it's the first in the system for
         //faster boot-up
-        
         System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
+        // disable auto-reconnect - tests fly by so fast that it will never be
+        // able to do so successfully anyway
+        p.setProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+        
         try {
           Locator.startLocatorAndDS(locatorPort, locatorLogFile, p);
         } finally {


[28/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt
new file mode 100755
index 0000000..b41b161
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.1.0.txt
@@ -0,0 +1,472 @@
+open_source_license.txt
+
+Pivotal GemFire Modules 8.1.0 GA
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software packages (or portions thereof) that are distributed with
+this Pivotal Software, Inc. Product.
+
+The Pivotal Product may also include other Pivotal components, which may
+contain additional open source software packages. One or more such
+open_source_licenses.txt files may therefore accompany this Pivotal
+Product.
+
+The Pivotal Product that includes this file does not necessarily use all
+the open source software packages referred to below and may also only
+use portions of a given package.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in
+this document. This list is provided for your convenience; please read
+further if you wish to review the copyright notice(s) and the full text
+of the license associated with each component.
+
+
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from Pivotal's website at
+http://www.pivotal.io/open-source, or by sending a request, 
+with your name and address to: Pivotal Software, Inc., 3496 Deer Creek Rd, 
+Palo Alto, CA 94304, Attention: General Counsel. All such requests should 
+clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. 
+Pivotal shall mail a copy of the Source Files to you on a CD or equivalent physical medium. 
+This offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. 
+Alternatively, the Source Files may accompany the Pivotal product.
+
+
+[GFEHTTPMODULE810GAKD120914]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt
new file mode 100755
index 0000000..9e1ddef
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt
@@ -0,0 +1,471 @@
+open_source_license.txt
+
+VMware vFabric GemFire HTTP Session Management Module 7.0 GA
+	
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------- SECTION 1: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[GFEHTTPMODULE70GAKR100512]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt
new file mode 100755
index 0000000..c510712
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt
@@ -0,0 +1,474 @@
+open_source_license.txt
+
+VMware vFabric GemFire HTTP Session Management Module 7.0.1 GA
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[GFEHTTPMODULE701GAKD021813]


[29/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
GEODE-14: Integration of GemFire Session Replication and Hibernate modules


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/48552465
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/48552465
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/48552465

Branch: refs/heads/feature/GEODE-268
Commit: 48552465c316e271cabd4efd0d7b53a037ed6dcf
Parents: c8251f8
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Dec 30 08:37:43 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:24 2016 -0800

----------------------------------------------------------------------
 .../gemfire-modules-assembly/build.gradle       |  251 +++
 ...e_licenses-Pivotal_GemFire_Modules_7.0.2.txt |  469 ++++++
 ...rce_licenses-Pivotal_GemFire_Modules_8.0.txt |  465 ++++++
 ...e_licenses-Pivotal_GemFire_Modules_8.1.0.txt |  472 ++++++
 ...censes-VMware_vFabric_GemFire_Module_7.0.txt |  471 ++++++
 ...ses-VMware_vFabric_GemFire_Modules_7.0.1.txt |  474 ++++++
 ...re_HTTP_Session_Management_Modules_2.0.1.txt | 1316 +++++++++++++++
 ...Fire_HTTP_Session_Management_Modules_2.0.txt | 1334 +++++++++++++++
 ...re_HTTP_Session_Management_Modules_2.1.1.txt | 1326 +++++++++++++++
 ...Fire_HTTP_Session_Management_Modules_2.1.txt | 1325 +++++++++++++++
 ...icenses-vFabric_GemFire_Modules_7.0.Beta.txt |  471 ++++++
 .../release/conf/cache-client.xml               |   40 +
 .../release/conf/cache-peer.xml                 |   48 +
 .../release/conf/cache-server.xml               |   74 +
 .../release/hibernate/readme.txt                |   14 +
 .../release/scripts/cacheserver.bat             |  133 ++
 .../release/scripts/cacheserver.sh              |  104 ++
 .../release/scripts/gemfire.bat                 |   41 +
 .../release/scripts/gemfire.sh                  |   59 +
 .../release/scripts/setenv.properties           |    6 +
 .../release/session/bin/cacheserver.bat         |   56 +
 .../release/session/bin/cacheserver.sh          |   57 +
 .../release/session/bin/gemfire.bat             |   53 +
 .../release/session/bin/gemfire.sh              |   69 +
 .../release/session/bin/modify_war              |  392 +++++
 .../release/session/bin/setenv.properties       |    6 +
 .../release/session/readme.txt                  |   14 +
 .../gemfire-cs-tomcat-7/context-fragment.xml    |   15 +
 .../tcserver/gemfire-cs-tomcat-7/modules.env    |    1 +
 .../gemfire-cs-tomcat-8/context-fragment.xml    |   15 +
 .../tcserver/gemfire-cs-tomcat-8/modules.env    |    1 +
 .../release/tcserver/gemfire-cs/README.txt      |   14 +
 .../gemfire-cs/configuration-prompts.properties |   17 +
 .../tcserver/gemfire-cs/context-fragment.xml    |   13 +
 .../release/tcserver/gemfire-cs/modules.env     |    1 +
 .../tcserver/gemfire-cs/server-fragment.xml     |   12 +
 .../gemfire-p2p-tomcat-7/context-fragment.xml   |   15 +
 .../tcserver/gemfire-p2p-tomcat-7/modules.env   |    1 +
 .../gemfire-p2p-tomcat-8/context-fragment.xml   |   15 +
 .../tcserver/gemfire-p2p-tomcat-8/modules.env   |    1 +
 .../release/tcserver/gemfire-p2p/README.txt     |   14 +
 .../configuration-prompts.properties            |   21 +
 .../tcserver/gemfire-p2p/context-fragment.xml   |   13 +
 .../release/tcserver/gemfire-p2p/modules.env    |    1 +
 .../tcserver/gemfire-p2p/server-fragment.xml    |   16 +
 .../release/tomcat/readme.txt                   |   14 +
 .../gemfire-modules-hibernate/build.gradle      |   36 +
 .../gemfire/modules/hibernate/EnumType.java     |   58 +
 .../gemfire/modules/hibernate/GemFireCache.java |  238 +++
 .../modules/hibernate/GemFireCacheListener.java |   54 +
 .../modules/hibernate/GemFireCacheProvider.java |  200 +++
 .../hibernate/GemFireQueryCacheFactory.java     |   39 +
 .../modules/hibernate/GemFireRegionFactory.java |  237 +++
 .../modules/hibernate/internal/Access.java      |  257 +++
 .../ClientServerRegionFactoryDelegate.java      |  208 +++
 .../hibernate/internal/CollectionAccess.java    |  224 +++
 .../hibernate/internal/EntityRegionWriter.java  |   87 +
 .../hibernate/internal/EntityVersion.java       |   28 +
 .../hibernate/internal/EntityVersionImpl.java   |   51 +
 .../hibernate/internal/EntityWrapper.java       |   89 +
 .../hibernate/internal/GemFireBaseRegion.java   |  166 ++
 .../internal/GemFireCollectionRegion.java       |   59 +
 .../hibernate/internal/GemFireEntityRegion.java |  187 +++
 .../internal/GemFireQueryResultsRegion.java     |  113 ++
 .../modules/hibernate/internal/KeyWrapper.java  |   93 ++
 .../internal/NonStrictReadWriteAccess.java      |   83 +
 .../hibernate/internal/ReadOnlyAccess.java      |   55 +
 .../hibernate/internal/ReadWriteAccess.java     |   36 +
 .../internal/RegionFactoryDelegate.java         |  153 ++
 .../hibernate/internal/TransactionalAccess.java |   25 +
 .../com/gemstone/gemfire/modules/Event.java     |   67 +
 .../gemfire/modules/HibernateJUnitTest.java     |  410 +++++
 .../com/gemstone/gemfire/modules/Owner.java     |  186 +++
 .../com/gemstone/gemfire/modules/Person.java    |   72 +
 .../gemstone/gemfire/modules/SecondVMTest.java  |   88 +
 .../com/gemstone/gemfire/modules/Event.hbm.xml  |   32 +
 .../com/gemstone/gemfire/modules/Person.hbm.xml |   36 +
 .../src/test/resources/log4j.properties         |   16 +
 extensions/gemfire-modules-session/build.gradle |   51 +
 .../session/filter/SessionCachingFilter.java    |  652 ++++++++
 .../modules/session/filter/SessionListener.java |   51 +
 .../modules/session/installer/Installer.java    |  296 ++++
 .../session/installer/JarClassLoader.java       |  123 ++
 .../session/installer/args/Argument.java        |  275 ++++
 .../session/installer/args/ArgumentHandler.java |   38 +
 .../installer/args/ArgumentProcessor.java       |  397 +++++
 .../session/installer/args/ArgumentValues.java  |  222 +++
 .../installer/args/URLArgumentHandler.java      |   77 +
 .../installer/args/UnknownArgumentHandler.java  |   36 +
 .../session/installer/args/UsageException.java  |   89 +
 .../internal/common/AbstractSessionCache.java   |  102 ++
 .../session/internal/common/CacheProperty.java  |   65 +
 .../common/ClientServerSessionCache.java        |  186 +++
 .../internal/common/PeerToPeerSessionCache.java |  184 +++
 .../session/internal/common/SessionCache.java   |   68 +
 .../common/SessionExpirationCacheListener.java  |   53 +
 .../session/internal/filter/Constants.java      |   30 +
 .../internal/filter/DummySessionManager.java    |  132 ++
 .../internal/filter/GemfireHttpSession.java     |  526 ++++++
 .../filter/GemfireSessionException.java         |   41 +
 .../internal/filter/GemfireSessionManager.java  |  511 ++++++
 .../internal/filter/ListenerEventType.java      |   75 +
 .../session/internal/filter/SessionManager.java |  110 ++
 .../AbstractDeltaSessionAttributes.java         |  107 ++
 .../attributes/AbstractSessionAttributes.java   |  188 +++
 .../internal/filter/attributes/DeltaEvent.java  |  119 ++
 .../DeltaQueuedSessionAttributes.java           |   94 ++
 .../attributes/DeltaSessionAttributes.java      |   75 +
 .../attributes/ImmediateSessionAttributes.java  |   68 +
 .../attributes/QueuedSessionAttributes.java     |   65 +
 .../filter/attributes/SessionAttributes.java    |  120 ++
 .../filter/util/NamedThreadFactory.java         |   68 +
 .../filter/util/ThreadLocalSession.java         |   39 +
 .../internal/filter/util/TypeAwareMap.java      |   50 +
 .../session/internal/jmx/SessionStatistics.java |   78 +
 .../internal/jmx/SessionStatisticsMXBean.java   |   30 +
 .../internal/filter/AbstractListener.java       |   57 +
 .../session/internal/filter/BasicServlet.java   |   52 +
 .../session/internal/filter/Callback.java       |   30 +
 .../internal/filter/CallbackServlet.java        |   91 +
 .../session/internal/filter/CommonTests.java    |  582 +++++++
 .../HttpSessionAttributeListenerImpl.java       |   46 +
 .../filter/HttpSessionBindingListenerImpl.java  |   42 +
 .../filter/HttpSessionListenerImpl.java         |   41 +
 .../filter/HttpSessionListenerImpl2.java        |   43 +
 .../internal/filter/MyServletTester.java        |   38 +
 .../internal/filter/RendezvousManager.java      |   46 +
 .../ServletRequestAttributeListenerImpl.java    |   45 +
 .../filter/ServletRequestListenerImpl.java      |   36 +
 .../SessionReplicationIntegrationJUnitTest.java | 1558 ++++++++++++++++++
 .../filter/SessionReplicationJUnitTest.java     |   53 +
 .../SessionReplicationLocalCacheJUnitTest.java  |   54 +
 .../session/junit/ChildFirstClassLoader.java    |   86 +
 .../modules/session/junit/NamedRunner.java      |  120 ++
 .../session/junit/PerTestClassLoaderRunner.java |  283 ++++
 .../junit/SeparateClassloaderTestRunner.java    |   56 +
 .../src/test/resources/log4j.properties         |   12 +
 extensions/gemfire-modules-tomcat7/build.gradle |   56 +
 .../catalina/Tomcat7DeltaSessionManager.java    |  112 ++
 .../session/Tomcat7SessionsJUnitTest.java       |   35 +
 .../test/resources/tomcat/conf/tomcat-users.xml |    3 +
 .../src/test/resources/tomcat/logs/.gitkeep     |    0
 .../src/test/resources/tomcat/temp/.gitkeep     |    0
 extensions/gemfire-modules/build.gradle         |   42 +
 .../gatewaydelta/AbstractGatewayDeltaEvent.java |   64 +
 .../modules/gatewaydelta/GatewayDelta.java      |   26 +
 .../gatewaydelta/GatewayDeltaCreateEvent.java   |   88 +
 .../gatewaydelta/GatewayDeltaDestroyEvent.java  |   82 +
 .../modules/gatewaydelta/GatewayDeltaEvent.java |   24 +
 ...tewayDeltaEventApplicationCacheListener.java |   67 +
 .../GatewayDeltaForwarderCacheListener.java     |  197 +++
 .../session/bootstrap/AbstractCache.java        |  398 +++++
 .../session/bootstrap/ClientServerCache.java    |   74 +
 .../session/bootstrap/LifecycleTypeAdapter.java |   59 +
 .../session/bootstrap/PeerToPeerCache.java      |   85 +
 .../AbstractCacheLifecycleListener.java         |   68 +
 .../session/catalina/AbstractSessionCache.java  |  113 ++
 .../ClientServerCacheLifecycleListener.java     |   26 +
 .../catalina/ClientServerSessionCache.java      |  252 +++
 .../session/catalina/CommitSessionValve.java    |   68 +
 .../modules/session/catalina/DeltaSession.java  |  597 +++++++
 .../session/catalina/DeltaSessionFacade.java    |   49 +
 .../session/catalina/DeltaSessionManager.java   |  992 +++++++++++
 .../session/catalina/JvmRouteBinderValve.java   |  108 ++
 .../session/catalina/LocalStrings.properties    |   16 +
 .../PeerToPeerCacheLifecycleListener.java       |   29 +
 .../catalina/PeerToPeerSessionCache.java        |  215 +++
 .../modules/session/catalina/SessionCache.java  |   64 +
 .../session/catalina/SessionManager.java        |   48 +
 .../catalina/Tomcat6DeltaSessionManager.java    |   98 ++
 .../callback/LocalSessionCacheLoader.java       |   45 +
 .../callback/LocalSessionCacheWriter.java       |   59 +
 .../SessionExpirationCacheListener.java         |   77 +
 .../internal/DeltaSessionAttributeEvent.java    |   25 +
 .../DeltaSessionAttributeEventBatch.java        |   88 +
 .../DeltaSessionDestroyAttributeEvent.java      |   73 +
 .../internal/DeltaSessionStatistics.java        |   88 +
 .../DeltaSessionUpdateAttributeEvent.java       |   83 +
 .../gemstone/gemfire/modules/util/Banner.java   |   59 +
 .../modules/util/BootstrappingFunction.java     |  188 +++
 .../util/ClassLoaderObjectInputStream.java      |   40 +
 .../gemfire/modules/util/ContextMapper.java     |   53 +
 .../modules/util/CreateRegionFunction.java      |  245 +++
 .../modules/util/DebugCacheListener.java        |   72 +
 .../gemfire/modules/util/ModuleStatistics.java  |   91 +
 .../modules/util/RegionConfiguration.java       |  308 ++++
 .../util/RegionConfigurationCacheListener.java  |  114 ++
 .../gemfire/modules/util/RegionHelper.java      |  241 +++
 .../modules/util/RegionSizeFunction.java        |   56 +
 .../gemfire/modules/util/RegionStatus.java      |   21 +
 .../modules/util/ResourceManagerValidator.java  |  166 ++
 .../modules/util/SessionCustomExpiry.java       |   64 +
 .../TouchPartitionedRegionEntriesFunction.java  |  100 ++
 .../TouchReplicatedRegionEntriesFunction.java   |   97 ++
 .../main/resources/modules-version.properties   |    1 +
 .../gemfire/modules/session/Callback.java       |   30 +
 .../gemfire/modules/session/CommandServlet.java |   91 +
 .../gemfire/modules/session/DualCacheTest.java  |   62 +
 .../gemfire/modules/session/EmbeddedTomcat.java |  193 +++
 .../gemfire/modules/session/QueryCommand.java   |   34 +
 .../modules/session/TestSessionsBase.java       |  489 ++++++
 .../session/Tomcat6SessionsJUnitTest.java       |   35 +
 .../com/gemstone/gemfire/modules/Event.hbm.xml  |   16 +
 .../com/gemstone/gemfire/modules/Person.hbm.xml |   21 +
 .../src/test/resources/log4j.properties         |   16 +
 .../test/resources/tomcat/conf/tomcat-users.xml |    3 +
 .../src/test/resources/tomcat/logs/.gitkeep     |    0
 .../src/test/resources/tomcat/temp/.gitkeep     |    0
 gradle/dependency-versions.properties           |    3 +
 gradle/rat.gradle                               |   15 +-
 settings.gradle                                 |    5 +
 211 files changed, 29906 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/build.gradle b/extensions/gemfire-modules-assembly/build.gradle
new file mode 100644
index 0000000..ba6e489
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/build.gradle
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+configurations {
+  slf4jDeps
+}
+
+configurations {
+  servletApiDeps
+}
+
+dependencies {
+  slf4jDeps 'org.slf4j:slf4j-api:1.7.7'
+  slf4jDeps 'org.slf4j:slf4j-jdk14:1.7.7'
+}
+
+dependencies {
+  servletApiDeps 'javax.servlet:servlet-api:2.5'
+}
+
+jar.enabled = false
+
+def configureTcServerAssembly = {
+  archiveName = "Apache_Geode_Modules-${version}-tcServer.zip"
+
+  // All client-server files
+  into('gemfire-cs/lib') {
+    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
+    from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
+    from configurations.slf4jDeps
+    from('release/3rdparty_license') {
+      include "open_source_licenses*${version}.txt"
+    }
+  }
+  into('gemfire-cs/bin') {
+    from('release/scripts') {
+      include '*'
+    }
+    from('release/tcserver/gemfire-cs') {
+      include 'modules.env'
+    }
+    filter { it.replaceAll('@GEMFIRE_MODULES_VERSION@', version) }
+  }
+  into('gemfire-cs/conf') {
+    from('release/conf') {
+      exclude 'cache-peer.xml'
+    }
+    from('release/tcserver/gemfire-cs') {
+      include 'context-fragment.xml'
+      include 'server-fragment.xml'
+    }
+  }
+  into('gemfire-cs') {
+    from('release/tcserver/gemfire-cs') {
+      include 'configuration-prompts.properties'
+      include 'README.txt'
+      filter { it.replaceAll('@VERSION@', version) }
+    }
+  }
+
+  // Tomncat 7 specifics
+  into('gemfire-cs-tomcat-7/conf') {
+    from('release/tcserver/gemfire-cs-tomcat-7') {
+      include 'context-fragment.xml'
+    }
+  }
+  into('gemfire-cs-tomcat-7/bin') {
+    from('release/tcserver/gemfire-cs-tomcat-7') {
+      include 'modules.env'
+    }
+  }
+  // All peer-to-peer files
+  into('gemfire-p2p/lib') {
+    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
+    from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
+    from configurations.slf4jDeps
+    from('release/3rdparty_license') {
+      include "open_source_licenses*${version}.txt"
+    }
+  }
+  into('gemfire-p2p/bin') {
+    from('release/scripts') {
+      include 'gemfire.*'
+      include 'setenv.properties'
+    }
+    from('release/tcserver/gemfire-p2p') {
+      include 'modules.env'
+    }
+  }
+  into('gemfire-p2p/conf') {
+    from('release/conf') {
+      include 'cache-peer.xml'
+    }
+    from('release/tcserver/gemfire-p2p') {
+      include 'context-fragment.xml'
+      include 'server-fragment.xml'
+    }
+  }
+  into('gemfire-p2p') {
+    from('release/tcserver/gemfire-p2p') {
+      include 'configuration-prompts.properties'
+      include 'README.txt'
+      filter { it.replaceAll('@VERSION@', version) }
+    }
+  }
+
+  // Tomncat 7 specifics
+  into('gemfire-p2p-tomcat-7/conf') {
+    from('release/tcserver/gemfire-p2p-tomcat-7') {
+      include 'context-fragment.xml'
+    }
+  }
+  into('gemfire-p2p-tomcat-7/bin') {
+    from('release/tcserver/gemfire-p2p-tomcat-7') {
+      include 'modules.env'
+    }
+  }
+}
+
+def configureTcServer30Assembly = {
+  archiveName = "Apache_Geode_Modules-${version}-tcServer30.zip"
+
+  into('gemfire-cs-tomcat-8/bin') {
+    from('release/tcserver/gemfire-cs-tomcat-8') {
+      include 'modules.env'
+    }
+  }
+  into('gemfire-cs-tomcat-8/conf') {
+    from('release/tcserver/gemfire-cs-tomcat-8') {
+      include 'context-fragment.xml'
+    }
+  }
+
+  into('gemfire-p2p-tomcat-8/bin') {
+    from('release/tcserver/gemfire-p2p-tomcat-8') {
+      include 'modules.env'
+    }
+  }
+  into('gemfire-p2p-tomcat-8/conf') {
+    from('release/tcserver/gemfire-p2p-tomcat-8') {
+      include 'context-fragment.xml'
+    }
+  }
+}
+
+task distTomcat(type: Zip) {
+  archiveName = "Apache_Geode_Modules-${version}-Tomcat.zip"
+
+  // All client-server files
+  into('lib') {
+    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
+    from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
+    from configurations.slf4jDeps
+    from('release/3rdparty_license') {
+      include "open_source_licenses*${version}.txt"
+    }
+  }
+  into('bin') {
+    from('release/scripts') {
+      include '*'
+      exclude 'setenv.properties'
+    }
+  }
+  into('conf') {
+    from('release/conf') {
+      include '*'
+    }
+  }
+
+  from('release/tomcat') {
+    include 'readme.txt'
+    filter { it.replaceAll('@VERSION@', version) }
+  }
+}
+
+task distHibernate(type: Zip) {
+  archiveName = "Apache_Geode_Modules-${version}-Hibernate.zip"
+
+  into('lib') {
+    from project(':extensions/gemfire-modules-hibernate').configurations.archives.allArtifacts.files
+  }
+  from('release/hibernate') {
+    include 'readme.txt'
+    filter { it.replaceAll('@VERSION@', version) }
+  }
+}
+
+task distAppServer(type: Zip) {
+  archiveName = "Apache_Geode_Modules-${version}-AppServer.zip"
+
+  into('lib') {
+    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
+    from project(':extensions/gemfire-modules-session').configurations.archives.allArtifacts.files
+//    from project(':extensions/gemfire-modules-session-external').configurations.archives.allArtifacts.files
+    from configurations.slf4jDeps
+    from configurations.servletApiDeps
+    from('release/3rdparty_license') {
+      include "open_source_licenses*${version}.txt"
+    }
+  }
+
+  into('bin') {
+    from('release/session/bin/') {
+      include 'setenv.properties'
+      include 'modify_war'
+      include 'cacheserver.*'
+      include 'gemfire.*'
+
+      def slf4j_version = '1.7.7'
+      def servlet_api_version = '2.5'
+      filter { it.replaceAll('@GEMFIRE_MODULES_VERSION@', version) }
+      filter { it.replaceAll('@SLF4J_VERSION@', "${slf4j_version}") }
+      filter { it.replaceAll('@SERVLET_API_VERSION@', "${servlet_api_version}") }
+      filter { it.replaceAll('@GEMFIRE_VERSION@', version) }
+    }
+  }
+
+  into('conf') {
+    from('release/conf')
+  }
+
+  from('release/session') {
+    include 'readme.txt'
+    filter { it.replaceAll('@VERSION@', version) }
+  }
+}
+
+task distTcServer(type: Zip, dependsOn: 'build') {
+  configure(configureTcServerAssembly)
+}
+
+task distTcServer30(type: Zip, dependsOn: 'build') {
+  configure(configureTcServerAssembly)
+  configure(configureTcServer30Assembly)
+}
+
+task dist(type: Task, dependsOn: ['distTcServer', 'distTcServer30', 'distTomcat', 'distHibernate', 'distAppServer'])

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt
new file mode 100755
index 0000000..f651b10
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_7.0.2.txt
@@ -0,0 +1,469 @@
+open_source_license.txt
+
+Pivotal GemFire Modules 7.0.2 GA
+
+
+================================================================
+The following copyright statements and licenses apply to various 
+open source software packages (or portions thereof) that are 
+distributed with this Pivotal, Inc. Product.
+
+The Pivotal Product may also include other Pivotal components, 
+which may contain additional open source software packages. One or 
+more such open_source_licenses.txt files may therefore accompany 
+this Pivotal Product.
+
+The Pivotal Product that includes this file does not necessarily use 
+all the open source software packages referred to below and may also 
+only use portions of a given package.
+
+=================================================================
+TABLE OF CONTENTS
+=================================================================
+The following is a listing of the open source components detailed 
+in this document. This list is provided for your convenience; 
+please read further if you wish to review the copyright notice(s) 
+and the full text of the license associated with each component.
+
+
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from Pivotal�s website at
+http://www.gopivotal.com/open-source, or by sending a request, with your name and address 
+to: Pivotal Software, Inc., 1900 S. Norfolk Street #125, San Mateo, CA 94403, 
+Attention: General Counsel. All such requests should clearly 
+specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. Pivotal shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. 
+Alternatively, the Source Files may accompany the Pivotal product.
+
+[GFEHTTPMODULE702GASS010814]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt
new file mode 100755
index 0000000..5eb37cb
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-Pivotal_GemFire_Modules_8.0.txt
@@ -0,0 +1,465 @@
+open_source_license.txt
+
+Pivotal GemFire Modules 8.0.0 GA
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software packages (or portions thereof) that are distributed with
+this Pivotal Software, Inc. Product.
+
+The Pivotal Product may also include other Pivotal components, which may
+contain additional open source software packages. One or more such
+open_source_licenses.txt files may therefore accompany this Pivotal
+Product.
+
+The Pivotal Product that includes this file does not necessarily use all
+the open source software packages referred to below and may also only
+use portions of a given package.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in
+this document. This list is provided for your convenience; please read
+further if you wish to review the copyright notice(s) and the full text
+of the license associated with each component.
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Common Development and Distribution License, V1.0
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from Pivotal's website at
+http://www.gopivotal.com/open-source, or by sending a request, 
+with your name and address to: Pivotal Software, Inc., 3496 Deer Creek Rd, 
+Palo Alto, CA 94304, Attention: General Counsel. All such requests should 
+clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. 
+Pivotal shall mail a copy of the Source Files to you on a CD or equivalent physical medium. 
+This offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. 
+Alternatively, the Source Files may accompany the Pivotal product.
+
+[GFEHTTPMODULE800GASS072814]


[50/50] [abbrv] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into feature/GEODE-268

Posted by kl...@apache.org.
Merge remote-tracking branch 'origin/develop' into feature/GEODE-268


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/df48db64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/df48db64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/df48db64

Branch: refs/heads/feature/GEODE-268
Commit: df48db64cf50159a8578202ee1efbd50eb1d8d5b
Parents: 21fb6a3 0daf181
Author: Kirk Lund <kl...@pivotal.io>
Authored: Mon Feb 8 17:26:25 2016 -0800
Committer: Kirk Lund <kl...@pivotal.io>
Committed: Mon Feb 8 17:26:25 2016 -0800

----------------------------------------------------------------------
 .gitignore                                      |     7 +-
 DISCLAIMER                                      |     6 +
 KEYS                                            |   236 +
 LICENSE                                         |   361 +
 LICENSE.txt                                     |   202 -
 NOTICE                                          |   336 +-
 README.md                                       |     9 +-
 build.gradle                                    |   433 +-
 .../gemfire-modules-assembly/build.gradle       |   240 +
 .../release/conf/cache-client.xml               |    40 +
 .../release/conf/cache-peer.xml                 |    48 +
 .../release/conf/cache-server.xml               |    74 +
 .../release/scripts/cacheserver.bat             |   133 +
 .../release/scripts/cacheserver.sh              |    97 +
 .../release/scripts/gemfire.bat                 |    41 +
 .../release/scripts/gemfire.sh                  |    58 +
 .../release/scripts/setenv.properties           |     6 +
 .../release/session/bin/cacheserver.bat         |    56 +
 .../release/session/bin/cacheserver.sh          |    57 +
 .../release/session/bin/gemfire.bat             |    53 +
 .../release/session/bin/gemfire.sh              |    69 +
 .../release/session/bin/modify_war              |   392 +
 .../release/session/bin/setenv.properties       |     6 +
 .../gemfire-cs-tomcat-7/context-fragment.xml    |    15 +
 .../tcserver/gemfire-cs-tomcat-7/modules.env    |     1 +
 .../gemfire-cs-tomcat-8/context-fragment.xml    |    15 +
 .../tcserver/gemfire-cs-tomcat-8/modules.env    |     1 +
 .../gemfire-cs/configuration-prompts.properties |    17 +
 .../tcserver/gemfire-cs/context-fragment.xml    |    13 +
 .../release/tcserver/gemfire-cs/modules.env     |     1 +
 .../tcserver/gemfire-cs/server-fragment.xml     |    12 +
 .../gemfire-p2p-tomcat-7/context-fragment.xml   |    15 +
 .../tcserver/gemfire-p2p-tomcat-7/modules.env   |     1 +
 .../gemfire-p2p-tomcat-8/context-fragment.xml   |    15 +
 .../tcserver/gemfire-p2p-tomcat-8/modules.env   |     1 +
 .../configuration-prompts.properties            |    19 +
 .../tcserver/gemfire-p2p/context-fragment.xml   |    13 +
 .../release/tcserver/gemfire-p2p/modules.env    |     1 +
 .../tcserver/gemfire-p2p/server-fragment.xml    |    14 +
 .../gemfire-modules-hibernate/build.gradle      |    33 +
 .../gemfire/modules/hibernate/EnumType.java     |    58 +
 .../gemfire/modules/hibernate/GemFireCache.java |   238 +
 .../modules/hibernate/GemFireCacheListener.java |    54 +
 .../modules/hibernate/GemFireCacheProvider.java |   200 +
 .../hibernate/GemFireQueryCacheFactory.java     |    39 +
 .../modules/hibernate/GemFireRegionFactory.java |   237 +
 .../modules/hibernate/internal/Access.java      |   257 +
 .../ClientServerRegionFactoryDelegate.java      |   208 +
 .../hibernate/internal/CollectionAccess.java    |   224 +
 .../hibernate/internal/EntityRegionWriter.java  |    87 +
 .../hibernate/internal/EntityVersion.java       |    28 +
 .../hibernate/internal/EntityVersionImpl.java   |    51 +
 .../hibernate/internal/EntityWrapper.java       |    89 +
 .../hibernate/internal/GemFireBaseRegion.java   |   166 +
 .../internal/GemFireCollectionRegion.java       |    59 +
 .../hibernate/internal/GemFireEntityRegion.java |   187 +
 .../internal/GemFireQueryResultsRegion.java     |   113 +
 .../modules/hibernate/internal/KeyWrapper.java  |    93 +
 .../internal/NonStrictReadWriteAccess.java      |    83 +
 .../hibernate/internal/ReadOnlyAccess.java      |    55 +
 .../hibernate/internal/ReadWriteAccess.java     |    36 +
 .../internal/RegionFactoryDelegate.java         |   153 +
 .../hibernate/internal/TransactionalAccess.java |    25 +
 .../com/gemstone/gemfire/modules/Event.java     |    67 +
 .../gemfire/modules/HibernateJUnitTest.java     |   410 +
 .../com/gemstone/gemfire/modules/Owner.java     |   186 +
 .../com/gemstone/gemfire/modules/Person.java    |    72 +
 .../gemstone/gemfire/modules/SecondVMTest.java  |    93 +
 .../com/gemstone/gemfire/modules/Event.hbm.xml  |    32 +
 .../com/gemstone/gemfire/modules/Person.hbm.xml |    36 +
 .../src/test/resources/log4j.properties         |    16 +
 extensions/gemfire-modules-session/build.gradle |    50 +
 .../session/filter/SessionCachingFilter.java    |   652 +
 .../modules/session/filter/SessionListener.java |    51 +
 .../modules/session/installer/Installer.java    |   296 +
 .../session/installer/JarClassLoader.java       |   123 +
 .../session/installer/args/Argument.java        |   275 +
 .../session/installer/args/ArgumentHandler.java |    38 +
 .../installer/args/ArgumentProcessor.java       |   397 +
 .../session/installer/args/ArgumentValues.java  |   222 +
 .../installer/args/URLArgumentHandler.java      |    77 +
 .../installer/args/UnknownArgumentHandler.java  |    36 +
 .../session/installer/args/UsageException.java  |    89 +
 .../internal/common/AbstractSessionCache.java   |   102 +
 .../session/internal/common/CacheProperty.java  |    65 +
 .../common/ClientServerSessionCache.java        |   186 +
 .../internal/common/PeerToPeerSessionCache.java |   184 +
 .../session/internal/common/SessionCache.java   |    68 +
 .../common/SessionExpirationCacheListener.java  |    53 +
 .../session/internal/filter/Constants.java      |    30 +
 .../internal/filter/DummySessionManager.java    |   132 +
 .../internal/filter/GemfireHttpSession.java     |   526 +
 .../filter/GemfireSessionException.java         |    41 +
 .../internal/filter/GemfireSessionManager.java  |   511 +
 .../internal/filter/ListenerEventType.java      |    75 +
 .../session/internal/filter/SessionManager.java |   110 +
 .../AbstractDeltaSessionAttributes.java         |   107 +
 .../attributes/AbstractSessionAttributes.java   |   188 +
 .../internal/filter/attributes/DeltaEvent.java  |   119 +
 .../DeltaQueuedSessionAttributes.java           |    94 +
 .../attributes/DeltaSessionAttributes.java      |    75 +
 .../attributes/ImmediateSessionAttributes.java  |    68 +
 .../attributes/QueuedSessionAttributes.java     |    65 +
 .../filter/attributes/SessionAttributes.java    |   120 +
 .../filter/util/NamedThreadFactory.java         |    68 +
 .../filter/util/ThreadLocalSession.java         |    39 +
 .../internal/filter/util/TypeAwareMap.java      |    50 +
 .../session/internal/jmx/SessionStatistics.java |    78 +
 .../internal/jmx/SessionStatisticsMXBean.java   |    30 +
 .../internal/filter/AbstractListener.java       |    57 +
 .../session/internal/filter/BasicServlet.java   |    52 +
 .../session/internal/filter/Callback.java       |    30 +
 .../internal/filter/CallbackServlet.java        |    91 +
 .../session/internal/filter/CommonTests.java    |   582 +
 .../HttpSessionAttributeListenerImpl.java       |    46 +
 .../filter/HttpSessionBindingListenerImpl.java  |    42 +
 .../filter/HttpSessionListenerImpl.java         |    41 +
 .../filter/HttpSessionListenerImpl2.java        |    43 +
 .../internal/filter/MyServletTester.java        |    38 +
 .../internal/filter/RendezvousManager.java      |    46 +
 .../ServletRequestAttributeListenerImpl.java    |    45 +
 .../filter/ServletRequestListenerImpl.java      |    36 +
 .../SessionReplicationIntegrationJUnitTest.java |  1558 ++
 .../filter/SessionReplicationJUnitTest.java     |    53 +
 .../SessionReplicationLocalCacheJUnitTest.java  |    54 +
 .../session/junit/ChildFirstClassLoader.java    |    86 +
 .../modules/session/junit/NamedRunner.java      |   120 +
 .../session/junit/PerTestClassLoaderRunner.java |   283 +
 .../junit/SeparateClassloaderTestRunner.java    |    56 +
 .../src/test/resources/log4j.properties         |    12 +
 extensions/gemfire-modules-tomcat7/build.gradle |    54 +
 .../catalina/Tomcat7DeltaSessionManager.java    |   112 +
 .../session/Tomcat7SessionsJUnitTest.java       |    35 +
 .../test/resources/tomcat/conf/tomcat-users.xml |     3 +
 .../src/test/resources/tomcat/logs/.gitkeep     |     0
 .../src/test/resources/tomcat/temp/.gitkeep     |     0
 extensions/gemfire-modules/build.gradle         |    39 +
 .../gatewaydelta/AbstractGatewayDeltaEvent.java |    64 +
 .../modules/gatewaydelta/GatewayDelta.java      |    26 +
 .../gatewaydelta/GatewayDeltaCreateEvent.java   |    88 +
 .../gatewaydelta/GatewayDeltaDestroyEvent.java  |    82 +
 .../modules/gatewaydelta/GatewayDeltaEvent.java |    24 +
 ...tewayDeltaEventApplicationCacheListener.java |    67 +
 .../GatewayDeltaForwarderCacheListener.java     |   197 +
 .../session/bootstrap/AbstractCache.java        |   398 +
 .../session/bootstrap/ClientServerCache.java    |    74 +
 .../session/bootstrap/LifecycleTypeAdapter.java |    59 +
 .../session/bootstrap/PeerToPeerCache.java      |    85 +
 .../AbstractCacheLifecycleListener.java         |    68 +
 .../session/catalina/AbstractSessionCache.java  |   113 +
 .../ClientServerCacheLifecycleListener.java     |    26 +
 .../catalina/ClientServerSessionCache.java      |   252 +
 .../session/catalina/CommitSessionValve.java    |    68 +
 .../modules/session/catalina/DeltaSession.java  |   597 +
 .../session/catalina/DeltaSessionFacade.java    |    49 +
 .../session/catalina/DeltaSessionManager.java   |   992 +
 .../session/catalina/JvmRouteBinderValve.java   |   108 +
 .../session/catalina/LocalStrings.properties    |    16 +
 .../PeerToPeerCacheLifecycleListener.java       |    29 +
 .../catalina/PeerToPeerSessionCache.java        |   215 +
 .../modules/session/catalina/SessionCache.java  |    64 +
 .../session/catalina/SessionManager.java        |    48 +
 .../catalina/Tomcat6DeltaSessionManager.java    |    98 +
 .../callback/LocalSessionCacheLoader.java       |    45 +
 .../callback/LocalSessionCacheWriter.java       |    59 +
 .../SessionExpirationCacheListener.java         |    77 +
 .../internal/DeltaSessionAttributeEvent.java    |    25 +
 .../DeltaSessionAttributeEventBatch.java        |    88 +
 .../DeltaSessionDestroyAttributeEvent.java      |    73 +
 .../internal/DeltaSessionStatistics.java        |    88 +
 .../DeltaSessionUpdateAttributeEvent.java       |    83 +
 .../gemstone/gemfire/modules/util/Banner.java   |    59 +
 .../modules/util/BootstrappingFunction.java     |   188 +
 .../util/ClassLoaderObjectInputStream.java      |    40 +
 .../gemfire/modules/util/ContextMapper.java     |    53 +
 .../modules/util/CreateRegionFunction.java      |   245 +
 .../modules/util/DebugCacheListener.java        |    72 +
 .../gemfire/modules/util/ModuleStatistics.java  |    91 +
 .../modules/util/RegionConfiguration.java       |   308 +
 .../util/RegionConfigurationCacheListener.java  |   114 +
 .../gemfire/modules/util/RegionHelper.java      |   241 +
 .../modules/util/RegionSizeFunction.java        |    56 +
 .../gemfire/modules/util/RegionStatus.java      |    21 +
 .../modules/util/ResourceManagerValidator.java  |   166 +
 .../modules/util/SessionCustomExpiry.java       |    64 +
 .../TouchPartitionedRegionEntriesFunction.java  |   100 +
 .../TouchReplicatedRegionEntriesFunction.java   |    97 +
 .../main/resources/modules-version.properties   |     1 +
 .../gemfire/modules/session/Callback.java       |    30 +
 .../gemfire/modules/session/CommandServlet.java |    91 +
 .../gemfire/modules/session/EmbeddedTomcat.java |   193 +
 .../gemfire/modules/session/QueryCommand.java   |    34 +
 .../modules/session/TestSessionsBase.java       |   493 +
 .../session/Tomcat6SessionsJUnitTest.java       |    35 +
 .../com/gemstone/gemfire/modules/Event.hbm.xml  |    16 +
 .../com/gemstone/gemfire/modules/Person.hbm.xml |    21 +
 .../src/test/resources/log4j.properties         |    16 +
 .../test/resources/tomcat/conf/tomcat-users.xml |     3 +
 .../src/test/resources/tomcat/logs/.gitkeep     |     0
 .../src/test/resources/tomcat/temp/.gitkeep     |     0
 gemfire-assembly/build.gradle                   |   255 +-
 gemfire-assembly/src/main/dist/DISCLAIMER       |     6 +
 gemfire-assembly/src/main/dist/LICENSE          |   429 +
 gemfire-assembly/src/main/dist/NOTICE           |   467 +
 gemfire-assembly/src/main/dist/bin/gfsh         |    14 +
 .../src/main/dist/bin/gfsh-completion.bash      |    15 +
 gemfire-assembly/src/main/dist/bin/gfsh.bat     |    14 +
 .../LocatorLauncherAssemblyJUnitTest.java       |   157 +
 .../management/internal/AgentUtilJUnitTest.java |    25 +-
 .../LauncherLifecycleCommandsDUnitTest.java     |  1005 +
 .../LauncherLifecycleCommandsJUnitTest.java     |   625 +
 .../SharedConfigurationEndToEndDUnitTest.java   |   444 +
 gemfire-common/build.gradle                     |    19 +-
 .../gemfire/annotations/Experimental.java       |    16 +
 .../annotations/ExperimentalJUnitTest.java      |    16 +
 .../ClassInExperimentalPackage.java             |    16 +
 .../experimentalpackage/package-info.java       |    16 +
 .../ClassInNonExperimentalPackage.java          |    16 +
 .../nonexperimentalpackage/package-info.java    |    16 +
 gemfire-core/build.gradle                       |    36 +-
 gemfire-core/src/jca/ra.xml                     |    17 +-
 .../com/gemstone/gemfire/SystemFailure.java     |    53 +-
 .../com/gemstone/gemfire/admin/AdminConfig.java |     2 +-
 .../gemfire/admin/AdminDistributedSystem.java   |     7 +-
 .../admin/AdminDistributedSystemFactory.java    |     2 +-
 .../gemstone/gemfire/admin/AdminException.java  |     2 +-
 .../gemfire/admin/AdminXmlException.java        |     2 +-
 .../java/com/gemstone/gemfire/admin/Alert.java  |     2 +-
 .../com/gemstone/gemfire/admin/AlertLevel.java  |     2 +-
 .../gemstone/gemfire/admin/AlertListener.java   |     2 +-
 .../gemstone/gemfire/admin/BackupStatus.java    |     2 +-
 .../admin/CacheDoesNotExistException.java       |     2 +-
 .../gemfire/admin/CacheHealthConfig.java        |     2 +-
 .../com/gemstone/gemfire/admin/CacheVm.java     |     2 +-
 .../gemstone/gemfire/admin/CacheVmConfig.java   |     2 +-
 .../gemfire/admin/ConfigurationParameter.java   |     2 +-
 .../gemfire/admin/DistributedSystemConfig.java  |     2 +-
 .../admin/DistributedSystemHealthConfig.java    |     2 +-
 .../gemfire/admin/DistributionLocator.java      |     2 +-
 .../admin/DistributionLocatorConfig.java        |     2 +-
 .../gemstone/gemfire/admin/GemFireHealth.java   |     2 +-
 .../gemfire/admin/GemFireHealthConfig.java      |     2 +-
 .../gemfire/admin/GemFireMemberStatus.java      |     2 +-
 .../gemstone/gemfire/admin/ManagedEntity.java   |     2 +-
 .../gemfire/admin/ManagedEntityConfig.java      |     2 +-
 .../gemfire/admin/MemberHealthConfig.java       |     2 +-
 .../admin/OperationCancelledException.java      |     2 +-
 .../gemfire/admin/RegionNotFoundException.java  |     2 +-
 .../gemfire/admin/RegionSubRegionSnapshot.java  |     2 +-
 .../gemfire/admin/RuntimeAdminException.java    |     2 +-
 .../com/gemstone/gemfire/admin/Statistic.java   |     2 +-
 .../gemfire/admin/StatisticResource.java        |     2 +-
 .../gemstone/gemfire/admin/SystemMember.java    |     2 +-
 .../gemfire/admin/SystemMemberCache.java        |     2 +-
 .../gemfire/admin/SystemMemberCacheEvent.java   |     2 +-
 .../admin/SystemMemberCacheListener.java        |     2 +-
 .../gemfire/admin/SystemMemberCacheServer.java  |     2 +-
 .../gemfire/admin/SystemMemberRegion.java       |     2 +-
 .../gemfire/admin/SystemMemberRegionEvent.java  |     2 +-
 .../gemfire/admin/SystemMemberType.java         |     2 +-
 .../gemfire/admin/SystemMembershipEvent.java    |     2 +-
 .../gemfire/admin/SystemMembershipListener.java |     2 +-
 .../UnmodifiableConfigurationException.java     |     2 +-
 .../internal/AdminDistributedSystemImpl.java    |     3 -
 .../DistributedSystemHealthEvaluator.java       |     2 +-
 .../gemfire/admin/internal/package.html         |    20 +-
 .../com/gemstone/gemfire/admin/jmx/Agent.java   |     2 +-
 .../gemstone/gemfire/admin/jmx/AgentConfig.java |     2 +-
 .../gemfire/admin/jmx/AgentFactory.java         |     2 +-
 .../gemfire/admin/jmx/internal/AgentImpl.java   |    15 +-
 .../internal/GemFireHealthConfigJmxImpl.java    |    14 +-
 .../jmx/internal/RMIRegistryServiceMBean.java   |     2 +-
 .../gemfire/admin/jmx/internal/package.html     |    22 +-
 .../com/gemstone/gemfire/admin/jmx/package.html |    16 +
 .../com/gemstone/gemfire/admin/package.html     |    16 +
 .../gemfire/cache/AttributesMutator.java        |    11 +-
 .../java/com/gemstone/gemfire/cache/Cache.java  |     3 +-
 .../gemstone/gemfire/cache/CacheFactory.java    |     2 -
 .../gemfire/cache/CacheTransactionManager.java  |     2 +-
 .../com/gemstone/gemfire/cache/DataPolicy.java  |     1 -
 .../gemfire/cache/DiskStoreFactory.java         |     3 -
 .../gemstone/gemfire/cache/RegionFactory.java   |     2 -
 .../internal/ParallelAsyncEventQueueImpl.java   |     8 +-
 .../internal/SerialAsyncEventQueueImpl.java     |     8 +-
 .../gemfire/cache/client/ClientCache.java       |     4 +-
 .../cache/client/ClientCacheFactory.java        |     2 +-
 .../client/doc-files/example-client-cache.xml   |    16 +
 .../internal/AutoConnectionSourceImpl.java      |     2 +-
 .../cache/client/internal/ConnectionImpl.java   |     5 +-
 .../gemfire/cache/client/internal/package.html  |    16 +
 .../gemstone/gemfire/cache/client/package.html  |    15 +
 .../cache/control/RebalanceOperation.java       |     2 +-
 .../gemfire/cache/control/ResourceManager.java  |     2 +-
 .../gemstone/gemfire/cache/control/package.html |    16 +
 .../gemfire/cache/doc-files/example-cache.xml   |    16 +
 .../gemfire/cache/doc-files/example2-cache.xml  |    17 +
 .../gemfire/cache/doc-files/example3-cache.xml  |    16 +
 .../gemfire/cache/execute/ResultSender.java     |     9 +-
 .../gemstone/gemfire/cache/execute/package.html |    15 +
 .../gemfire/cache/hdfs/HDFSStoreFactory.java    |     2 +-
 .../org/apache/hadoop/io/SequenceFile.java      |    24 +-
 .../internal/GetOperationContextImpl.java       |     2 +-
 .../gemfire/cache/operations/package.html       |    16 +
 .../com/gemstone/gemfire/cache/package.html     |    99 +-
 .../cache/partition/PartitionManager.java       |   377 -
 .../gemfire/cache/partition/package.html        |    16 +
 .../gemfire/cache/query/QueryService.java       |     6 +-
 .../cache/query/internal/CompiledIn.java        |   106 +-
 .../cache/query/internal/CompiledOperation.java |     4 +-
 .../query/internal/CompiledSortCriterion.java   |    11 -
 .../cache/query/internal/DefaultQuery.java      |     8 +-
 .../cache/query/internal/QueryMonitor.java      |    22 +-
 .../query/internal/index/AbstractIndex.java     |     6 +-
 .../query/internal/index/CompactRangeIndex.java |    10 +-
 .../query/internal/index/DummyQRegion.java      |     2 +-
 .../cache/query/internal/index/HashIndex.java   |   178 +-
 .../query/internal/index/HashIndexSet.java      |  1086 +-
 .../query/internal/index/HashIndexStrategy.java |    90 -
 .../query/internal/index/MemoryIndexStore.java  |   100 +-
 .../query/internal/index/PartitionedIndex.java  |     2 +-
 .../cache/query/internal/index/package.html     |    16 +
 .../gemfire/cache/query/internal/package.html   |    16 +
 .../cache/query/internal/parse/fixantlr.sh      |    15 +
 .../gemfire/cache/query/internal/parse/oql.g    |    17 +
 .../gemstone/gemfire/cache/query/package.html   |    16 +
 .../gemstone/gemfire/cache/server/package.html  |    17 +-
 .../gemfire/cache/snapshot/package.html         |    17 +-
 .../gemstone/gemfire/cache/util/package.html    |    15 +
 .../gemfire/compression/SnappyCompressor.java   |     3 +-
 .../gemfire/distributed/AbstractLauncher.java   |     2 +-
 .../gemfire/distributed/DistributedSystem.java  |   209 +-
 .../gemfire/distributed/LocatorLauncher.java    |    13 +
 .../gemfire/distributed/internal/DMStats.java   |    81 +
 .../distributed/internal/DistributedState.java  |   143 -
 .../internal/DistributionAdvisor.java           |     2 +-
 .../internal/DistributionChannel.java           |     2 +-
 .../internal/DistributionConfigImpl.java        |     2 +-
 .../internal/DistributionManager.java           |    87 +-
 .../internal/DistributionMessage.java           |     2 +-
 .../distributed/internal/DistributionStats.java |   240 +
 .../internal/ForceDisconnectOperation.java      |    42 -
 .../internal/HighPriorityAckedMessage.java      |     4 +-
 .../internal/InternalDistributedSystem.java     |    66 +-
 .../distributed/internal/InternalLocator.java   |    37 +-
 .../internal/LonerDistributionManager.java      |    70 +-
 .../internal/MembershipListener.java            |     3 +-
 .../distributed/internal/ProductUseLog.java     |     2 +-
 .../distributed/internal/ReplyProcessor21.java  |     9 +-
 .../distributed/internal/ServerLocator.java     |     2 +-
 .../internal/SharedConfiguration.java           |     1 +
 .../distributed/internal/StartupMessage.java    |    32 -
 .../internal/StartupMessageData.java            |     4 +-
 .../distributed/internal/StartupOperation.java  |     1 -
 .../internal/StartupResponseMessage.java        |    16 -
 .../internal/deadlock/DeadlockDetector.java     |     2 +-
 .../internal/deadlock/UnsafeThreadLocal.java    |     1 -
 .../internal/direct/DirectChannel.java          |   114 +-
 .../internal/direct/DirectChannelListener.java  |    38 +
 .../internal/direct/MissingStubException.java   |    37 -
 .../internal/direct/ShunnedMemberException.java |    34 +
 .../internal/distribution-overview.html         |    16 +
 .../internal/locks/DLockGrantor.java            |    40 +-
 .../distributed/internal/locks/package.html     |    16 +
 .../DistributedMembershipListener.java          |    16 +-
 .../membership/InternalDistributedMember.java   |    33 +-
 .../internal/membership/MemberAttributes.java   |   131 +-
 .../internal/membership/MemberFactory.java      |     8 -
 .../internal/membership/MemberServices.java     |     7 -
 .../internal/membership/MembershipManager.java  |    60 +-
 .../internal/membership/NetMember.java          |     4 +
 .../internal/membership/NetView.java            |    75 +-
 .../internal/membership/gms/GMSMember.java      |    78 +-
 .../membership/gms/GMSMemberFactory.java        |    12 +-
 .../internal/membership/gms/GMSUtil.java        |    35 +
 .../internal/membership/gms/NetLocator.java     |    16 +
 .../internal/membership/gms/ServiceConfig.java  |    37 +-
 .../internal/membership/gms/Services.java       |    28 +-
 .../internal/membership/gms/SuspectMember.java  |     9 +-
 .../membership/gms/auth/GMSAuthenticator.java   |    18 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |   454 +-
 .../gms/interfaces/Authenticator.java           |    16 +
 .../gms/interfaces/HealthMonitor.java           |    17 +-
 .../membership/gms/interfaces/JoinLeave.java    |    16 +
 .../membership/gms/interfaces/Locator.java      |    16 +
 .../membership/gms/interfaces/Manager.java      |    17 +-
 .../gms/interfaces/MessageHandler.java          |    16 +
 .../membership/gms/interfaces/Messenger.java    |    38 +
 .../membership/gms/interfaces/Service.java      |    19 +-
 .../gms/locator/FindCoordinatorRequest.java     |    49 +
 .../gms/locator/FindCoordinatorResponse.java    |    17 +-
 .../membership/gms/locator/GMSLocator.java      |    16 +
 .../membership/gms/locator/GetViewRequest.java  |    16 +
 .../membership/gms/locator/GetViewResponse.java |    16 +
 .../gms/locator/PeerLocatorRequest.java         |    16 +
 .../membership/gms/membership/GMSJoinLeave.java |   539 +-
 .../membership/gms/messages/HasMemberID.java    |    16 +
 .../gms/messages/HeartbeatMessage.java          |    18 +-
 .../gms/messages/HeartbeatRequestMessage.java   |    18 +-
 .../gms/messages/InstallViewMessage.java        |    18 +-
 .../gms/messages/JoinRequestMessage.java        |    16 +
 .../gms/messages/JoinResponseMessage.java       |    26 +-
 .../gms/messages/LeaveRequestMessage.java       |    16 +
 .../gms/messages/NetworkPartitionMessage.java   |    16 +
 .../gms/messages/RemoveMemberMessage.java       |    16 +
 .../gms/messages/SuspectMembersMessage.java     |    16 +
 .../membership/gms/messages/SuspectRequest.java |    18 +-
 .../membership/gms/messages/ViewAckMessage.java |    18 +-
 .../gms/messenger/AddressManager.java           |    37 +-
 .../membership/gms/messenger/GMSPingPonger.java |    38 +-
 .../gms/messenger/GMSQuorumChecker.java         |    16 +
 .../membership/gms/messenger/JGAddress.java     |    39 +-
 .../gms/messenger/JGroupsMessenger.java         |   512 +-
 .../membership/gms/messenger/StatRecorder.java  |    16 +
 .../membership/gms/messenger/Transport.java     |   101 +-
 .../gms/mgr/GMSMembershipManager.java           |   634 +-
 .../internal/membership/gms/package.html        |    16 +
 .../gemfire/distributed/internal/package.html   |    16 +
 .../internal/tcpserver/TcpClient.java           |    17 +-
 .../internal/tcpserver/TcpServer.java           |    21 +-
 .../gemstone/gemfire/distributed/package.html   |    16 +
 .../gemfire/internal/AbstractConfig.java        |     4 -
 .../gemfire/internal/AvailablePort.java         |   109 +-
 .../gemstone/gemfire/internal/DSFIDFactory.java |     2 +
 .../internal/DataSerializableFixedID.java       |     3 +-
 .../internal/InternalDataSerializer.java        |     2 -
 .../internal/LocalStatisticsFactory.java        |     4 +-
 .../gemfire/internal/SocketCreator.java         |    10 +-
 .../gemfire/internal/StatArchiveWriter.java     |    28 +-
 .../internal/admin/StatAlertsManager.java       |    10 +-
 .../gemfire/internal/admin/package.html         |    20 +-
 .../admin/remote/DistributionLocatorId.java     |     1 -
 .../admin/remote/RemoteBridgeServer.java        |     8 +-
 .../admin/remote/RemoteGfManagerAgent.java      |     2 +-
 .../admin/remote/RemoteRegionAttributes.java    |   116 +-
 .../gemfire/internal/admin/remote/package.html  |    20 +-
 .../gemfire/internal/cache/AbstractRegion.java  |     5 +-
 .../internal/cache/AbstractRegionEntry.java     |    29 +-
 .../internal/cache/AbstractRegionMap.java       |  1191 +-
 .../internal/cache/AbstractUpdateOperation.java |     4 +-
 .../gemfire/internal/cache/BucketAdvisor.java   |     6 +-
 .../gemfire/internal/cache/BucketRegion.java    |     5 +-
 .../cache/BytesAndBitsForCompactor.java         |     2 +-
 .../gemfire/internal/cache/CacheObserver.java   |     4 +
 .../internal/cache/CacheObserverAdapter.java    |     4 +
 .../gemfire/internal/cache/CacheService.java    |    16 +
 .../gemfire/internal/cache/DiskEntry.java       |     8 +-
 .../gemfire/internal/cache/DiskStoreImpl.java   |     4 +-
 .../internal/cache/DistTXRollbackMessage.java   |     2 +-
 .../gemfire/internal/cache/DistTXState.java     |     6 +-
 .../cache/DistributedCacheOperation.java        |    11 +-
 .../cache/DistributedClearOperation.java        |     8 +-
 .../cache/DistributedPutAllOperation.java       |     2 +-
 .../internal/cache/DistributedRegion.java       |     4 +-
 .../cache/DistributedRemoveAllOperation.java    |     2 +-
 .../cache/DistributedTombstoneOperation.java    |    15 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |    45 +-
 .../gemfire/internal/cache/EventTracker.java    |     2 +-
 .../gemfire/internal/cache/FilterProfile.java   |   853 +-
 .../internal/cache/GemFireCacheImpl.java        |   104 +-
 .../internal/cache/IdentityArrayList.java       |     2 +-
 .../internal/cache/InitialImageFlowControl.java |     2 +-
 .../internal/cache/InitialImageOperation.java   |    94 +-
 .../gemfire/internal/cache/LocalRegion.java     |    88 +-
 .../internal/cache/LocalRegionDataView.java     |     2 +-
 .../gemstone/gemfire/internal/cache/Oplog.java  |     6 +-
 .../internal/cache/PRHARedundancyProvider.java  |     4 +-
 .../internal/cache/PartitionedRegion.java       |    89 +-
 .../cache/PartitionedRegionDataStore.java       |    31 +-
 .../cache/PartitionedRegionDataView.java        |     2 +-
 .../internal/cache/PartitionedRegionHelper.java |     2 +-
 .../gemfire/internal/cache/PoolManagerImpl.java |     4 +-
 .../gemfire/internal/cache/QueuedOperation.java |     9 +-
 .../gemfire/internal/cache/RegionListener.java  |    16 +
 .../internal/cache/RemoteInvalidateMessage.java |     1 -
 .../internal/cache/RemoteOperationMessage.java  |    16 +-
 .../internal/cache/RemotePutAllMessage.java     |    10 +-
 .../cache/SearchLoadAndWriteProcessor.java      |     2 +-
 .../internal/cache/StateFlushOperation.java     |     6 +-
 .../gemfire/internal/cache/TXCommitMessage.java |     2 +-
 .../internal/cache/TXFarSideCMTracker.java      |     2 +-
 .../gemfire/internal/cache/TXManagerImpl.java   |     2 +-
 .../gemfire/internal/cache/TXState.java         |     2 +-
 .../internal/cache/TXStateProxyImpl.java        |     4 +-
 .../internal/cache/TombstoneService.java        |    10 +
 .../internal/cache/VMThinRegionEntry.java       |     5 -
 .../CompressedCachedDeserializable.java         |     2 +-
 .../cache/control/InternalResourceManager.java  |    11 +-
 .../internal/cache/control/ResourceAdvisor.java |   138 +-
 .../cache/control/ResourceListener.java         |     2 +-
 .../internal/cache/doc-files/properties.html    |    16 +
 .../cache/execute/FunctionServiceStats.java     |     1 -
 .../cache/execute/InternalExecution.java        |     2 -
 .../cache/execute/InternalFunctionService.java  |    14 +-
 .../cache/execute/util/CommitFunction.java      |     3 +-
 .../cache/execute/util/RollbackFunction.java    |     3 +-
 .../internal/cache/ha/HARegionQueue.java        |    22 +-
 .../locks/GFEAbstractQueuedSynchronizer.java    |  1715 --
 .../locks/ReentrantReadWriteWriteShareLock.java |   477 -
 .../internal/cache/lru/NewLIFOClockHand.java    |    78 +-
 .../internal/cache/lru/NewLRUClockHand.java     |    14 +-
 .../gemfire/internal/cache/package.html         |    16 +
 .../cache/partitioned/BucketCountLoadProbe.java |    75 +
 .../cache/partitioned/FetchEntriesMessage.java  |    19 +-
 .../cache/partitioned/FetchKeysMessage.java     |    20 +-
 .../cache/partitioned/IndexCreationMsg.java     |    31 +-
 .../cache/partitioned/PRTombstoneMessage.java   |    19 +-
 .../cache/partitioned/PartitionMessage.java     |     3 +-
 .../partitioned/PartitionedRegionObserver.java  |     5 +
 .../PartitionedRegionObserverAdapter.java       |     4 +
 .../PartitionedRegionRebalanceOp.java           |     2 +-
 .../cache/partitioned/PutAllPRMessage.java      |    10 +-
 .../StreamingPartitionOperation.java            |     2 -
 .../rebalance/PartitionedRegionLoadModel.java   |     2 -
 .../cache/persistence/BackupManager.java        |     2 +-
 .../persistence/PersistenceAdvisorImpl.java     |     6 +-
 .../persistence/PersistentMemberManager.java    |     2 +-
 .../cache/persistence/PersistentMemberView.java |     1 -
 .../region/entry/RegionEntryFactoryBuilder.java |   103 +
 .../cache/tier/InternalClientMembership.java    |     2 +-
 .../gemfire/internal/cache/tier/package.html    |    16 +
 .../cache/tier/sockets/AcceptorImpl.java        |     4 +-
 .../cache/tier/sockets/BaseCommand.java         |    18 +-
 .../cache/tier/sockets/CacheClientProxy.java    |    22 +-
 .../tier/sockets/ClientProxyMembershipID.java   |    18 +-
 .../internal/cache/tier/sockets/HandShake.java  |    16 +-
 .../internal/cache/tier/sockets/Part.java       |     4 +-
 .../sockets/command/GatewayReceiverCommand.java |    24 +-
 .../internal/cache/tier/sockets/package.html    |    16 +
 .../cache/versions/RegionVersionHolder.java     |    83 +-
 .../cache/versions/RegionVersionVector.java     |     8 +-
 .../cache/wan/AbstractGatewaySender.java        |    31 +-
 .../AbstractGatewaySenderEventProcessor.java    |    11 +-
 .../cache/wan/GatewaySenderAdvisor.java         |     4 +-
 .../cache/wan/GatewaySenderEventImpl.java       |    10 +-
 .../ParallelGatewaySenderEventProcessor.java    |     8 +-
 .../parallel/ParallelGatewaySenderQueue.java    |    61 +-
 ...urrentSerialGatewaySenderEventProcessor.java |     9 +
 .../internal/cache/xmlcache/CacheCreation.java  |    79 +-
 .../cache/xmlcache/CacheXmlGenerator.java       |     4 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |    29 +-
 .../internal/cache/xmlcache/package.html        |    16 +
 .../concurrent/CompactConcurrentHashSet2.java   |     6 +-
 .../internal/datasource/AbstractPoolCache.java  |     4 +-
 .../internal/i18n/ParentLocalizedStrings.java   |    21 +-
 .../gemfire/internal/jta/GlobalTransaction.java |    13 +-
 .../gemfire/internal/logging/LogService.java    |    48 -
 .../gemfire/internal/logging/MergeLogFiles.java |     6 -
 .../internal/logging/log4j/LogMarker.java       |     1 -
 .../internal/logging/log4j/LogWriterLogger.java |     7 -
 .../internal/memcached/commands/GetCommand.java |     7 +-
 .../internal/offheap/AbstractStoredObject.java  |   107 +
 .../gemfire/internal/offheap/Chunk.java         |   792 +
 .../gemfire/internal/offheap/ChunkFactory.java  |    51 +
 .../gemfire/internal/offheap/ChunkType.java     |    30 +
 .../internal/offheap/ChunkWithHeapForm.java     |    40 +
 .../gemfire/internal/offheap/DataAsAddress.java |   131 +
 .../gemfire/internal/offheap/DataType.java      |    23 +-
 ...DisconnectingOutOfOffHeapMemoryListener.java |    77 +
 .../gemfire/internal/offheap/Fragment.java      |   139 +
 .../internal/offheap/FreeListManager.java       |   821 +
 .../gemfire/internal/offheap/GemFireChunk.java  |    47 +
 .../internal/offheap/GemFireChunkFactory.java   |    52 +
 .../internal/offheap/GemFireChunkSlice.java     |    44 +
 .../internal/offheap/LifecycleListener.java     |    98 +
 .../internal/offheap/MemoryAllocator.java       |     3 -
 .../gemfire/internal/offheap/MemoryBlock.java   |     1 -
 .../internal/offheap/MemoryBlockNode.java       |   170 +
 .../internal/offheap/MemoryInspector.java       |    15 +-
 .../internal/offheap/MemoryInspectorImpl.java   |    99 +
 .../offheap/OffHeapCachedDeserializable.java    |    86 +-
 .../gemfire/internal/offheap/OffHeapHelper.java |     8 +-
 .../offheap/OffHeapRegionEntryHelper.java       |    97 +-
 .../internal/offheap/OffHeapStorage.java        |   128 +-
 .../internal/offheap/RefCountChangeInfo.java    |   130 +
 .../internal/offheap/ReferenceCountHelper.java  |   254 +
 .../offheap/SimpleMemoryAllocatorImpl.java      |  3604 +---
 .../internal/offheap/SyncChunkStack.java        |   141 +
 .../internal/offheap/UnsafeMemoryChunk.java     |    65 +-
 .../com/gemstone/gemfire/internal/package.html  |    16 +
 .../internal/process/AttachProcessUtils.java    |     5 +
 .../internal/process/FileProcessController.java |    39 +-
 .../internal/process/NativeProcessUtils.java    |     5 +
 .../internal/process/ProcessController.java     |     2 +-
 .../gemfire/internal/process/ProcessUtils.java  |    16 +-
 .../gemfire/internal/process/signal/Signal.java |     6 +-
 .../internal/redis/ByteArrayWrapper.java        |     2 +-
 .../internal/redis/ByteToCommandDecoder.java    |     2 +-
 .../gemstone/gemfire/internal/redis/Coder.java  |     2 +-
 .../redis/RedisCommandParserException.java      |     2 +-
 .../internal/redis/RegionCreationException.java |     2 +-
 .../gemfire/internal/redis/RegionProvider.java  |     1 -
 .../redis/executor/AbstractExecutor.java        |     8 -
 .../redis/executor/hll/HyperLogLogPlus.java     |     1 -
 .../gemfire/internal/security/package.html      |    16 +
 .../gemfire/internal/shared/NativeCalls.java    |     2 -
 .../internal/statistics/SampleCollector.java    |     4 +-
 .../gemfire/internal/statistics/package.html    |    16 +
 .../internal/tcp/ByteBufferInputStream.java     |     2 +-
 .../gemfire/internal/tcp/Connection.java        |   130 +-
 .../gemfire/internal/tcp/ConnectionTable.java   |    93 +-
 .../tcp/ImmutableByteBufferInputStream.java     |     2 +-
 .../internal/tcp/MemberShunnedException.java    |     7 +-
 .../gemfire/internal/tcp/ServerDelegate.java    |     5 +-
 .../com/gemstone/gemfire/internal/tcp/Stub.java |   164 -
 .../gemfire/internal/tcp/TCPConduit.java        |   282 +-
 .../gemstone/gemfire/internal/tcp/package.html  |    16 +
 .../gemfire/internal/util/BlobHelper.java       |     2 +-
 .../gemfire/internal/util/DebuggerSupport.java  |     4 +-
 .../gemfire/internal/util/ObjectProcedure.java  |    30 -
 .../gemfire/internal/util/PrimeFinder.java      |   159 -
 .../gemfire/internal/util/SingletonValue.java   |     6 +-
 .../CustomEntryConcurrentHashMap.java           |    22 +-
 .../gemfire/management/cli/package.html         |    16 +
 .../gemfire/management/internal/AgentUtil.java  |   109 +-
 .../management/internal/FederatingManager.java  |     7 +-
 .../management/internal/JmxManagerAdvisor.java  |     1 -
 .../management/internal/MBeanProxyFactory.java  |     2 -
 .../management/internal/ManagementAgent.java    |    17 +-
 .../internal/ManagementMembershipListener.java  |     4 +-
 .../gemfire/management/internal/RestAgent.java  |     2 +-
 .../internal/SystemManagementService.java       |     7 +-
 .../beans/GatewaySenderMBeanBridge.java         |     8 +-
 .../internal/beans/MBeanAggregator.java         |     2 +-
 .../internal/beans/stats/StatsKey.java          |     1 -
 .../management/internal/cli/CliUtil.java        |     2 +-
 .../management/internal/cli/GfshParser.java     |    17 +-
 .../management/internal/cli/Launcher.java       |     4 +-
 .../cli/commands/LauncherLifecycleCommands.java |     6 +-
 .../internal/cli/commands/ShellCommands.java    |     4 +-
 .../internal/cli/converters/DirConverter.java   |     2 +-
 .../cli/functions/DataCommandFunction.java      |     6 +-
 .../cli/multistep/CLIMultiStepHelper.java       |     6 +-
 .../internal/cli/parser/GfshMethodTarget.java   |     8 +-
 .../cli/parser/jopt/JoptOptionParser.java       |    20 +-
 .../parser/preprocessor/PreprocessorUtils.java  |    11 +-
 .../cli/remote/RemoteExecutionStrategy.java     |     4 +-
 .../internal/cli/result/TableBuilder.java       |     9 +-
 .../internal/cli/result/TableBuilderHelper.java |    18 +-
 .../management/internal/cli/shell/Gfsh.java     |    15 +-
 .../cli/shell/GfshExecutionStrategy.java        |     4 +-
 .../internal/cli/shell/JmxOperationInvoker.java |    10 +-
 .../internal/cli/shell/jline/ANSIBuffer.java    |   433 +
 .../internal/cli/shell/jline/ANSIHandler.java   |     5 +-
 .../cli/shell/jline/CygwinMinttyTerminal.java   |   137 +-
 .../internal/cli/shell/jline/GfshHistory.java   |    24 +-
 .../shell/jline/GfshUnsupportedTerminal.java    |     2 +-
 .../internal/cli/util/CLIConsoleBufferUtil.java |     8 +-
 .../internal/cli/util/CommentSkipHelper.java    |     2 +-
 .../internal/cli/util/spring/Assert.java        |    35 -
 .../internal/cli/util/spring/ObjectUtils.java   |   300 -
 .../cli/util/spring/ReflectionUtils.java        |   132 -
 .../internal/cli/util/spring/StringUtils.java   |   229 -
 .../configuration/domain/CacheElement.java      |     1 -
 .../management/internal/web/domain/Link.java    |     2 +-
 .../internal/web/http/ClientHttpRequest.java    |     2 +-
 .../internal/web/http/HttpHeader.java           |     2 +-
 .../gemstone/gemfire/management/package.html    |    16 +
 .../main/java/com/gemstone/gemfire/package.html |    22 +-
 .../com/gemstone/gemfire/pdx/PdxInstance.java   |     2 +-
 .../gemfire/pdx/internal/PdxInputStream.java    |     2 +-
 .../java/com/gemstone/gemfire/pdx/package.html  |    15 +
 .../gemfire/redis/GemFireRedisServer.java       |     3 +-
 .../security/GemFireSecurityException.java      |     2 +-
 .../com/gemstone/gemfire/security/package.html  |    16 +
 .../config/GemFireFileConfigurationMonitor.java |   145 -
 .../config/xml/GemFireXmlConfiguration.java     |   344 -
 .../xml/GemFireXmlConfigurationFactory.java     |    59 -
 .../src/main/java/external-overview.html        |    16 +
 .../src/main/java/internal-overview.html        |    16 +
 .../gemfire/cache/cache-8.1.xsd                 |    16 +
 .../gemfire/cache/cache-9.0.xsd                 |    16 +
 .../gemstone/gemfire/admin/doc-files/ds4_0.dtd  |    15 +
 .../gemstone/gemfire/admin/doc-files/ds5_0.dtd  |    15 +
 .../gemfire/cache/doc-files/cache3_0.dtd        |    15 +
 .../gemfire/cache/doc-files/cache4_0.dtd        |    15 +
 .../gemfire/cache/doc-files/cache4_1.dtd        |    15 +
 .../gemfire/cache/doc-files/cache5_0.dtd        |    15 +
 .../gemfire/cache/doc-files/cache5_1.dtd        |    15 +
 .../gemfire/cache/doc-files/cache5_5.dtd        |    15 +
 .../gemfire/cache/doc-files/cache5_7.dtd        |    15 +
 .../gemfire/cache/doc-files/cache5_8.dtd        |    15 +
 .../gemfire/cache/doc-files/cache6_0.dtd        |    15 +
 .../gemfire/cache/doc-files/cache6_1.dtd        |    15 +
 .../gemfire/cache/doc-files/cache6_5.dtd        |    15 +
 .../gemfire/cache/doc-files/cache6_6.dtd        |    15 +
 .../gemfire/cache/doc-files/cache7_0.dtd        |    15 +
 .../gemfire/cache/doc-files/cache8_0.dtd        |    15 +
 .../membership/gms/messenger/jgroups-config.xml |    16 +
 .../membership/gms/messenger/jgroups-mcast.xml  |    16 +
 .../tools/gfsh/app/windowsbindings.properties   |    15 +
 .../internal/cli/commands/support/gfmon.html    |    20 +-
 .../com/gemstone/gemfire/statisticsType.dtd     |    17 +-
 .../src/test/java/com/examples/TestObject.java  |     6 +-
 .../com/examples/ds/PutDataSerializables.java   |     6 +-
 .../test/java/com/gemstone/gemfire/BadTest.java |    42 -
 .../com/gemstone/gemfire/GemFireTestCase.java   |     2 +-
 .../gemfire/SystemFailureJUnitTest.java         |    60 +
 .../com/gemstone/gemfire/TXExpiryJUnitTest.java |     5 +-
 .../com/gemstone/gemfire/UnitTestDoclet.java    |     7 +-
 .../cache/CacheRegionClearStatsDUnitTest.java   |     7 +-
 .../cache/ClientServerTimeSyncDUnitTest.java    |     7 +-
 .../cache/ConnectionPoolAndLoaderDUnitTest.java |     9 +-
 .../SerialAsyncEventQueueImplJUnitTest.java     |    16 +
 .../client/ClientCacheFactoryJUnitTest.java     |    50 +
 .../ClientServerRegisterInterestsDUnitTest.java |    13 +-
 .../internal/AutoConnectionSourceDUnitTest.java |    13 +-
 .../CacheServerSSLConnectionDUnitTest.java      |     7 +-
 .../internal/LocatorLoadBalancingDUnitTest.java |    16 +-
 .../cache/client/internal/LocatorTestBase.java  |    11 +-
 .../internal/SSLNoClientAuthDUnitTest.java      |     7 +-
 .../pooling/ConnectionManagerJUnitTest.java     |     5 +-
 .../SortedListForAsyncQueueJUnitTest.java       |     4 +-
 .../management/MXMemoryPoolListenerExample.java |     4 -
 .../management/MemoryThresholdsDUnitTest.java   |    16 +-
 .../MemoryThresholdsOffHeapDUnitTest.java       |    16 +-
 .../management/ResourceManagerDUnitTest.java    |     9 +-
 .../mapInterface/PutAllGlobalLockJUnitTest.java |     3 +-
 .../partition/PartitionManagerDUnitTest.java    |   443 -
 .../PartitionRegionHelperDUnitTest.java         |    11 +-
 .../gemfire/cache/query/QueryTestUtils.java     |    15 +-
 .../query/cq/dunit/CqQueryTestListener.java     |     5 +-
 .../query/dunit/CompactRangeIndexDUnitTest.java |    11 +-
 .../cache/query/dunit/CqTimeTestListener.java   |     5 +-
 .../cache/query/dunit/GroupByDUnitImpl.java     |     7 +-
 .../dunit/GroupByPartitionedQueryDUnitTest.java |     7 +-
 .../query/dunit/GroupByQueryDUnitTest.java      |     7 +-
 .../cache/query/dunit/HashIndexDUnitTest.java   |     9 +-
 .../cache/query/dunit/HelperTestCase.java       |     9 +-
 .../dunit/NonDistinctOrderByDUnitImpl.java      |     7 +-
 .../NonDistinctOrderByPartitionedDUnitTest.java |     7 +-
 .../query/dunit/PdxStringQueryDUnitTest.java    |    13 +-
 .../dunit/QueryDataInconsistencyDUnitTest.java  |    11 +-
 .../dunit/QueryIndexUsingXMLDUnitTest.java      |    13 +-
 .../QueryParamsAuthorizationDUnitTest.java      |     7 +-
 .../QueryUsingFunctionContextDUnitTest.java     |    14 +-
 .../query/dunit/QueryUsingPoolDUnitTest.java    |     7 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java |    34 +-
 ...esourceManagerWithQueryMonitorDUnitTest.java |    11 +-
 .../query/dunit/SelectStarQueryDUnitTest.java   |     7 +-
 .../query/functional/CountStarJUnitTest.java    |     3 -
 ...ctResultsWithDupValuesInRegionJUnitTest.java |     3 -
 .../IndexCreationDeadLockJUnitTest.java         |     3 +-
 .../IndexMaintenanceAsynchJUnitTest.java        |     5 +-
 .../functional/IndexOnEntrySetJUnitTest.java    |   335 +
 .../functional/LikePredicateJUnitTest.java      |     3 +-
 .../query/functional/PdxGroupByTestImpl.java    |     2 +-
 .../query/internal/CompiledInJUnitTest.java     |   405 +
 .../internal/ExecutionContextJUnitTest.java     |     3 +-
 .../index/AsynchIndexMaintenanceJUnitTest.java  |     5 +-
 ...rrentIndexInitOnOverflowRegionDUnitTest.java |     9 +-
 ...ndexOperationsOnOverflowRegionDUnitTest.java |     9 +-
 ...pdateWithInplaceObjectModFalseDUnitTest.java |    12 +-
 ...ConcurrentIndexUpdateWithoutWLDUnitTest.java |    12 +-
 .../index/CopyOnReadIndexDUnitTest.java         |    11 +-
 .../internal/index/HashIndexJUnitTest.java      |    23 +-
 .../internal/index/HashIndexSetJUnitTest.java   |   504 +
 .../index/IndexCreationInternalsJUnitTest.java  |     3 +-
 .../index/IndexMaintainceJUnitTest.java         |     3 +-
 .../IndexTrackingQueryObserverDUnitTest.java    |     9 +-
 ...itializeIndexEntryDestroyQueryDUnitTest.java |     9 +-
 .../index/MemoryIndexStoreJUnitTest.java        |   396 +
 ...exStoreWithInplaceModificationJUnitTest.java |    54 +
 .../index/MultiIndexCreationDUnitTest.java      |    11 +-
 .../PutAllWithIndexPerfDUnitDisabledTest.java   |   215 -
 .../index/PutAllWithIndexPerfDUnitTest.java     |   217 +
 .../PRBasicIndexCreationDUnitTest.java          |    11 +-
 .../PRBasicIndexCreationDeadlockDUnitTest.java  |    11 +-
 .../PRBasicMultiIndexCreationDUnitTest.java     |     9 +-
 .../partitioned/PRBasicQueryDUnitTest.java      |     5 +-
 .../PRBasicRemoveIndexDUnitTest.java            |     5 +-
 .../PRColocatedEquiJoinDUnitTest.java           |     5 +-
 .../partitioned/PRInvalidQueryDUnitTest.java    |     5 +-
 .../partitioned/PRQueryCacheCloseDUnitTest.java |     9 +-
 .../PRQueryCacheClosedJUnitTest.java            |     9 +-
 .../query/partitioned/PRQueryDUnitHelper.java   |    54 +-
 .../query/partitioned/PRQueryDUnitTest.java     |     7 +-
 .../query/partitioned/PRQueryPerfDUnitTest.java |     5 +-
 .../PRQueryRegionCloseDUnitTest.java            |     9 +-
 .../PRQueryRegionClosedJUnitTest.java           |     6 -
 .../PRQueryRegionDestroyedDUnitTest.java        |     9 +-
 .../PRQueryRegionDestroyedJUnitTest.java        |     8 +-
 .../PRQueryRemoteNodeExceptionDUnitTest.java    |    11 +-
 .../query/transaction/QueryAndJtaJUnitTest.java |     1 -
 .../snapshot/ParallelSnapshotDUnitTest.java     |     7 +-
 .../snapshot/SnapshotByteArrayDUnitTest.java    |     5 +-
 .../cache/snapshot/SnapshotDUnitTest.java       |     5 +-
 .../snapshot/SnapshotPerformanceDUnitTest.java  |     5 +-
 .../gemfire/cache30/Bug34387DUnitTest.java      |    19 +-
 .../gemfire/cache30/Bug34948DUnitTest.java      |    26 +-
 .../gemfire/cache30/Bug35214DUnitTest.java      |    19 +-
 .../gemfire/cache30/Bug38013DUnitTest.java      |    25 +-
 .../gemfire/cache30/Bug38741DUnitTest.java      |     9 +-
 .../cache30/Bug40255JUnitDisabledTest.java      |   139 -
 .../gemfire/cache30/Bug40255JUnitTest.java      |   143 +
 .../cache30/Bug40662JUnitDisabledTest.java      |    92 -
 .../gemfire/cache30/Bug40662JUnitTest.java      |    90 +
 .../gemfire/cache30/CacheCloseDUnitTest.java    |    16 +-
 .../gemfire/cache30/CacheListenerTestCase.java  |    69 +
 .../gemfire/cache30/CacheLoaderTestCase.java    |    14 +-
 .../gemfire/cache30/CacheLogRollDUnitTest.java  |    16 -
 .../gemfire/cache30/CacheMapTxnDUnitTest.java   |    26 +-
 ...cheRegionsReliablityStatsCheckDUnitTest.java |     7 +-
 .../cache30/CacheSerializableRunnable.java      |    10 +-
 .../cache30/CacheStatisticsDUnitTest.java       |    13 +-
 .../gemstone/gemfire/cache30/CacheTestCase.java |     7 +-
 .../gemfire/cache30/CacheXml30DUnitTest.java    |    36 +-
 .../gemfire/cache30/CacheXml41DUnitTest.java    |    39 +-
 .../gemfire/cache30/CacheXml45DUnitTest.java    |     7 +-
 .../gemfire/cache30/CacheXml51DUnitTest.java    |     5 +-
 .../gemfire/cache30/CacheXml57DUnitTest.java    |    18 +-
 .../gemfire/cache30/CacheXml60DUnitTest.java    |    30 +-
 .../gemfire/cache30/CacheXml61DUnitTest.java    |     5 +-
 .../gemfire/cache30/CacheXml66DUnitTest.java    |     5 +-
 .../gemfire/cache30/CacheXml80DUnitTest.java    |    17 +-
 .../gemfire/cache30/CacheXml81DUnitTest.java    |     9 +-
 .../gemfire/cache30/CacheXml90DUnitTest.java    |    17 +-
 .../cache30/CachedAllEventsDUnitTest.java       |    16 +-
 .../gemfire/cache30/CallbackArgDUnitTest.java   |    29 +-
 .../cache30/CertifiableTestCacheListener.java   |     5 +-
 .../cache30/ClearMultiVmCallBkDUnitTest.java    |    27 +-
 .../gemfire/cache30/ClearMultiVmDUnitTest.java  |    33 +-
 .../cache30/ClientMembershipDUnitTest.java      |    37 +-
 .../ClientRegisterInterestDUnitTest.java        |     7 +-
 .../cache30/ClientServerCCEDUnitTest.java       |    11 +-
 .../gemfire/cache30/ClientServerTestCase.java   |     3 +-
 .../ConcurrentLeaveDuringGIIDUnitTest.java      |    11 +-
 .../gemfire/cache30/DiskRegionDUnitTest.java    |    45 +-
 .../gemfire/cache30/DiskRegionTestImpl.java     |    19 +-
 .../cache30/DistAckMapMethodsDUnitTest.java     |    37 +-
 ...tedAckOverflowRegionCCEOffHeapDUnitTest.java |     3 +-
 ...tributedAckPersistentRegionCCEDUnitTest.java |    31 +-
 ...dAckPersistentRegionCCEOffHeapDUnitTest.java |     3 +-
 .../DistributedAckRegionCCEDUnitTest.java       |    15 +-
 ...DistributedAckRegionCCEOffHeapDUnitTest.java |     3 +-
 ...istributedAckRegionCompressionDUnitTest.java |     3 +-
 .../cache30/DistributedAckRegionDUnitTest.java  |    36 +-
 .../DistributedAckRegionOffHeapDUnitTest.java   |     3 +-
 .../DistributedMulticastRegionDUnitTest.java    |   212 +
 .../DistributedNoAckRegionCCEDUnitTest.java     |    22 +-
 ...stributedNoAckRegionCCEOffHeapDUnitTest.java |     3 +-
 .../DistributedNoAckRegionDUnitTest.java        |    17 +-
 .../DistributedNoAckRegionOffHeapDUnitTest.java |     3 +-
 .../gemfire/cache30/DynamicRegionDUnitTest.java |    21 +-
 .../gemfire/cache30/GlobalLockingDUnitTest.java |    15 +-
 .../cache30/GlobalRegionCCEDUnitTest.java       |     7 +-
 .../GlobalRegionCCEOffHeapDUnitTest.java        |     3 +-
 .../gemfire/cache30/GlobalRegionDUnitTest.java  |    25 +-
 .../cache30/GlobalRegionOffHeapDUnitTest.java   |     3 +-
 .../cache30/LRUEvictionControllerDUnitTest.java |     5 +-
 .../gemfire/cache30/LocalRegionDUnitTest.java   |    17 +-
 .../MemLRUEvictionControllerDUnitTest.java      |     6 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |    27 +-
 .../OffHeapLRUEvictionControllerDUnitTest.java  |     3 +-
 .../PRBucketSynchronizationDUnitTest.java       |     7 +-
 .../cache30/PartitionedRegionDUnitTest.java     |    22 +-
 ...tionedRegionMembershipListenerDUnitTest.java |     3 +-
 .../PartitionedRegionOffHeapDUnitTest.java      |     3 +-
 .../cache30/PreloadedRegionTestCase.java        |    14 +-
 .../gemfire/cache30/ProxyDUnitTest.java         |    34 +-
 .../cache30/PutAllCallBkRemoteVMDUnitTest.java  |    23 +-
 .../cache30/PutAllCallBkSingleVMDUnitTest.java  |    28 +-
 .../gemfire/cache30/PutAllMultiVmDUnitTest.java |    25 +-
 .../gemfire/cache30/QueueMsgDUnitTest.java      |    28 +-
 .../cache30/RRSynchronizationDUnitTest.java     |     7 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |    68 +-
 .../cache30/RegionExpirationDUnitTest.java      |    14 +-
 .../RegionMembershipListenerDUnitTest.java      |    28 +-
 .../RegionReliabilityListenerDUnitTest.java     |    26 +-
 .../cache30/RegionReliabilityTestCase.java      |    64 +-
 .../gemfire/cache30/RegionTestCase.java         |     9 +-
 .../cache30/RemoveAllMultiVmDUnitTest.java      |    22 +-
 .../gemfire/cache30/RequiredRolesDUnitTest.java |    28 +-
 .../cache30/RolePerformanceDUnitTest.java       |    15 +-
 .../gemfire/cache30/SearchAndLoadDUnitTest.java |   199 +-
 .../cache30/SlowRecDUnitDisabledTest.java       |  1446 --
 .../gemfire/cache30/SlowRecDUnitTest.java       |  1466 ++
 .../gemfire/cache30/TXDistributedDUnitTest.java |    13 +-
 .../gemfire/cache30/TXOrderDUnitTest.java       |    42 +-
 .../cache30/TXRestrictionsDUnitTest.java        |    14 +-
 .../gemfire/cache30/TestCacheCallback.java      |     5 +-
 .../codeAnalysis/CompiledClassUtils.java        |     1 -
 .../gemfire/codeAnalysis/decode/cp/Cp.java      |    14 +-
 .../codeAnalysis/decode/cp/CpInvokeDynamic.java |    33 +
 .../codeAnalysis/decode/cp/CpMethodHandle.java  |    33 +
 .../codeAnalysis/decode/cp/CpMethodType.java    |    31 +
 .../AbstractLauncherIntegrationJUnitTest.java   |    71 +
 .../distributed/AbstractLauncherJUnitTest.java  |    40 +-
 .../AbstractLauncherJUnitTestCase.java          |     2 +-
 .../distributed/CommonLauncherTestSuite.java    |    65 -
 .../distributed/DistributedMemberDUnitTest.java |    24 +-
 .../distributed/DistributedSystemDUnitTest.java |    83 +-
 .../DistributedSystemIntegrationJUnitTest.java  |    91 +
 .../distributed/DistributedSystemJUnitTest.java |    78 +
 .../distributed/HostedLocatorsDUnitTest.java    |     9 +-
 .../gemfire/distributed/LocatorDUnitTest.java   |    27 +-
 .../gemfire/distributed/LocatorJUnitTest.java   |     5 +-
 .../LocatorLauncherIntegrationJUnitTest.java    |   248 +
 .../distributed/LocatorLauncherJUnitTest.java   |   155 +-
 .../distributed/LocatorStateJUnitTest.java      |   208 +
 .../gemfire/distributed/RoleDUnitTest.java      |    16 +-
 .../ServerLauncherIntegrationJUnitTest.java     |   312 +
 .../distributed/ServerLauncherJUnitTest.java    |   184 +-
 .../ServerLauncherRemoteJUnitTest.java          |     2 +
 .../distributed/SystemAdminDUnitTest.java       |     5 +-
 .../distributed/internal/Bug40751DUnitTest.java |     9 +-
 .../ConsoleDistributionManagerDUnitTest.java    |    13 +-
 .../internal/DistributionAdvisorDUnitTest.java  |    13 +-
 .../internal/DistributionManagerDUnitTest.java  |    59 +-
 .../InternalDistributedSystemJUnitTest.java     |     2 +-
 .../gemfire/distributed/internal/LDM.java       |     2 +-
 .../internal/ProductUseLogDUnitTest.java        |    11 +-
 .../internal/SharedConfigurationJUnitTest.java  |     2 +-
 .../GemFireDeadlockDetectorDUnitTest.java       |    11 +-
 .../locks/CollaborationJUnitDisabledTest.java   |   562 -
 .../internal/locks/CollaborationJUnitTest.java  |   616 +
 .../locks/DLockReentrantLockJUnitTest.java      |    84 +
 ...entrantReadWriteWriteShareLockJUnitTest.java |   458 -
 .../membership/MembershipJUnitTest.java         |   257 +-
 .../internal/membership/NetViewJUnitTest.java   |   269 +
 .../membership/gms/GMSMemberJUnitTest.java      |   164 +
 .../membership/gms/MembershipManagerHelper.java |     8 +-
 .../gms/auth/GMSAuthenticatorJUnitTest.java     |    16 +
 .../gms/fd/GMSHealthMonitorJUnitTest.java       |   638 +
 .../locator/GMSLocatorRecoveryJUnitTest.java    |    16 +
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |   504 +-
 .../gms/membership/StatRecorderJUnitTest.java   |    16 +
 .../fd/GMSHealthMonitorJUnitTest.java           |   444 -
 .../messenger/GMSQuorumCheckerJUnitTest.java    |    20 +-
 .../membership/gms/messenger/InterceptUDP.java  |    18 +-
 .../messenger/JGroupsMessengerJUnitTest.java    |   610 +-
 .../gms/mgr/GMSMembershipManagerJUnitTest.java  |   436 +
 .../StreamingOperationManyDUnitTest.java        |    20 +-
 .../StreamingOperationOneDUnitTest.java         |    23 +-
 ...cpServerBackwardCompatDUnitDisabledTest.java |   250 -
 .../TcpServerBackwardCompatDUnitTest.java       |   255 +
 .../gemfire/disttx/CacheMapDistTXDUnitTest.java |     5 +-
 .../gemfire/disttx/DistTXDebugDUnitTest.java    |     9 +-
 .../disttx/DistTXPersistentDebugDUnitTest.java  |     2 +-
 .../disttx/DistributedTransactionDUnitTest.java |     7 +-
 .../internal/AbstractConfigJUnitTest.java       |   114 +
 .../gemfire/internal/AvailablePortHelper.java   |     2 +-
 .../internal/AvailablePortJUnitTest.java        |     3 +
 ...wardCompatibilitySerializationDUnitTest.java |    13 +-
 .../gemstone/gemfire/internal/ClassBuilder.java |     1 -
 .../ClassNotFoundExceptionDUnitTest.java        |     9 +-
 .../internal/DataSerializableJUnitTest.java     |    37 +-
 .../gemstone/gemfire/internal/FDDUnitTest.java  |   282 -
 .../gemfire/internal/JSSESocketJUnitTest.java   |     3 +-
 .../gemfire/internal/JarDeployerDUnitTest.java  |     7 +-
 .../internal/PdxDeleteFieldDUnitTest.java       |     7 +-
 .../gemfire/internal/PdxRenameDUnitTest.java    |     7 +-
 .../gemfire/internal/SocketCloserJUnitTest.java |     5 +-
 .../internal/cache/AbstractRegionJUnitTest.java |     2 +-
 .../internal/cache/AbstractRegionMapTest.java   |   186 +
 .../gemfire/internal/cache/BackupDUnitTest.java |    13 +-
 .../internal/cache/Bug33359DUnitTest.java       |     8 +-
 .../internal/cache/Bug33726DUnitTest.java       |     8 +-
 .../internal/cache/Bug37241DUnitTest.java       |     8 +-
 .../internal/cache/Bug37244JUnitTest.java       |     3 -
 .../internal/cache/Bug37377DUnitTest.java       |    11 +-
 .../internal/cache/Bug39079DUnitTest.java       |    11 +-
 .../internal/cache/Bug40299DUnitTest.java       |    11 +-
 .../internal/cache/Bug40632DUnitTest.java       |     9 +-
 .../internal/cache/Bug41091DUnitTest.java       |     7 +-
 .../internal/cache/Bug41733DUnitTest.java       |    19 +-
 .../internal/cache/Bug41957DUnitTest.java       |    29 +-
 .../internal/cache/Bug42010StatsDUnitTest.java  |   531 -
 .../internal/cache/Bug42055DUnitTest.java       |     9 +-
 .../internal/cache/Bug45164DUnitTest.java       |     7 +-
 .../internal/cache/Bug45934DUnitTest.java       |     7 +-
 .../internal/cache/Bug47667DUnitTest.java       |     7 +-
 .../internal/cache/CacheAdvisorDUnitTest.java   |    30 +-
 .../internal/cache/CacheServiceJUnitTest.java   |    16 +
 .../cache/ChunkValueWrapperJUnitTest.java       |     2 +-
 .../internal/cache/ClearDAckDUnitTest.java      |    11 +-
 .../internal/cache/ClearGlobalDUnitTest.java    |     6 +-
 .../cache/ClientServerGetAllDUnitTest.java      |    33 +-
 ...ServerInvalidAndDestroyedEntryDUnitTest.java |   995 +-
 .../ClientServerTransactionCCEDUnitTest.java    |     5 +-
 .../cache/ClientServerTransactionDUnitTest.java |    20 +-
 .../ConcurrentDestroySubRegionDUnitTest.java    |     9 +-
 .../cache/ConcurrentMapOpsDUnitTest.java        |    11 +-
 .../ConcurrentRegionOperationsJUnitTest.java    |     3 +-
 ...rentRollingAndRegionOperationsJUnitTest.java |     3 +-
 .../internal/cache/ConflationJUnitTest.java     |    12 -
 .../cache/ConnectDisconnectDUnitTest.java       |    13 +-
 .../internal/cache/DeltaFaultInDUnitTest.java   |     9 +-
 .../cache/DeltaPropagationDUnitTest.java        |     9 +-
 .../cache/DeltaPropagationStatsDUnitTest.java   |     7 +-
 .../internal/cache/DeltaSizingDUnitTest.java    |     9 +-
 .../gemfire/internal/cache/DiskIdJUnitTest.java |     2 -
 .../cache/DiskRegByteArrayDUnitTest.java        |    15 +-
 .../cache/DiskRegionClearJUnitTest.java         |     3 +-
 .../internal/cache/DiskRegionHelperFactory.java |     3 -
 .../internal/cache/DiskRegionJUnitTest.java     |   177 +-
 .../internal/cache/DiskRegionTestingBase.java   |     3 -
 ...DistrbutedRegionProfileOffHeapDUnitTest.java |     5 +-
 .../cache/DistributedCacheTestCase.java         |    29 +-
 .../internal/cache/EventTrackerDUnitTest.java   |     7 +-
 .../cache/EvictionDUnitDisabledTest.java        |   240 -
 .../internal/cache/EvictionDUnitTest.java       |   246 +
 .../internal/cache/EvictionStatsDUnitTest.java  |     7 +-
 .../internal/cache/EvictionTestBase.java        |    11 +-
 .../cache/FixedPRSinglehopDUnitTest.java        |     9 +-
 .../internal/cache/GIIDeltaDUnitTest.java       |    13 +-
 .../internal/cache/GIIFlowControlDUnitTest.java |     9 +-
 .../internal/cache/GridAdvisorDUnitTest.java    |    25 +-
 .../internal/cache/HABug36773DUnitTest.java     |    11 +-
 .../HAOverflowMemObjectSizerDUnitTest.java      |    12 +-
 .../cache/IncrementalBackupDUnitTest.java       |    12 +-
 .../cache/InterruptClientServerDUnitTest.java   |     9 +-
 .../internal/cache/InterruptsDUnitTest.java     |     9 +-
 .../internal/cache/IteratorDUnitTest.java       |     7 +-
 ...victionAlgoMemoryEnabledRegionJUnitTest.java |   119 +
 .../internal/cache/MapClearGIIDUnitTest.java    |    14 +-
 .../internal/cache/MapInterface2JUnitTest.java  |     3 +-
 .../internal/cache/MockCacheService.java        |    16 +
 .../internal/cache/MockCacheServiceImpl.java    |    16 +
 .../cache/NetSearchMessagingDUnitTest.java      |    11 +-
 .../cache/OffHeapEvictionDUnitTest.java         |     9 +-
 .../cache/OffHeapEvictionStatsDUnitTest.java    |     3 +-
 .../gemfire/internal/cache/OffHeapTestUtil.java |     5 +-
 .../cache/OldValueImporterTestBase.java         |     4 +-
 .../gemfire/internal/cache/OplogJUnitTest.java  |     5 +-
 .../cache/P2PDeltaPropagationDUnitTest.java     |     7 +-
 .../internal/cache/PRBadToDataDUnitTest.java    |     9 +-
 .../cache/PartitionListenerDUnitTest.java       |     9 +-
 .../cache/PartitionedRegionAPIDUnitTest.java    |     7 +-
 .../PartitionedRegionAsSubRegionDUnitTest.java  |     5 +-
 ...gionBucketCreationDistributionDUnitTest.java |    50 +-
 .../PartitionedRegionCacheCloseDUnitTest.java   |     9 +-
 ...rtitionedRegionCacheXMLExampleDUnitTest.java |     5 +-
 .../PartitionedRegionCreationDUnitTest.java     |    25 +-
 .../cache/PartitionedRegionDUnitTestCase.java   |    13 +-
 .../PartitionedRegionDataStoreJUnitTest.java    |    73 +
 ...rtitionedRegionDelayedRecoveryDUnitTest.java |     9 +-
 .../PartitionedRegionDestroyDUnitTest.java      |    11 +-
 .../PartitionedRegionEntryCountDUnitTest.java   |     9 +-
 .../PartitionedRegionEvictionDUnitTest.java     |    11 +-
 .../cache/PartitionedRegionHADUnitTest.java     |    15 +-
 ...onedRegionHAFailureAndRecoveryDUnitTest.java |    22 +-
 .../PartitionedRegionInvalidateDUnitTest.java   |     7 +-
 ...artitionedRegionLocalMaxMemoryDUnitTest.java |     7 +-
 ...nedRegionLocalMaxMemoryOffHeapDUnitTest.java |     3 +-
 .../PartitionedRegionMultipleDUnitTest.java     |     8 +-
 ...rtitionedRegionOffHeapEvictionDUnitTest.java |     3 +-
 .../cache/PartitionedRegionPRIDDUnitTest.java   |     9 +-
 .../cache/PartitionedRegionQueryDUnitTest.java  |     9 +-
 ...artitionedRegionRedundancyZoneDUnitTest.java |     9 +-
 ...tionedRegionSerializableObjectJUnitTest.java |     2 +-
 .../PartitionedRegionSingleHopDUnitTest.java    |     9 +-
 ...RegionSingleHopWithServerGroupDUnitTest.java |     9 +-
 .../cache/PartitionedRegionSizeDUnitTest.java   |    13 +-
 .../cache/PartitionedRegionStatsDUnitTest.java  |     7 +-
 .../cache/PartitionedRegionTestHelper.java      |    17 -
 .../PartitionedRegionTestUtilsDUnitTest.java    |    11 +-
 .../PartitionedRegionWithSameNameDUnitTest.java |    20 +-
 .../internal/cache/PutAllDAckDUnitTest.java     |    16 +-
 .../internal/cache/PutAllGlobalDUnitTest.java   |    25 +-
 .../internal/cache/RegionListenerJUnitTest.java |    16 +
 .../cache/RemoteTransactionDUnitTest.java       |    20 +-
 .../internal/cache/RemoveAllDAckDUnitTest.java  |    12 +-
 .../internal/cache/RemoveDAckDUnitTest.java     |    10 +-
 .../internal/cache/RemoveGlobalDUnitTest.java   |    23 +-
 .../cache/SimpleDiskRegionJUnitTest.java        |     3 +-
 .../internal/cache/SingleHopStatsDUnitTest.java |   542 +
 .../internal/cache/SizingFlagDUnitTest.java     |     9 +-
 .../internal/cache/SystemFailureDUnitTest.java  |     7 +-
 .../cache/TXReservationMgrJUnitTest.java        |     3 +-
 .../cache/TransactionsWithDeltaDUnitTest.java   |     7 +-
 .../control/RebalanceOperationDUnitTest.java    |   150 +-
 ...egionOverflowAsyncRollingOpLogJUnitTest.java |     5 +-
 ...RegionOverflowSyncRollingOpLogJUnitTest.java |     5 +-
 .../DiskRegionPerfJUnitPerformanceTest.java     |     6 +-
 ...ltiThreadedOplogPerJUnitPerformanceTest.java |     3 +-
 .../cache/execute/Bug51193DUnitTest.java        |     7 +-
 .../ClientServerFunctionExecutionDUnitTest.java |     5 +-
 .../execute/ColocationFailoverDUnitTest.java    |     9 +-
 ...ributedRegionFunctionExecutionDUnitTest.java |     9 +-
 .../FunctionExecution_ExceptionDUnitTest.java   |     9 +-
 .../execute/FunctionServiceStatsDUnitTest.java  |    13 +-
 .../cache/execute/LocalDataSetDUnitTest.java    |    11 +-
 .../execute/LocalDataSetIndexingDUnitTest.java  |     5 +-
 .../LocalFunctionExecutionDUnitTest.java        |     9 +-
 .../MemberFunctionExecutionDUnitTest.java       |     9 +-
 .../MultiRegionFunctionExecutionDUnitTest.java  |     7 +-
 .../OnGroupsFunctionExecutionDUnitTest.java     |    16 +-
 ...tServerRegionFunctionExecutionDUnitTest.java |     7 +-
 ...egionFunctionExecutionFailoverDUnitTest.java |    11 +-
 ...onFunctionExecutionNoSingleHopDUnitTest.java |     5 +-
 ...onExecutionSelectorNoSingleHopDUnitTest.java |     5 +-
 ...gionFunctionExecutionSingleHopDUnitTest.java |     5 +-
 .../cache/execute/PRClientServerTestBase.java   |    11 +-
 .../cache/execute/PRColocationDUnitTest.java    |    12 +-
 .../execute/PRCustomPartitioningDUnitTest.java  |     7 +-
 .../execute/PRFunctionExecutionDUnitTest.java   |    22 +-
 .../PRFunctionExecutionTimeOutDUnitTest.java    |     7 +-
 ...ctionExecutionWithResultSenderDUnitTest.java |     9 +-
 .../execute/PRPerformanceTestDUnitTest.java     |     7 +-
 .../cache/execute/PRTransactionDUnitTest.java   |     3 +-
 .../execute/SingleHopGetAllPutAllDUnitTest.java |     3 +-
 .../mock/AlterMockRegionExtensionFunction.java  |     2 +-
 .../extension/mock/MockCacheExtension.java      |     4 +-
 .../functions/DistributedRegionFunction.java    |     5 +-
 .../internal/cache/functions/TestFunction.java  |     5 +-
 .../ha/BlockingHARQAddOperationJUnitTest.java   |     3 +-
 .../cache/ha/BlockingHARegionJUnitTest.java     |     5 +-
 .../cache/ha/Bug36853EventsExpiryDUnitTest.java |     8 +-
 .../internal/cache/ha/Bug48571DUnitTest.java    |     7 +-
 .../internal/cache/ha/Bug48879DUnitTest.java    |     7 +-
 .../internal/cache/ha/ConflatableObject.java    |     2 +-
 .../cache/ha/EventIdOptimizationDUnitTest.java  |     7 +-
 .../cache/ha/EventIdOptimizationJUnitTest.java  |     8 +-
 .../internal/cache/ha/FailoverDUnitTest.java    |     7 +-
 .../internal/cache/ha/HABugInPutDUnitTest.java  |     7 +-
 .../internal/cache/ha/HAClearDUnitTest.java     |     7 +-
 .../cache/ha/HAConflationDUnitTest.java         |     7 +-
 .../internal/cache/ha/HADuplicateDUnitTest.java |     7 +-
 .../cache/ha/HAEventIdPropagationDUnitTest.java |     7 +-
 .../internal/cache/ha/HAExpiryDUnitTest.java    |     9 +-
 .../internal/cache/ha/HAGIIBugDUnitTest.java    |    11 +-
 .../internal/cache/ha/HAGIIDUnitTest.java       |     9 +-
 .../cache/ha/HARQAddOperationJUnitTest.java     |     3 +-
 .../cache/ha/HARQueueNewImplDUnitTest.java      |     7 +-
 .../internal/cache/ha/HARegionDUnitTest.java    |     7 +-
 .../internal/cache/ha/HARegionJUnitTest.java    |     8 +-
 .../cache/ha/HARegionQueueDUnitTest.java        |    10 +-
 .../cache/ha/HARegionQueueJUnitTest.java        |     5 +-
 ...HARegionQueueStartStopJUnitDisabledTest.java |   123 -
 .../cache/ha/HASlowReceiverDUnitTest.java       |     6 +-
 .../ha/OperationsPropagationDUnitTest.java      |     7 +-
 .../internal/cache/ha/PutAllDUnitTest.java      |     7 +-
 .../cache/ha/StatsBugDUnitDisabledTest.java     |   368 -
 .../internal/cache/ha/StatsBugDUnitTest.java    |   373 +
 .../cache/locks/TXLockServiceDUnitTest.java     |    31 +-
 .../cache/partitioned/Bug39356DUnitTest.java    |     9 +-
 .../cache/partitioned/Bug43684DUnitTest.java    |     7 +-
 .../cache/partitioned/Bug47388DUnitTest.java    |     7 +-
 .../cache/partitioned/Bug51400DUnitTest.java    |     9 +-
 .../partitioned/ElidedPutAllDUnitTest.java      |     7 +-
 .../partitioned/PartitionResolverDUnitTest.java |     7 +-
 .../PartitionedRegionLoadModelJUnitTest.java    |     6 +-
 .../PartitionedRegionLoaderWriterDUnitTest.java |     4 +-
 ...rtitionedRegionMetaDataCleanupDUnitTest.java |     9 +-
 .../partitioned/PersistPRKRFDUnitTest.java      |     9 +-
 ...tentColocatedPartitionedRegionDUnitTest.java |    13 +-
 .../PersistentPartitionedRegionDUnitTest.java   |    21 +-
 .../PersistentPartitionedRegionTestBase.java    |    11 +-
 ...rtitionedRegionWithTransactionDUnitTest.java |    15 +-
 .../cache/partitioned/ShutdownAllDUnitTest.java |    19 +-
 ...treamingPartitionOperationManyDUnitTest.java |    29 +-
 ...StreamingPartitionOperationOneDUnitTest.java |    34 +-
 .../fixed/FixedPartitioningDUnitTest.java       |     7 +-
 .../fixed/FixedPartitioningTestBase.java        |    92 +-
 ...ngWithColocationAndPersistenceDUnitTest.java |   111 +-
 .../PersistentRVVRecoveryDUnitTest.java         |    11 +-
 .../PersistentRecoveryOrderDUnitTest.java       |    11 +-
 ...rsistentRecoveryOrderOldConfigDUnitTest.java |     7 +-
 .../PersistentReplicatedTestBase.java           |     7 +-
 .../RegionEntryFactoryBuilderJUnitTest.java     |    85 +
 .../internal/cache/tier/Bug40396DUnitTest.java  |     9 +-
 ...mpatibilityHigherVersionClientDUnitTest.java |     7 +-
 .../cache/tier/sockets/Bug36269DUnitTest.java   |     7 +-
 .../cache/tier/sockets/Bug36457DUnitTest.java   |     7 +-
 .../cache/tier/sockets/Bug36805DUnitTest.java   |     7 +-
 .../cache/tier/sockets/Bug36829DUnitTest.java   |     7 +-
 .../cache/tier/sockets/Bug36995DUnitTest.java   |     7 +-
 .../cache/tier/sockets/Bug37210DUnitTest.java   |     9 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |     7 +-
 .../CacheServerMaxConnectionsJUnitTest.java     |     8 +-
 .../cache/tier/sockets/CacheServerTestUtil.java |     9 +-
 .../CacheServerTransactionsDUnitTest.java       |     7 +-
 .../tier/sockets/ClearPropagationDUnitTest.java |    11 +-
 .../tier/sockets/ClientConflationDUnitTest.java |     7 +-
 .../sockets/ClientHealthMonitorJUnitTest.java   |     8 +-
 .../sockets/ClientInterestNotifyDUnitTest.java  |     7 +-
 .../tier/sockets/ClientServerMiscDUnitTest.java |    11 +-
 .../cache/tier/sockets/ConflationDUnitTest.java |     7 +-
 .../tier/sockets/ConnectionProxyJUnitTest.java  |     5 +-
 .../DataSerializerPropogationDUnitTest.java     |     7 +-
 .../DestroyEntryPropagationDUnitTest.java       |    12 +-
 .../sockets/DurableClientBug39997DUnitTest.java |     7 +-
 .../DurableClientQueueSizeDUnitTest.java        |     7 +-
 .../DurableClientReconnectAutoDUnitTest.java    |     5 +-
 .../DurableClientReconnectDUnitTest.java        |     7 +-
 .../sockets/DurableClientStatsDUnitTest.java    |     7 +-
 .../sockets/DurableRegistrationDUnitTest.java   |     7 +-
 .../sockets/DurableResponseMatrixDUnitTest.java |     7 +-
 .../sockets/EventIDVerificationDUnitTest.java   |     7 +-
 .../EventIDVerificationInP2PDUnitTest.java      |     7 +-
 .../FilterProfileIntegrationJUnitTest.java      |   110 +
 .../tier/sockets/FilterProfileJUnitTest.java    |   422 +-
 .../ForceInvalidateEvictionDUnitTest.java       |     7 +-
 ...ForceInvalidateOffHeapEvictionDUnitTest.java |     3 +-
 .../cache/tier/sockets/HABug36738DUnitTest.java |     7 +-
 .../cache/tier/sockets/HAInterestBaseTest.java  |  1015 -
 .../tier/sockets/HAInterestPart1DUnitTest.java  |   104 +-
 .../tier/sockets/HAInterestPart2DUnitTest.java  |   121 +-
 .../cache/tier/sockets/HAInterestTestCase.java  |  1017 +
 .../sockets/HAStartupAndFailoverDUnitTest.java  |    18 +-
 .../InstantiatorPropagationDUnitTest.java       |  1769 ++
 .../tier/sockets/InterestListDUnitTest.java     |   210 +-
 .../sockets/InterestListEndpointDUnitTest.java  |     9 +-
 .../sockets/InterestListFailoverDUnitTest.java  |     7 +-
 .../sockets/InterestListRecoveryDUnitTest.java  |     6 +-
 .../sockets/InterestRegrListenerDUnitTest.java  |     7 +-
 .../sockets/InterestResultPolicyDUnitTest.java  |     7 +-
 .../sockets/NewRegionAttributesDUnitTest.java   |     9 +-
 .../sockets/RedundancyLevelPart1DUnitTest.java  |     8 +-
 .../sockets/RedundancyLevelPart2DUnitTest.java  |     4 +-
 .../sockets/RedundancyLevelPart3DUnitTest.java  |     5 +-
 .../tier/sockets/RedundancyLevelTestBase.java   |     7 +-
 .../tier/sockets/RegionCloseDUnitTest.java      |     7 +-
 ...erInterestBeforeRegionCreationDUnitTest.java |     7 +-
 .../sockets/RegisterInterestKeysDUnitTest.java  |     7 +-
 .../sockets/ReliableMessagingDUnitTest.java     |     7 +-
 .../internal/cache/tier/sockets/TestFilter.java |    58 +
 .../sockets/UnregisterInterestDUnitTest.java    |     7 +-
 .../sockets/UpdatePropagationDUnitTest.java     |    13 +-
 .../VerifyEventIDGenerationInP2PDUnitTest.java  |     7 +-
 ...UpdatesFromNonInterestEndPointDUnitTest.java |     7 +-
 .../tier/sockets/command/CommitCommandTest.java |    24 +-
 .../versions/RegionVersionHolder2JUnitTest.java |   178 +
 .../versions/RegionVersionVectorJUnitTest.java  |     3 +-
 .../cache/wan/AsyncEventQueueTestBase.java      |  1665 ++
 .../cache/wan/CompressionConstants.java         |    37 -
 .../cache/wan/CompressionInputStream.java       |   147 -
 .../cache/wan/CompressionOutputStream.java      |   123 -
 .../asyncqueue/AsyncEventListenerDUnitTest.java |  1920 ++
 .../AsyncEventListenerOffHeapDUnitTest.java     |    33 +
 .../AsyncEventQueueStatsDUnitTest.java          |   319 +
 .../ConcurrentAsyncEventQueueDUnitTest.java     |   335 +
 ...ncurrentAsyncEventQueueOffHeapDUnitTest.java |    32 +
 .../CommonParallelAsyncEventQueueDUnitTest.java |    59 +
 ...ParallelAsyncEventQueueOffHeapDUnitTest.java |    32 +
 .../ParallelGatewaySenderQueueJUnitTest.java    |    87 +
 ...ialGatewaySenderEventProcessorJUnitTest.java |    42 +
 .../cache/xmlcache/CacheCreationJUnitTest.java  |   209 +
 .../CompressionCacheConfigDUnitTest.java        |    20 +-
 .../CompressionCacheListenerDUnitTest.java      |     9 +-
 ...ompressionCacheListenerOffHeapDUnitTest.java |     3 +-
 .../CompressionRegionConfigDUnitTest.java       |    13 +-
 .../CompressionRegionFactoryDUnitTest.java      |     9 +-
 .../CompressionRegionOperationsDUnitTest.java   |     9 +-
 ...ressionRegionOperationsOffHeapDUnitTest.java |     3 +-
 .../compression/CompressionStatsDUnitTest.java  |     9 +-
 .../compression/SnappyCompressorJUnitTest.java  |     2 +-
 .../internal/jta/dunit/CommitThread.java        |    28 +-
 .../internal/jta/dunit/ExceptionsDUnitTest.java |    42 +-
 .../jta/dunit/IdleTimeOutDUnitTest.java         |    44 +-
 .../jta/dunit/LoginTimeOutDUnitTest.java        |    11 +-
 .../jta/dunit/MaxPoolSizeDUnitTest.java         |    43 +-
 .../internal/jta/dunit/RollbackThread.java      |    28 +-
 .../jta/dunit/TransactionTimeOutDUnitTest.java  |    26 +-
 .../dunit/TxnManagerMultiThreadDUnitTest.java   |    51 +-
 .../internal/jta/dunit/TxnTimeOutDUnitTest.java |    31 +-
 .../jta/functional/TestXACacheLoader.java       |     3 -
 .../DistributedSystemLogFileJUnitTest.java      |     5 +-
 .../logging/LocatorLogFileJUnitTest.java        |     5 +-
 .../logging/LogWriterPerformanceTest.java       |     6 +
 .../logging/MergeLogFilesJUnitTest.java         |     3 +-
 .../log4j/Log4J2DisabledPerformanceTest.java    |     6 +
 .../logging/log4j/Log4J2PerformanceTest.java    |    16 +-
 .../LogWriterLoggerDisabledPerformanceTest.java |     6 +
 .../log4j/LogWriterLoggerPerformanceTest.java   |    16 +-
 .../offheap/AbstractStoredObjectTestBase.java   |   203 +
 .../offheap/ChunkWithHeapFormJUnitTest.java     |    64 +
 .../offheap/ConcurrentBagJUnitTest.java         |   130 -
 .../offheap/DataAsAddressJUnitTest.java         |   368 +
 .../internal/offheap/DataTypeJUnitTest.java     |   300 +-
 ...tingOutOfOffHeapMemoryListenerJUnitTest.java |   100 +
 .../offheap/FreeListOffHeapRegionJUnitTest.java |     2 +-
 .../offheap/GemFireChunkFactoryJUnitTest.java   |   129 +
 .../internal/offheap/GemFireChunkJUnitTest.java |   921 +
 .../offheap/GemFireChunkSliceJUnitTest.java     |    72 +
 .../offheap/LifecycleListenerJUnitTest.java     |   230 +
 .../offheap/MemoryChunkJUnitTestBase.java       |    61 +
 .../internal/offheap/MemoryChunkTestSuite.java  |    32 +
 .../offheap/MemoryInspectorImplJUnitTest.java   |   142 +
 .../offheap/NullOffHeapMemoryStats.java         |     6 +
 .../offheap/NullOutOfOffHeapMemoryListener.java |     6 +
 .../offheap/OffHeapHelperJUnitTest.java         |   314 +
 .../internal/offheap/OffHeapRegionBase.java     |     6 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |   870 +
 .../offheap/OffHeapStorageJUnitTest.java        |   206 +
 .../offheap/OffHeapValidationJUnitTest.java     |    11 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |     2 -
 .../OldFreeListOffHeapRegionJUnitTest.java      |     2 +-
 .../offheap/OutOfOffHeapMemoryDUnitTest.java    |    10 +-
 .../offheap/RefCountChangeInfoJUnitTest.java    |   207 +
 ...moryAllocatorFillPatternIntegrationTest.java |   246 +
 ...mpleMemoryAllocatorFillPatternJUnitTest.java |   378 +-
 .../offheap/SimpleMemoryAllocatorJUnitTest.java |   384 +-
 ...moryAllocatorLifecycleListenerJUnitTest.java |   148 -
 .../internal/offheap/StoredObjectTestSuite.java |    33 +
 .../offheap/SyncChunkStackJUnitTest.java        |   289 +
 .../offheap/UnsafeMemoryChunkJUnitTest.java     |    56 +
 ...leProcessControllerIntegrationJUnitTest.java |   155 +
 .../process/LocalProcessLauncherDUnitTest.java  |     7 +-
 .../internal/process/PidFileJUnitTest.java      |     2 +-
 .../statistics/StatisticsDUnitTest.java         |    10 +-
 .../statistics/ValueMonitorJUnitTest.java       |     4 +-
 .../internal/tcp/ConnectionJUnitTest.java       |    19 +-
 .../internal/util/ArrayUtilsJUnitTest.java      |     1 -
 .../gemfire/internal/util/SerializableImpl.java |     2 -
 .../util/SerializableImplWithValue.java         |     2 -
 .../concurrent/CopyOnWriteHashMapJUnitTest.java |    21 +-
 .../management/CacheManagementDUnitTest.java    |    19 +-
 .../management/ClientHealthStatsDUnitTest.java  |    13 +-
 .../management/CompositeTypeTestDUnitTest.java  |    11 +-
 .../management/DLockManagementDUnitTest.java    |     5 +-
 .../management/DiskManagementDUnitTest.java     |    20 +-
 .../management/DistributedSystemDUnitTest.java  |    12 +-
 .../management/LocatorManagementDUnitTest.java  |    13 +-
 .../gemstone/gemfire/management/MBeanUtil.java  |     5 +-
 .../gemfire/management/ManagementTestBase.java  |    22 +-
 .../MemberMBeanAttributesDUnitTest.java         |     5 +-
 .../management/OffHeapManagementDUnitTest.java  |     9 +-
 .../gemfire/management/QueryDataDUnitTest.java  |     8 +-
 .../management/RegionManagementDUnitTest.java   |     5 +-
 ...ersalMembershipListenerAdapterDUnitTest.java |    14 +-
 .../stats/DistributedSystemStatsDUnitTest.java  |     5 +-
 .../bean/stats/GatewayMBeanBridgeJUnitTest.java |   108 +
 .../bean/stats/GatewaySenderStatsJUnitTest.java |   101 -
 .../internal/cli/CliUtilDUnitTest.java          |    11 +-
 .../internal/cli/GfshParserJUnitTest.java       |    52 +-
 .../management/internal/cli/HeadlessGfsh.java   |   374 +
 .../internal/cli/HeadlessGfshJUnitTest.java     |    86 +
 .../management/internal/cli/ResultHandler.java  |    23 +
 .../internal/cli/TableBuilderJUnitTest.java     |   314 +
 .../cli/commands/CliCommandTestBase.java        |   561 +
 .../cli/commands/ConfigCommandsDUnitTest.java   |   498 +
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  1148 ++
 .../cli/commands/DeployCommandsDUnitTest.java   |   480 +
 .../commands/DiskStoreCommandsDUnitTest.java    |  1155 ++
 .../cli/commands/FunctionCommandsDUnitTest.java |   593 +
 .../commands/GemfireDataCommandsDUnitTest.java  |  2088 ++
 ...WithCacheLoaderDuringCacheMissDUnitTest.java |   372 +
 .../cli/commands/IndexCommandsDUnitTest.java    |   817 +
 ...stAndDescribeDiskStoreCommandsDUnitTest.java |   198 +
 .../ListAndDescribeRegionDUnitTest.java         |   320 +
 .../cli/commands/ListIndexCommandDUnitTest.java |   673 +
 .../cli/commands/MemberCommandsDUnitTest.java   |   287 +
 .../MiscellaneousCommandsDUnitTest.java         |   493 +
 ...laneousCommandsExportLogsPart1DUnitTest.java |   139 +
 ...laneousCommandsExportLogsPart2DUnitTest.java |   148 +
 ...laneousCommandsExportLogsPart3DUnitTest.java |   150 +
 ...laneousCommandsExportLogsPart4DUnitTest.java |   141 +
 .../cli/commands/QueueCommandsDUnitTest.java    |   390 +
 .../SharedConfigurationCommandsDUnitTest.java   |   339 +
 .../cli/commands/ShellCommandsDUnitTest.java    |   365 +
 .../cli/commands/ShowDeadlockDUnitTest.java     |   271 +
 .../cli/commands/ShowMetricsDUnitTest.java      |   342 +
 .../cli/commands/ShowStackTraceDUnitTest.java   |   149 +
 .../cli/commands/UserCommandsDUnitTest.java     |   165 +
 .../functions/DataCommandFunctionJUnitTest.java |   132 +
 .../cli/shell/GfshHistoryJUnitTest.java         |    89 +
 .../SharedConfigurationDUnitTest.java           |    13 +-
 .../configuration/utils/XmlUtilsJUnitTest.java  |     8 +-
 .../internal/pulse/TestClientIdsDUnitTest.java  |    15 +-
 .../internal/pulse/TestFunctionsDUnitTest.java  |     4 +-
 .../internal/pulse/TestHeapDUnitTest.java       |     3 +-
 .../pulse/TestSubscriptionsDUnitTest.java       |    12 +-
 ...rDistributedSystemMXBeanIntegrationTest.java |    50 +
 ...horizeOperationForMBeansIntegrationTest.java |   323 +
 ...erationForRegionCommandsIntegrationTest.java |   136 +
 .../internal/security/JSONAuthCodeTest.java     |   200 -
 ...JSONAuthorizationDetailsIntegrationTest.java |   163 +
 .../security/JSONAuthorizationTest.java         |   168 -
 ...tionCodesForDataCommandsIntegrationTest.java |   101 +
 ...tionCodesForDistributedSystemMXBeanTest.java |    76 +
 .../security/ResourceOperationJUnit.java        |   394 -
 .../WanCommandsControllerJUnitTest.java         |     4 +-
 .../ClientsWithVersioningRetryDUnitTest.java    |     9 +-
 .../pdx/DistributedSystemIdDUnitTest.java       |     9 +-
 .../pdx/JSONPdxClientServerDUnitTest.java       |     8 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |     2 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |     2 +-
 .../pdx/PDXAsyncEventQueueDUnitTest.java        |     7 +-
 .../gemfire/pdx/PdxClientServerDUnitTest.java   |     9 +-
 .../pdx/PdxDeserializationDUnitTest.java        |     9 +-
 .../gemfire/pdx/PdxSerializableDUnitTest.java   |     9 +-
 .../gemfire/pdx/PdxTypeExportDUnitTest.java     |     5 +-
 .../gemfire/pdx/VersionClassLoader.java         |    16 +-
 .../gemfire/redis/ConcurrentStartTest.java      |    34 +-
 .../gemfire/redis/RedisDistDUnitTest.java       |    11 +-
 .../web/controllers/RestAPITestBase.java        |     7 +-
 .../security/ClientAuthenticationDUnitTest.java |   967 +
 .../ClientAuthenticationPart2DUnitTest.java     |    88 +
 .../security/ClientAuthorizationDUnitTest.java  |   798 +
 .../security/ClientAuthorizationTestBase.java   |  1384 ++
 .../security/ClientMultiUserAuthzDUnitTest.java |   536 +
 .../DeltaClientAuthorizationDUnitTest.java      |   335 +
 .../DeltaClientPostAuthorizationDUnitTest.java  |   540 +
 .../security/P2PAuthenticationDUnitTest.java    |   619 +
 .../gemfire/security/SecurityTestUtil.java      |  1870 ++
 .../gemfire/test/dunit/AsyncInvocation.java     |   215 +
 .../gemstone/gemfire/test/dunit/DUnitEnv.java   |    79 +
 .../gemfire/test/dunit/DistributedTestCase.java |  1434 ++
 .../com/gemstone/gemfire/test/dunit/Host.java   |   212 +
 .../gemfire/test/dunit/RMIException.java        |   170 +
 .../gemfire/test/dunit/RepeatableRunnable.java  |    29 +
 .../test/dunit/SerializableCallable.java        |    70 +
 .../test/dunit/SerializableCallableIF.java      |    24 +
 .../test/dunit/SerializableRunnable.java        |    92 +
 .../test/dunit/SerializableRunnableIF.java      |    23 +
 .../com/gemstone/gemfire/test/dunit/VM.java     |  1345 ++
 .../test/dunit/standalone/BounceResult.java     |    36 +
 .../gemfire/test/dunit/standalone/ChildVM.java  |    81 +
 .../test/dunit/standalone/DUnitLauncher.java    |   464 +
 .../test/dunit/standalone/ProcessManager.java   |   259 +
 .../test/dunit/standalone/RemoteDUnitVM.java    |   143 +
 .../test/dunit/standalone/RemoteDUnitVMIF.java  |    36 +
 .../dunit/standalone/StandAloneDUnitEnv.java    |    74 +
 .../test/dunit/tests/BasicDUnitTest.java        |   157 +
 .../gemfire/test/dunit/tests/VMDUnitTest.java   |   241 +
 .../test/process/ProcessOutputReader.java       |   101 +-
 .../test/process/ProcessStreamReader.java       |    42 +-
 .../gemfire/test/process/ProcessWrapper.java    |    10 +-
 .../gemstone/gemfire/util/JSR166TestCase.java   |    17 +-
 .../gemstone/persistence/logging/Logger.java    |     2 +-
 .../gemfire/GemfireSequenceDisplay.java         |     7 -
 .../src/test/java/dunit/AsyncInvocation.java    |   217 -
 .../src/test/java/dunit/BounceResult.java       |    36 -
 gemfire-core/src/test/java/dunit/DUnitEnv.java  |    78 -
 .../test/java/dunit/DistributedTestCase.java    |  1427 --
 gemfire-core/src/test/java/dunit/Host.java      |   208 -
 .../src/test/java/dunit/RMIException.java       |   170 -
 .../src/test/java/dunit/RemoteDUnitVMIF.java    |    34 -
 .../src/test/java/dunit/RepeatableRunnable.java |    29 -
 .../test/java/dunit/SerializableCallable.java   |    70 -
 .../test/java/dunit/SerializableRunnable.java   |    92 -
 gemfire-core/src/test/java/dunit/VM.java        |  1344 --
 .../src/test/java/dunit/standalone/ChildVM.java |    73 -
 .../java/dunit/standalone/DUnitLauncher.java    |   439 -
 .../java/dunit/standalone/ProcessManager.java   |   257 -
 .../java/dunit/standalone/RemoteDUnitVM.java    |   145 -
 .../dunit/standalone/StandAloneDUnitEnv.java    |    75 -
 .../test/java/dunit/tests/BasicDUnitTest.java   |   132 -
 .../src/test/java/dunit/tests/TestFailure.java  |    50 -
 .../src/test/java/dunit/tests/VMDUnitTest.java  |   237 -
 gemfire-core/src/test/java/hydra/GsRandom.java  |     1 -
 .../src/test/java/hydra/MethExecutor.java       |     2 +-
 .../src/test/java/hydra/log/AnyLogWriter.java   |     4 +-
 .../java/security/AuthzCredentialGenerator.java |   462 +
 .../test/java/security/CredentialGenerator.java |   343 +
 .../security/DummyAuthzCredentialGenerator.java |   145 +
 .../java/security/DummyCredentialGenerator.java |    94 +
 .../security/LdapUserCredentialGenerator.java   |   160 +
 .../java/security/PKCSCredentialGenerator.java  |   112 +
 .../java/security/SSLCredentialGenerator.java   |   117 +
 .../UserPasswordWithExtraPropsAuthInit.java     |    77 +
 .../security/XmlAuthzCredentialGenerator.java   |   264 +
 .../ClientCacheFactoryJUnitTest_single_pool.xml |    17 +
 .../gemfire/cache/query/dunit/IndexCreation.xml |    17 +
 .../functional/index-creation-with-eviction.xml |    17 +
 .../index-creation-without-eviction.xml         |    17 +
 .../functional/index-recovery-overflow.xml      |    17 +
 .../query/internal/index/cachequeryindex.xml    |    17 +
 .../internal/index/cachequeryindexwitherror.xml |    17 +
 .../cache/query/partitioned/PRIndexCreation.xml |    17 +
 .../gemfire/cache30/attributesUnordered.xml     |    17 +
 .../com/gemstone/gemfire/cache30/badFloat.xml   |    17 +
 .../com/gemstone/gemfire/cache30/badInt.xml     |    17 +
 .../gemfire/cache30/badKeyConstraintClass.xml   |    17 +
 .../com/gemstone/gemfire/cache30/badScope.xml   |    17 +
 .../com/gemstone/gemfire/cache30/bug44710.xml   |    17 +
 .../gemfire/cache30/callbackNotDeclarable.xml   |    17 +
 .../gemfire/cache30/callbackWithException.xml   |    17 +
 .../com/gemstone/gemfire/cache30/coLocation.xml |    17 +
 .../gemstone/gemfire/cache30/coLocation3.xml    |    17 +
 .../com/gemstone/gemfire/cache30/ewtest.xml     |    17 +
 .../cache30/examples_3_0/example-cache.xml      |    16 +
 .../cache30/examples_4_0/example-cache.xml      |    16 +
 .../gemfire/cache30/loaderNotLoader.xml         |    17 +
 .../com/gemstone/gemfire/cache30/malformed.xml  |    17 +
 .../gemfire/cache30/namedAttributes.xml         |    17 +
 .../gemfire/cache30/partitionedRegion.xml       |    17 +
 .../gemfire/cache30/partitionedRegion51.xml     |    17 +
 .../gemstone/gemfire/cache30/sameRootRegion.xml |    17 +
 .../gemstone/gemfire/cache30/sameSubregion.xml  |    17 +
 .../gemfire/cache30/unknownNamedAttributes.xml  |    17 +
 .../gemfire/codeAnalysis/excludedClasses.txt    |     1 +
 .../sanctionedDataSerializables.txt             |   244 +-
 .../codeAnalysis/sanctionedSerializables.txt    |     5 +-
 .../internal/SharedConfigurationJUnitTest.xml   |    17 +
 .../internal/cache/BackupJUnitTest.cache.xml    |    17 +
 .../internal/cache/DiskRegCacheXmlJUnitTest.xml |    16 +
 .../cache/PartitionRegionCacheExample1.xml      |    17 +
 .../cache/PartitionRegionCacheExample2.xml      |    17 +
 .../incorrect_bytes_threshold.xml               |    17 +
 .../faultyDiskXMLsForTesting/incorrect_dir.xml  |    17 +
 .../incorrect_dir_size.xml                      |    17 +
 .../incorrect_max_oplog_size.xml                |    17 +
 .../incorrect_roll_oplogs_value.xml             |    17 +
 .../incorrect_sync_value.xml                    |    17 +
 .../incorrect_time_interval.xml                 |    17 +
 .../mixed_diskstore_diskdir.xml                 |    17 +
 .../mixed_diskstore_diskwriteattrs.xml          |    17 +
 .../tier/sockets/RedundancyLevelJUnitTest.xml   |    16 +
 ...testDTDFallbackWithNonEnglishLocal.cache.xml |    17 +
 .../gemstone/gemfire/internal/jta/cachejta.xml  |    17 +
 .../src/test/resources/jta/cachejta.xml         |    17 +
 .../src/test/resources/lib/authz-dummy.xml      |   126 +
 .../src/test/resources/lib/authz-ldap.xml       |    85 +
 .../resources/lib/authz-multiUser-dummy.xml     |   106 +
 .../test/resources/lib/authz-multiUser-ldap.xml |    83 +
 .../test/resources/lib/keys/gemfire1.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire10.keystore  |   Bin 0 -> 1546 bytes
 .../test/resources/lib/keys/gemfire11.keystore  |   Bin 0 -> 1546 bytes
 .../test/resources/lib/keys/gemfire2.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire3.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire4.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire5.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire6.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire7.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire8.keystore   |   Bin 0 -> 1536 bytes
 .../test/resources/lib/keys/gemfire9.keystore   |   Bin 0 -> 1536 bytes
 .../resources/lib/keys/ibm/gemfire1.keystore    |   Bin 0 -> 1426 bytes
 .../resources/lib/keys/ibm/gemfire10.keystore   |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire11.keystore   |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire2.keystore    |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire3.keystore    |   Bin 0 -> 1426 bytes
 .../resources/lib/keys/ibm/gemfire4.keystore    |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire5.keystore    |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire6.keystore    |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire7.keystore    |   Bin 0 -> 1426 bytes
 .../resources/lib/keys/ibm/gemfire8.keystore    |   Bin 0 -> 1434 bytes
 .../resources/lib/keys/ibm/gemfire9.keystore    |   Bin 0 -> 1426 bytes
 .../test/resources/lib/keys/ibm/publickeyfile   |   Bin 0 -> 4535 bytes
 .../src/test/resources/lib/keys/publickeyfile   |   Bin 0 -> 4535 bytes
 .../resources/spring/spring-gemfire-context.xml |    17 +
 .../src/test/resources/ssl/untrusted.keystore   |   Bin 0 -> 1181 bytes
 .../resources/templates/security/authz5_5.dtd   |    16 +
 .../resources/templates/security/authz6_0.dtd   |    16 +
 gemfire-cq/build.gradle                         |    23 +
 .../cache/client/internal/CloseCQOp.java        |    72 +
 .../cache/client/internal/CreateCQOp.java       |   163 +
 .../cache/client/internal/CreateCQWithIROp.java |    92 +
 .../cache/client/internal/GetDurableCQsOp.java  |   135 +
 .../client/internal/ServerCQProxyImpl.java      |   111 +
 .../gemfire/cache/client/internal/StopCQOp.java |    72 +
 .../cache/query/internal/cq/ClientCQImpl.java   |   615 +
 .../internal/cq/CqAttributesMutatorImpl.java    |    68 +
 .../cache/query/internal/cq/CqConflatable.java  |   223 +
 .../cache/query/internal/cq/CqEventImpl.java    |   162 +
 .../cache/query/internal/cq/CqListenerImpl.java |    56 +
 .../cache/query/internal/cq/CqQueryImpl.java    |   383 +
 .../query/internal/cq/CqServiceFactoryImpl.java |    69 +
 .../cache/query/internal/cq/CqServiceImpl.java  |  2087 ++
 .../internal/cq/CqServiceStatisticsImpl.java    |   100 +
 .../query/internal/cq/CqServiceVsdStats.java    |   411 +
 .../query/internal/cq/CqStatisticsImpl.java     |    75 +
 .../cache/query/internal/cq/ServerCQImpl.java   |   655 +
 .../tier/sockets/command/BaseCQCommand.java     |    59 +
 .../cache/tier/sockets/command/CloseCQ.java     |   131 +
 .../cache/tier/sockets/command/ExecuteCQ.java   |   168 +
 .../cache/tier/sockets/command/ExecuteCQ61.java |   220 +
 .../cache/tier/sockets/command/GetCQStats.java  |   100 +
 .../tier/sockets/command/GetDurableCQs.java     |   143 +
 .../cache/tier/sockets/command/MonitorCQ.java   |   100 +
 .../cache/tier/sockets/command/StopCQ.java      |   135 +
 ...cache.query.internal.cq.spi.CqServiceFactory |    15 +
 .../gemfire/cache/query/cq/CQJUnitTest.java     |   150 +
 .../cache/query/cq/dunit/CqDataDUnitTest.java   |  1162 ++
 .../dunit/CqDataOptimizedExecuteDUnitTest.java  |    54 +
 .../cq/dunit/CqDataUsingPoolDUnitTest.java      |  1567 ++
 ...qDataUsingPoolOptimizedExecuteDUnitTest.java |    53 +
 .../cache/query/cq/dunit/CqPerfDUnitTest.java   |  1044 +
 .../cq/dunit/CqPerfUsingPoolDUnitTest.java      |  1004 +
 .../cache/query/cq/dunit/CqQueryDUnitTest.java  |  4004 ++++
 .../dunit/CqQueryOptimizedExecuteDUnitTest.java |   311 +
 .../cq/dunit/CqQueryUsingPoolDUnitTest.java     |  3322 ++++
 ...QueryUsingPoolOptimizedExecuteDUnitTest.java |    50 +
 .../cq/dunit/CqResultSetUsingPoolDUnitTest.java |  1139 ++
 ...ltSetUsingPoolOptimizedExecuteDUnitTest.java |   231 +
 .../cache/query/cq/dunit/CqStateDUnitTest.java  |   134 +
 .../cache/query/cq/dunit/CqStatsDUnitTest.java  |   441 +
 .../dunit/CqStatsOptimizedExecuteDUnitTest.java |    50 +
 .../cq/dunit/CqStatsUsingPoolDUnitTest.java     |   452 +
 ...StatsUsingPoolOptimizedExecuteDUnitTest.java |    50 +
 .../query/cq/dunit/CqTimeTestListener.java      |   266 +
 .../PartitionedRegionCqQueryDUnitTest.java      |  1788 ++
 ...dRegionCqQueryOptimizedExecuteDUnitTest.java |   246 +
 .../query/cq/dunit/PrCqUsingPoolDUnitTest.java  |  2029 ++
 .../PrCqUsingPoolOptimizedExecuteDUnitTest.java |    50 +
 .../cache/query/dunit/PdxQueryCQDUnitTest.java  |   702 +
 .../cache/query/dunit/PdxQueryCQTestBase.java   |   494 +
 .../dunit/QueryIndexUpdateRIDUnitTest.java      |   819 +
 .../query/dunit/QueryMonitorDUnitTest.java      |  1296 ++
 .../cache/snapshot/ClientSnapshotDUnitTest.java |   284 +
 .../AnalyzeCQSerializablesJUnitTest.java        |    79 +
 .../cache/PRDeltaPropagationDUnitTest.java      |  1212 ++
 .../internal/cache/PutAllCSDUnitTest.java       |  4419 +++++
 .../cache/RemoteCQTransactionDUnitTest.java     |  1116 ++
 .../internal/cache/ha/CQListGIIDUnitTest.java   |   820 +
 .../cache/ha/HADispatcherDUnitTest.java         |   695 +
 .../sockets/ClientToServerDeltaDUnitTest.java   |  1037 +
 .../DeltaPropagationWithCQDUnitTest.java        |   341 +
 ...ToRegionRelationCQRegistrationDUnitTest.java |   786 +
 .../sockets/DurableClientCrashDUnitTest.java    |    99 +
 .../sockets/DurableClientNetDownDUnitTest.java  |    80 +
 .../sockets/DurableClientSimpleDUnitTest.java   |  3404 ++++
 .../tier/sockets/DurableClientTestCase.java     |  2089 ++
 .../CacheServerManagementDUnitTest.java         |   571 +
 .../cli/commands/ClientCommandsDUnitTest.java   |  1443 ++
 .../DurableClientCommandsDUnitTest.java         |   433 +
 .../internal/pulse/TestCQDUnitTest.java         |   147 +
 .../internal/pulse/TestClientsDUnitTest.java    |   108 +
 .../internal/pulse/TestServerDUnitTest.java     |    99 +
 .../ClientAuthorizationTwoDUnitTest.java        |   245 +
 .../security/ClientAuthzObjectModDUnitTest.java |   416 +
 .../ClientCQPostAuthorizationDUnitTest.java     |   522 +
 .../ClientPostAuthorizationDUnitTest.java       |   398 +
 .../gemfire/security/MultiuserAPIDUnitTest.java |   391 +
 .../MultiuserDurableCQAuthzDUnitTest.java       |   489 +
 .../gemfire/codeAnalysis/excludedClasses.txt    |     2 +
 .../gemstone/gemfire/codeAnalysis/openBugs.txt  |    21 +
 .../sanctionedDataSerializables.txt             |     4 +
 .../codeAnalysis/sanctionedSerializables.txt    |     1 +
 .../tier/sockets/durablecq-client-cache.xml     |    37 +
 .../tier/sockets/durablecq-server-cache.xml     |    32 +
 .../joptsimple/internal/AbbreviationMap.java    |     1 -
 .../src/main/java/org/json/JSONObject.java      |     3 -
 gemfire-junit/build.gradle                      |    21 +
 .../gemfire/test/junit/ConditionalIgnore.java   |    49 +
 .../gemfire/test/junit/IgnoreCondition.java     |    32 +
 .../gemfire/test/junit/IgnoreUntil.java         |    49 +
 .../com/gemstone/gemfire/test/junit/Repeat.java |    43 +
 .../com/gemstone/gemfire/test/junit/Retry.java  |    38 +
 .../test/junit/categories/ContainerTest.java    |    25 +
 .../test/junit/categories/DistributedTest.java  |    25 +
 .../categories/DistributedTransactionsTest.java |    26 +
 .../test/junit/categories/HydraTest.java        |    24 +
 .../test/junit/categories/IntegrationTest.java  |    25 +
 .../test/junit/categories/PerformanceTest.java  |    25 +
 .../gemfire/test/junit/categories/UITest.java   |    24 +
 .../gemfire/test/junit/categories/UnitTest.java |    25 +
 .../gemfire/test/junit/categories/WanTest.java  |    24 +
 .../test/junit/rules/ConditionalIgnoreRule.java |   123 +
 .../test/junit/rules/ExpectedTimeout.java       |   180 +
 .../test/junit/rules/ExpectedTimeoutRule.java   |   180 +
 .../test/junit/rules/IgnoreUntilRule.java       |   123 +
 .../gemfire/test/junit/rules/RepeatRule.java    |    81 +
 .../gemfire/test/junit/rules/RetryRule.java     |   181 +
 .../rules/SerializableExternalResource.java     |   107 +
 .../test/junit/rules/SerializableRuleChain.java |   119 +
 .../rules/SerializableTemporaryFolder.java      |    70 +
 .../test/junit/rules/SerializableTestName.java  |    54 +
 .../test/junit/rules/SerializableTestRule.java  |    33 +
 .../junit/rules/SerializableTestWatcher.java    |    29 +
 .../test/junit/rules/SerializableTimeout.java   |   119 +
 .../junit/support/DefaultIgnoreCondition.java   |    57 +
 .../IgnoreConditionEvaluationException.java     |    43 +
 .../test/junit/categories/DistributedTest.java  |    25 -
 .../categories/DistributedTransactionsTest.java |    26 -
 .../test/junit/categories/IntegrationTest.java  |    25 -
 .../test/junit/categories/PerformanceTest.java  |    25 -
 .../gemfire/test/junit/categories/UnitTest.java |    25 -
 .../gemfire/test/junit/categories/WanTest.java  |    24 -
 .../test/junit/rules/ExpectedTimeout.java       |   180 -
 .../examples/RepeatingTestCasesExampleTest.java |    94 +
 .../rules/examples/RetryRuleExampleTest.java    |    43 +
 .../rules/tests/ExpectedTimeoutRuleTest.java    |   214 +
 .../junit/rules/tests/IgnoreUntilRuleTest.java  |   121 +
 .../junit/rules/tests/JUnitRuleTestSuite.java   |    33 +
 .../test/junit/rules/tests/RepeatRuleTest.java  |   304 +
 .../tests/RetryRuleGlobalWithErrorTest.java     |   250 +
 .../tests/RetryRuleGlobalWithExceptionTest.java |   254 +
 .../tests/RetryRuleLocalWithErrorTest.java      |   207 +
 .../tests/RetryRuleLocalWithExceptionTest.java  |   213 +
 .../junit/rules/tests/RuleAndClassRuleTest.java |   138 +
 .../test/junit/rules/tests/TestRunner.java      |    37 +
 gemfire-lucene/build.gradle                     |    25 +-
 .../cache/lucene/LuceneQueryFactory.java        |    11 +-
 .../cache/lucene/LuceneQueryProvider.java       |     2 +-
 .../gemfire/cache/lucene/LuceneService.java     |     9 +-
 .../internal/repository/RepositoryManager.java  |     1 -
 .../lucene/internal/xml/LuceneXmlConstants.java |     2 +-
 .../geode.apache.org/lucene/lucene-1.0.xsd      |    57 +
 .../lucene/lucene-1.0.xsd                       |    42 -
 .../PartitionedRepositoryManagerJUnitTest.java  |     4 +-
 .../LuceneFunctionReadPathDUnitTest.java        |     7 +-
 ...IndexRepositoryImplJUnitPerformanceTest.java |   437 -
 .../IndexRepositoryImplPerformanceTest.java     |   439 +
 ...erIntegrationJUnitTest.createIndex.cache.xml |    23 +-
 ...serIntegrationJUnitTest.parseIndex.cache.xml |    23 +-
 gemfire-pulse/build.gradle                      |   116 +
 .../tools/pulse/internal/PulseAppListener.java  |   703 +
 .../controllers/ExceptionHandlingAdvice.java    |    52 +
 .../internal/controllers/PulseController.java   |   587 +
 .../tools/pulse/internal/data/Cluster.java      |  3808 ++++
 .../tools/pulse/internal/data/DataBrowser.java  |   281 +
 .../pulse/internal/data/IClusterUpdater.java    |    37 +
 .../pulse/internal/data/JMXDataUpdater.java     |  2449 +++
 .../pulse/internal/data/JmxManagerFinder.java   |   171 +
 .../tools/pulse/internal/data/PulseConfig.java  |   126 +
 .../pulse/internal/data/PulseConstants.java     |   416 +
 .../tools/pulse/internal/data/PulseVersion.java |   104 +
 .../tools/pulse/internal/data/Repository.java   |   215 +
 .../gemfire/tools/pulse/internal/json/CDL.java  |   274 +
 .../tools/pulse/internal/json/Cookie.java       |   164 +
 .../tools/pulse/internal/json/CookieList.java   |    85 +
 .../gemfire/tools/pulse/internal/json/HTTP.java |   158 +
 .../tools/pulse/internal/json/HTTPTokener.java  |    72 +
 .../tools/pulse/internal/json/JSONArray.java    |   901 +
 .../pulse/internal/json/JSONException.java      |    47 +
 .../tools/pulse/internal/json/JSONML.java       |   462 +
 .../tools/pulse/internal/json/JSONObject.java   |  1585 ++
 .../tools/pulse/internal/json/JSONString.java   |    37 +
 .../tools/pulse/internal/json/JSONStringer.java |    73 +
 .../tools/pulse/internal/json/JSONTokener.java  |   441 +
 .../tools/pulse/internal/json/JSONWriter.java   |   322 +
 .../gemfire/tools/pulse/internal/json/README    |    68 +
 .../gemfire/tools/pulse/internal/json/XML.java  |   503 +
 .../tools/pulse/internal/json/XMLTokener.java   |   360 +
 .../tools/pulse/internal/log/LogWriter.java     |   266 +
 .../pulse/internal/log/MessageFormatter.java    |   103 +
 .../pulse/internal/log/PulseLogWriter.java      |   306 +
 .../tools/pulse/internal/log/PulseLogger.java   |   144 +
 .../internal/service/ClusterDetailsService.java |   109 +
 .../service/ClusterDiskThroughputService.java   |    79 +
 .../service/ClusterGCPausesService.java         |    71 +
 .../service/ClusterKeyStatisticsService.java    |    79 +
 .../internal/service/ClusterMemberService.java  |   133 +
 .../service/ClusterMembersRGraphService.java    |   372 +
 .../service/ClusterMemoryUsageService.java      |    70 +
 .../internal/service/ClusterRegionService.java  |   241 +
 .../internal/service/ClusterRegionsService.java |   243 +
 .../service/ClusterSelectedRegionService.java   |   278 +
 .../ClusterSelectedRegionsMemberService.java    |   146 +
 .../internal/service/ClusterWANInfoService.java |    82 +
 .../service/MemberAsynchEventQueuesService.java |   107 +
 .../internal/service/MemberClientsService.java  |   123 +
 .../internal/service/MemberDetailsService.java  |   129 +
 .../service/MemberDiskThroughputService.java    |    93 +
 .../internal/service/MemberGCPausesService.java |    85 +
 .../service/MemberGatewayHubService.java        |   163 +
 .../service/MemberHeapUsageService.java         |    85 +
 .../service/MemberKeyStatisticsService.java     |    98 +
 .../internal/service/MemberRegionsService.java  |   140 +
 .../internal/service/MembersListService.java    |    78 +
 .../pulse/internal/service/PulseService.java    |    42 +
 .../internal/service/PulseServiceFactory.java   |    56 +
 .../internal/service/PulseVersionService.java   |    74 +
 .../service/QueryStatisticsService.java         |   152 +
 .../internal/service/SystemAlertsService.java   |   134 +
 .../pulse/internal/util/ConnectionUtil.java     |    47 +
 .../pulse/internal/util/IPAddressUtil.java      |    66 +
 .../tools/pulse/internal/util/StringUtils.java  |    86 +
 .../tools/pulse/internal/util/TimeUtils.java    |   121 +
 .../main/resources/LogMessages_en_US.properties |    97 +
 .../main/resources/LogMessages_fr_FR.properties |    91 +
 .../src/main/resources/default.properties       |    23 +
 .../src/main/resources/gemfire.properties       |    47 +
 .../src/main/resources/pulse-users.properties   |    30 +
 .../src/main/resources/pulse.properties         |    54 +
 .../src/main/resources/pulsesecurity.properties |    26 +
 .../src/main/resources/sqlfire.properties       |    47 +
 gemfire-pulse/src/main/webapp/DataBrowser.html  |   367 +
 gemfire-pulse/src/main/webapp/Login.html        |   142 +
 .../src/main/webapp/META-INF/MANIFEST.MF        |     3 +
 .../src/main/webapp/MemberDetails.html          |   618 +
 .../src/main/webapp/QueryStatistics.html        |   323 +
 .../webapp/WEB-INF/mvc-dispatcher-servlet.xml   |    35 +
 .../src/main/webapp/WEB-INF/spring-security.xml |    83 +
 gemfire-pulse/src/main/webapp/WEB-INF/web.xml   |    62 +
 .../src/main/webapp/clusterDetail.html          |   676 +
 .../src/main/webapp/css/ForceDirected.css       |    46 +
 gemfire-pulse/src/main/webapp/css/Treemap.css   |   134 +
 gemfire-pulse/src/main/webapp/css/base.css      |    74 +
 gemfire-pulse/src/main/webapp/css/common.css    |   240 +
 .../webapp/css/fonts/DroidSans-Bold-webfont.eot |   Bin 0 -> 43462 bytes
 .../webapp/css/fonts/DroidSans-Bold-webfont.svg |   271 +
 .../webapp/css/fonts/DroidSans-Bold-webfont.ttf |   Bin 0 -> 43260 bytes
 .../css/fonts/DroidSans-Bold-webfont.woff       |   Bin 0 -> 27120 bytes
 .../main/webapp/css/fonts/DroidSans-webfont.eot |   Bin 0 -> 44926 bytes
 .../main/webapp/css/fonts/DroidSans-webfont.svg |   271 +
 .../main/webapp/css/fonts/DroidSans-webfont.ttf |   Bin 0 -> 44712 bytes
 .../webapp/css/fonts/DroidSans-webfont.woff     |   Bin 0 -> 27672 bytes
 .../src/main/webapp/css/grid/ui.jqgrid.css      |   850 +
 gemfire-pulse/src/main/webapp/css/ie/ie.css     |    19 +
 gemfire-pulse/src/main/webapp/css/ie/ie7.css    |    21 +
 gemfire-pulse/src/main/webapp/css/ie/ie8.css    |    20 +
 gemfire-pulse/src/main/webapp/css/ie/ie9.css    |    20 +
 gemfire-pulse/src/main/webapp/css/jquery-ui.css |   566 +
 .../src/main/webapp/css/jquery.jscrollpane.css  |   121 +
 .../src/main/webapp/css/jquery.ui.all.css       |    11 +
 .../src/main/webapp/css/jquery.ui.core.css      |    41 +
 .../src/main/webapp/css/jquery.ui.theme.css     |   248 +
 .../src/main/webapp/css/jquery.ztreestyle.css   |    90 +
 .../css/multiselect/jquery.multiselect.css      |   301 +
 .../main/webapp/css/multiselect/prettify.css    |    46 +
 .../src/main/webapp/css/multiselect/style.css   |    35 +
 gemfire-pulse/src/main/webapp/css/popup.css     |    55 +
 gemfire-pulse/src/main/webapp/css/style.css     |  3067 +++
 .../src/main/webapp/css/treeView/Treemap.css    |   134 +
 .../src/main/webapp/images/about-gemfirexd.png  |   Bin 0 -> 4440 bytes
 .../src/main/webapp/images/about-sqlfire.png    |   Bin 0 -> 6277 bytes
 gemfire-pulse/src/main/webapp/images/about.png  |   Bin 0 -> 4421 bytes
 .../src/main/webapp/images/acc-minus.png        |   Bin 0 -> 1049 bytes
 .../src/main/webapp/images/acc-n-minus.png      |   Bin 0 -> 961 bytes
 .../src/main/webapp/images/acc-n-plus.png       |   Bin 0 -> 988 bytes
 .../src/main/webapp/images/acc-plus.png         |   Bin 0 -> 1047 bytes
 .../src/main/webapp/images/activeServer.png     |   Bin 0 -> 2846 bytes
 .../src/main/webapp/images/arrow-down.png       |   Bin 0 -> 986 bytes
 .../src/main/webapp/images/arrow-up.png         |   Bin 0 -> 988 bytes
 .../src/main/webapp/images/bg-image.png         |   Bin 0 -> 948 bytes
 .../src/main/webapp/images/bg-imageLogin.png    |   Bin 0 -> 946 bytes
 .../src/main/webapp/images/blue-msg-icon.png    |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/border-left-grid.png |   Bin 0 -> 927 bytes
 .../src/main/webapp/images/bread-crumb.png      |   Bin 0 -> 1182 bytes
 .../src/main/webapp/images/bubble_arrow.png     |   Bin 0 -> 1168 bytes
 .../src/main/webapp/images/chart-active.png     |   Bin 0 -> 1096 bytes
 gemfire-pulse/src/main/webapp/images/chart.png  |   Bin 0 -> 1095 bytes
 .../src/main/webapp/images/checkbox.png         |   Bin 0 -> 1630 bytes
 gemfire-pulse/src/main/webapp/images/chkbox.png |   Bin 0 -> 1313 bytes
 .../src/main/webapp/images/copy_icon.png        |   Bin 0 -> 1172 bytes
 .../src/main/webapp/images/correct_icon.png     |   Bin 0 -> 1143 bytes
 .../main/webapp/images/correct_small_icon.png   |   Bin 0 -> 1065 bytes
 .../main/webapp/images/correct_white_icon.png   |   Bin 0 -> 1122 bytes
 gemfire-pulse/src/main/webapp/images/cross.png  |   Bin 0 -> 2954 bytes
 .../main/webapp/images/dataViewWanEnabled.png   |   Bin 0 -> 1204 bytes
 .../src/main/webapp/images/dd_active.png        |   Bin 0 -> 1065 bytes
 .../src/main/webapp/images/dd_arrow.png         |   Bin 0 -> 1058 bytes
 .../webapp/images/error-locators-others.png     |   Bin 0 -> 2052 bytes
 .../src/main/webapp/images/error-locators.png   |   Bin 0 -> 2023 bytes
 .../images/error-manager-locator-others.png     |   Bin 0 -> 2067 bytes
 .../webapp/images/error-manager-locator.png     |   Bin 0 -> 2047 bytes
 .../webapp/images/error-managers-others.png     |   Bin 0 -> 2051 bytes
 .../src/main/webapp/images/error-managers.png   |   Bin 0 -> 2025 bytes
 .../main/webapp/images/error-message-icon.png   |   Bin 0 -> 1193 bytes
 .../src/main/webapp/images/error-msg-icon.png   |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/error-others.png     |   Bin 0 -> 2066 bytes
 .../src/main/webapp/images/error-otheruser.png  |   Bin 0 -> 2002 bytes
 .../main/webapp/images/error-status-icon.png    |   Bin 0 -> 2024 bytes
 gemfire-pulse/src/main/webapp/images/error.png  |   Bin 0 -> 1110 bytes
 .../src/main/webapp/images/graph-active.png     |   Bin 0 -> 1360 bytes
 gemfire-pulse/src/main/webapp/images/graph.png  |   Bin 0 -> 1374 bytes
 .../images/graph/key-statistics-graph.png       |   Bin 0 -> 1617 bytes
 .../webapp/images/graph/memory-usage-graph.png  |   Bin 0 -> 4366 bytes
 .../src/main/webapp/images/graph/reads.png      |   Bin 0 -> 3423 bytes
 .../images/graph/throughput-writes-graph.png    |   Bin 0 -> 4340 bytes
 .../src/main/webapp/images/graph/topology.png   |   Bin 0 -> 14997 bytes
 .../src/main/webapp/images/graph/treeview.png   |   Bin 0 -> 3386 bytes
 .../src/main/webapp/images/graph/writes.png     |   Bin 0 -> 3527 bytes
 .../src/main/webapp/images/grid-active.png      |   Bin 0 -> 1095 bytes
 gemfire-pulse/src/main/webapp/images/grid.png   |   Bin 0 -> 1094 bytes
 .../webapp/images/header-bg-bottom-border.png   |   Bin 0 -> 924 bytes
 .../src/main/webapp/images/hide_ico.png         |   Bin 0 -> 3281 bytes
 .../src/main/webapp/images/history-icon.png     |   Bin 0 -> 3533 bytes
 .../src/main/webapp/images/history-remove.png   |   Bin 0 -> 1185 bytes
 .../src/main/webapp/images/hor-spiltter-dot.png |   Bin 0 -> 990 bytes
 .../webapp/images/icons members/locators.png    |   Bin 0 -> 3106 bytes
 .../images/icons members/locators_others.png    |   Bin 0 -> 3118 bytes
 .../webapp/images/icons members/managers.png    |   Bin 0 -> 3103 bytes
 .../images/icons members/managers_locators.png  |   Bin 0 -> 3120 bytes
 .../images/icons members/managers_others.png    |   Bin 0 -> 3117 bytes
 .../main/webapp/images/icons members/others.png |   Bin 0 -> 3102 bytes
 .../src/main/webapp/images/info-msg-icon.png    |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/lastLine.png         |   Bin 0 -> 948 bytes
 gemfire-pulse/src/main/webapp/images/line.png   |   Bin 0 -> 929 bytes
 .../src/main/webapp/images/mask-bg.png          |   Bin 0 -> 940 bytes
 .../webapp/images/membersName_arror-off.png     |   Bin 0 -> 1148 bytes
 .../main/webapp/images/membersName_arror-on.png |   Bin 0 -> 1170 bytes
 gemfire-pulse/src/main/webapp/images/minus.png  |   Bin 0 -> 2959 bytes
 .../webapp/images/normal-locators-others.png    |   Bin 0 -> 2025 bytes
 .../src/main/webapp/images/normal-locators.png  |   Bin 0 -> 1995 bytes
 .../images/normal-manager-locator-others.png    |   Bin 0 -> 2037 bytes
 .../webapp/images/normal-manager-locator.png    |   Bin 0 -> 2029 bytes
 .../webapp/images/normal-managers-others.png    |   Bin 0 -> 2027 bytes
 .../src/main/webapp/images/normal-managers.png  |   Bin 0 -> 1997 bytes
 .../src/main/webapp/images/normal-others.png    |   Bin 0 -> 1988 bytes
 .../src/main/webapp/images/normal-otheruser.png |   Bin 0 -> 1968 bytes
 .../main/webapp/images/normal-status-icon.png   |   Bin 0 -> 1955 bytes
 gemfire-pulse/src/main/webapp/images/normal.png |   Bin 0 -> 1110 bytes
 .../src/main/webapp/images/orange-msg-icon.png  |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/pivotal-logo.png     |   Bin 0 -> 4302 bytes
 gemfire-pulse/src/main/webapp/images/plus.png   |   Bin 0 -> 1178 bytes
 .../src/main/webapp/images/plusMinusIcon.png    |   Bin 0 -> 1192 bytes
 .../src/main/webapp/images/popup-arrow.png      |   Bin 0 -> 1075 bytes
 .../main/webapp/images/popup-close-button.png   |   Bin 0 -> 1026 bytes
 .../images/pulse-monitoring-gemfirexd-old.png   |   Bin 0 -> 6606 bytes
 .../images/pulse-monitoring-gemfirexd.png       |   Bin 0 -> 4440 bytes
 .../webapp/images/pulse-monitoring-sqlfire.png  |   Bin 0 -> 6467 bytes
 .../src/main/webapp/images/pulse-monitoring.png |   Bin 0 -> 4741 bytes
 .../src/main/webapp/images/radio-off.png        |   Bin 0 -> 1252 bytes
 .../src/main/webapp/images/radio-on.png         |   Bin 0 -> 1306 bytes
 gemfire-pulse/src/main/webapp/images/radio.png  |   Bin 0 -> 2476 bytes
 .../src/main/webapp/images/regionIcons.png      |   Bin 0 -> 1495 bytes
 .../src/main/webapp/images/rightBorder.png      |   Bin 0 -> 927 bytes
 .../src/main/webapp/images/searchIcon.png       |   Bin 0 -> 1592 bytes
 .../src/main/webapp/images/seperator.png        |   Bin 0 -> 929 bytes
 gemfire-pulse/src/main/webapp/images/server.png |   Bin 0 -> 1233 bytes
 .../webapp/images/severe-locators-others.png    |   Bin 0 -> 2026 bytes
 .../src/main/webapp/images/severe-locators.png  |   Bin 0 -> 1980 bytes
 .../images/severe-manager-locator-others.png    |   Bin 0 -> 2032 bytes
 .../webapp/images/severe-manager-locator.png    |   Bin 0 -> 2026 bytes
 .../webapp/images/severe-managers-others.png    |   Bin 0 -> 2026 bytes
 .../src/main/webapp/images/severe-managers.png  |   Bin 0 -> 1985 bytes
 .../src/main/webapp/images/severe-msg-icon.png  |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/severe-others.png    |   Bin 0 -> 2007 bytes
 .../src/main/webapp/images/severe-otheruser.png |   Bin 0 -> 1959 bytes
 .../main/webapp/images/severe-status-icon.png   |   Bin 0 -> 2218 bytes
 gemfire-pulse/src/main/webapp/images/severe.png |   Bin 0 -> 1110 bytes
 .../src/main/webapp/images/show_ico.png         |   Bin 0 -> 3296 bytes
 gemfire-pulse/src/main/webapp/images/spacer.png |   Bin 0 -> 922 bytes
 .../src/main/webapp/images/sqlfire.png          |   Bin 0 -> 6467 bytes
 .../src/main/webapp/images/status-down.png      |   Bin 0 -> 1125 bytes
 .../src/main/webapp/images/status-up.png        |   Bin 0 -> 1104 bytes
 .../src/main/webapp/images/subServer.png        |   Bin 0 -> 2201 bytes
 .../src/main/webapp/images/tab-bottom-bg.png    |   Bin 0 -> 929 bytes
 .../src/main/webapp/images/treeView-img.png     |   Bin 0 -> 962 bytes
 .../main/webapp/images/ui-anim_basic_16x16.gif  |   Bin 0 -> 1459 bytes
 .../src/main/webapp/images/ver-spiltter-dot.png |   Bin 0 -> 979 bytes
 .../webapp/images/warning-locators-others.png   |   Bin 0 -> 2048 bytes
 .../src/main/webapp/images/warning-locators.png |   Bin 0 -> 2032 bytes
 .../images/warning-manager-locator-others.png   |   Bin 0 -> 2071 bytes
 .../webapp/images/warning-manager-locator.png   |   Bin 0 -> 2052 bytes
 .../webapp/images/warning-managers-others.png   |   Bin 0 -> 2023 bytes
 .../src/main/webapp/images/warning-managers.png |   Bin 0 -> 2030 bytes
 .../src/main/webapp/images/warning-msg-icon.png |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/warning-others.png   |   Bin 0 -> 2027 bytes
 .../main/webapp/images/warning-otheruser.png    |   Bin 0 -> 2010 bytes
 .../main/webapp/images/warning-status-icon.png  |   Bin 0 -> 1714 bytes
 .../src/main/webapp/images/warning.png          |   Bin 0 -> 1107 bytes
 .../src/main/webapp/images/yellow-msg-icon.png  |   Bin 0 -> 1194 bytes
 gemfire-pulse/src/main/webapp/index.html        |    67 +
 .../main/webapp/properties/default.properties   |    21 +
 .../webapp/properties/default_en.properties     |    21 +
 .../main/webapp/properties/gemfire.properties   |    45 +
 .../webapp/properties/gemfire_en.properties     |    45 +
 .../main/webapp/properties/gemfirexd.properties |    45 +
 .../webapp/properties/gemfirexd_en.properties   |    45 +
 .../src/main/webapp/properties/index.properties |    18 +
 .../main/webapp/properties/index_fr.properties  |    19 +
 .../main/webapp/properties/sqlfire.properties   |    45 +
 gemfire-pulse/src/main/webapp/regionDetail.html |   567 +
 .../src/main/webapp/scripts/lib/common.js       |   536 +
 .../src/main/webapp/scripts/lib/excanvas.js     |  1416 ++
 .../main/webapp/scripts/lib/grid.locale-en.js   |   169 +
 .../src/main/webapp/scripts/lib/html5.js        |     3 +
 .../src/main/webapp/scripts/lib/jit.js          | 17208 +++++++++++++++++
 .../src/main/webapp/scripts/lib/jquery-1.7.2.js |  9404 +++++++++
 .../webapp/scripts/lib/jquery.generateFile.js   |    77 +
 .../scripts/lib/jquery.i18n.properties.js       |   336 +
 .../webapp/scripts/lib/jquery.jqGrid.src.js     | 12182 ++++++++++++
 .../webapp/scripts/lib/jquery.jscrollpane.js    |  1340 ++
 .../webapp/scripts/lib/jquery.mousewheel.js     |    84 +
 .../webapp/scripts/lib/jquery.placeholder.js    |   106 +
 .../main/webapp/scripts/lib/jquery.sparkline.js |  3001 +++
 .../main/webapp/scripts/lib/jquery.tablednd.js  |   383 +
 .../main/webapp/scripts/lib/jquery.timeago.js   |   193 +
 .../webapp/scripts/lib/jquery.ztree.core-3.5.js |  1650 ++
 .../scripts/lib/jquery.ztree.excheck-3.5.js     |   624 +
 .../src/main/webapp/scripts/lib/tooltip.js      |   357 +
 .../webapp/scripts/multiselect/jquery-ui.js     | 14988 ++++++++++++++
 .../scripts/multiselect/jquery.multiselect.js   |   816 +
 .../main/webapp/scripts/multiselect/prettify.js |  1522 ++
 .../webapp/scripts/pulsescript/MemberDetails.js |  1045 +
 .../scripts/pulsescript/PulseCallbacks.js       |  1735 ++
 .../scripts/pulsescript/PulseFunctions.js       |   227 +
 .../webapp/scripts/pulsescript/clusterDetail.js |  2360 +++
 .../scripts/pulsescript/clusterRGraphMembers.js |  1515 ++
 .../main/webapp/scripts/pulsescript/common.js   |  1626 ++
 .../scripts/pulsescript/pages/DataBrowser.js    |   662 +
 .../pulsescript/pages/DataBrowserQuery.js       |   964 +
 .../pages/DataBrowserQueryHistory.js            |    95 +
 .../webapp/scripts/pulsescript/pages/Login.js   |   170 +
 .../webapp/scripts/pulsescript/pages/index.js   |    26 +
 .../scripts/pulsescript/queryStatistics.js      |   315 +
 .../webapp/scripts/pulsescript/regionView.js    |   757 +
 .../pulse/testbed/GemFireDistributedSystem.java |   323 +
 .../tools/pulse/testbed/GemfireTopology.java    |    24 +
 .../tools/pulse/testbed/PropFileHelper.java     |   115 +
 .../pulse/testbed/PropMockDataUpdater.java      |   515 +
 .../gemfire/tools/pulse/testbed/TestBed.java    |    84 +
 .../tools/pulse/testbed/driver/PulseUITest.java |   284 +
 .../pulse/testbed/driver/TomcatHelper.java      |    77 +
 .../tools/pulse/tests/AggregateStatement.java   |   217 +
 .../pulse/tests/AggregateStatementMBean.java    |   168 +
 .../pulse/tests/DataBrowserResultLoader.java    |    84 +
 .../pulse/tests/GemFireXDAggregateTable.java    |    46 +
 .../tests/GemFireXDAggregateTableMBean.java     |    28 +
 .../tools/pulse/tests/GemFireXDCluster.java     |    95 +
 .../pulse/tests/GemFireXDClusterMBean.java      |    32 +
 .../tools/pulse/tests/GemFireXDMember.java      |    80 +
 .../tools/pulse/tests/GemFireXDMemberMBean.java |    31 +
 .../gemfire/tools/pulse/tests/JMXBaseBean.java  |    67 +
 .../tools/pulse/tests/JMXProperties.java        |    47 +
 .../gemfire/tools/pulse/tests/Member.java       |   193 +
 .../gemfire/tools/pulse/tests/MemberMBean.java  |    86 +
 .../tools/pulse/tests/PulseAutomatedTest.java   |   785 +
 .../tools/pulse/tests/PulseBaseTest.java        |   686 +
 .../gemfire/tools/pulse/tests/PulseTest.java    |  1056 +
 .../tools/pulse/tests/PulseTestData.java        |   106 +
 .../tools/pulse/tests/PulseTestLocators.java    |   225 +
 .../gemfire/tools/pulse/tests/Region.java       |   192 +
 .../gemfire/tools/pulse/tests/RegionMBean.java  |    59 +
 .../tools/pulse/tests/RegionOnMember.java       |    96 +
 .../tools/pulse/tests/RegionOnMemberMBean.java  |    50 +
 .../gemfire/tools/pulse/tests/Server.java       |   253 +
 .../gemfire/tools/pulse/tests/ServerObject.java |   264 +
 .../tools/pulse/tests/ServerObjectMBean.java    |    79 +
 .../gemfire/tools/pulse/tests/TomcatHelper.java |    97 +
 .../pulse/tests/junit/BaseServiceTest.java      |   250 +
 .../junit/ClusterSelectedRegionServiceTest.java |   350 +
 ...ClusterSelectedRegionsMemberServiceTest.java |   362 +
 .../junit/MemberGatewayHubServiceTest.java      |   423 +
 .../src/test/resources/NoDataFound1.txt         |     1 +
 .../src/test/resources/NoDataFound2.txt         |    35 +
 .../src/test/resources/NoDataFound3.txt         |     6 +
 gemfire-pulse/src/test/resources/message.txt    |     1 +
 .../src/test/resources/test.properties          |   326 +
 gemfire-pulse/src/test/resources/test1.txt      |     5 +
 gemfire-pulse/src/test/resources/test2.txt      |     7 +
 gemfire-pulse/src/test/resources/test3.txt      |     5 +
 gemfire-pulse/src/test/resources/test4.txt      |     4 +
 gemfire-pulse/src/test/resources/test5.txt      |     7 +
 gemfire-pulse/src/test/resources/test6.txt      |    11 +
 gemfire-pulse/src/test/resources/test7.txt      |    13 +
 .../resources/testNullObjectsAtRootLevel1.txt   |    25 +
 .../resources/testNullObjectsAtRootLevel2.txt   |    30 +
 .../src/test/resources/testQueryResult.txt      |   198 +
 .../src/test/resources/testQueryResult1000.txt  |  1023 +
 .../testQueryResultArrayAndArrayList.txt        |     8 +
 .../test/resources/testQueryResultArrayList.txt |     6 +
 .../resources/testQueryResultArrayOfList.txt    |    15 +
 .../resources/testQueryResultClusterSmall.txt   |    23 +
 .../testQueryResultClusterWithStruct.txt        |    10 +
 .../test/resources/testQueryResultHashMap.txt   |     8 +
 .../resources/testQueryResultHashMapSmall.txt   |    12 +
 .../src/test/resources/testQueryResultSmall.txt |    12 +
 .../resources/testQueryResultWithStruct.txt     |  1744 ++
 .../testQueryResultWithStructSmall.txt          |    15 +
 gemfire-pulse/src/test/resources/test_pp.txt    |     7 +
 .../src/test/resources/testbed.properties       |   157 +
 gemfire-rebalancer/build.gradle                 |    33 +-
 .../gemfire/cache/util/AutoBalancer.java        |     4 +-
 .../util/AutoBalancerIntegrationJUnitTest.java  |    16 +
 gemfire-site/.gitignore                         |     1 +
 gemfire-site/build.gradle                       |    37 -
 gemfire-site/src/jbake.zip                      |   Bin 207030 -> 0 bytes
 gemfire-site/src/jbake/assets/favicon.ico       |   Bin 1150 -> 0 bytes
 .../src/jbake/assets/images/bg-billboard.png    |   Bin 25538 -> 0 bytes
 .../jbake/assets/images/bg-crystals-home.png    |   Bin 41684 -> 0 bytes
 .../assets/images/bg-crystals-secondary.png     |   Bin 26046 -> 0 bytes
 .../src/jbake/assets/images/egg-logo1.png       |   Bin 8626 -> 0 bytes
 .../jbake/assets/images/events/apachecon.png    |   Bin 4528 -> 0 bytes
 .../src/jbake/assets/images/events/oscon.png    |   Bin 26024 -> 0 bytes
 .../src/jbake/assets/images/geode-banner.png    |   Bin 7916 -> 0 bytes
 .../assets/images/logo-apache-geode-white.png   |   Bin 2336 -> 0 bytes
 .../jbake/assets/images/logo-apache-geode.png   |   Bin 3200 -> 0 bytes
 .../jbake/assets/images/logo-geode-white.png    |   Bin 1620 -> 0 bytes
 .../src/jbake/assets/images/logo-geode.png      |   Bin 3345 -> 0 bytes
 .../src/jbake/assets/javascripts/master.js      |   121 -
 .../src/jbake/assets/javascripts/scale.fix.js   |    20 -
 .../jbake/assets/stylesheets/pygment_trac.css   |    60 -
 .../src/jbake/assets/stylesheets/styles.css     |   319 -
 gemfire-site/src/jbake/content/404.md           |     9 -
 gemfire-site/src/jbake/content/README.md        |    36 -
 gemfire-site/src/jbake/content/about/index.md   |    31 -
 .../src/jbake/content/community/index.md        |    82 -
 .../src/jbake/content/contribute/index.md       |    47 -
 gemfire-site/src/jbake/content/docs/index.md    |    23 -
 .../src/jbake/content/download/index.md         |    13 -
 .../src/jbake/content/getting-started/index.md  |    88 -
 gemfire-site/src/jbake/content/index.md         |    76 -
 gemfire-site/src/jbake/jbake.properties         |     6 -
 gemfire-site/src/jbake/templates/page.groovy    |    80 -
 gemfire-site/website/.gitignore                 |     1 +
 gemfire-site/website/README.md                  |    54 +
 gemfire-site/website/Rules                      |    69 +
 gemfire-site/website/build.sh                   |    18 +
 .../website/content/bootstrap/bootstrap.min.css |     9 +
 .../website/content/community/index.html        |   291 +
 .../website/content/css/bootflat-extensions.css |   356 +
 .../website/content/css/bootflat-square.css     |    69 +
 gemfire-site/website/content/css/bootflat.css   |  1559 ++
 .../website/content/css/font-awesome.min.css    |   405 +
 gemfire-site/website/content/css/geode-site.css |  1617 ++
 gemfire-site/website/content/favicon.ico        |   Bin 0 -> 20805 bytes
 .../website/content/font/FontAwesome.otf        |   Bin 0 -> 61896 bytes
 .../content/font/fontawesome-webfont-eot.eot    |   Bin 0 -> 37405 bytes
 .../content/font/fontawesome-webfont-svg.svg    |   399 +
 .../content/font/fontawesome-webfont-ttf.ttf    |   Bin 0 -> 79076 bytes
 .../content/font/fontawesome-webfont-woff.woff  |   Bin 0 -> 43572 bytes
 .../website/content/img/apache_geode_logo.png   |   Bin 0 -> 23616 bytes
 .../content/img/apache_geode_logo_white.png     |   Bin 0 -> 22695 bytes
 .../img/apache_geode_logo_white_small.png       |   Bin 0 -> 52948 bytes
 .../website/content/img/check_flat/default.png  |   Bin 0 -> 25851 bytes
 gemfire-site/website/content/img/egg-logo.png   |   Bin 0 -> 9938 bytes
 gemfire-site/website/content/img/github.png     |   Bin 0 -> 8936 bytes
 gemfire-site/website/content/index.html         |   142 +
 .../website/content/js/bootstrap.min.js         |     8 +
 gemfire-site/website/content/js/head.js         |   708 +
 gemfire-site/website/content/js/html5shiv.js    |     8 +
 .../website/content/js/jquery-1.10.1.min.js     |     6 +
 .../website/content/js/jquery.icheck.js         |   397 +
 gemfire-site/website/content/js/respond.min.js  |     6 +
 .../website/content/js/usergrid-site.js         |    66 +
 .../website/content/releases/index.html         |   129 +
 gemfire-site/website/layouts/community.html     |     1 +
 gemfire-site/website/layouts/default.html       |    44 +
 gemfire-site/website/layouts/docs.html          |     1 +
 gemfire-site/website/layouts/footer.html        |    96 +
 gemfire-site/website/layouts/header.html        |   248 +
 gemfire-site/website/lib/default.rb             |    60 +
 gemfire-site/website/lib/helpers_.rb            |    16 +
 gemfire-site/website/lib/pandoc.template        |     4 +
 gemfire-site/website/nanoc.yaml                 |    94 +
 gemfire-site/website/run.sh                     |    18 +
 gemfire-site/website/utilities/map-markers.rb   |    75 +
 gemfire-site/website/utilities/markers.txt      |   440 +
 .../website/utilities/snapshot-apigee.rb        |    88 +
 gemfire-spark-connector/doc/5_rdd_join.md       |     2 +-
 .../src/it/resources/test-regions.xml           |    17 +
 .../src/it/resources/test-retrieve-regions.xml  |    17 +
 gemfire-wan/build.gradle                        |    23 +
 .../client/internal/GatewaySenderBatchOp.java   |   313 +
 .../cache/client/internal/SenderProxy.java      |    43 +
 .../internal/locator/wan/LocatorDiscovery.java  |   227 +
 .../internal/locator/wan/LocatorHelper.java     |   143 +
 .../locator/wan/LocatorJoinMessage.java         |   105 +
 .../wan/LocatorMembershipListenerImpl.java      |   230 +
 .../locator/wan/RemoteLocatorJoinRequest.java   |    87 +
 .../locator/wan/RemoteLocatorJoinResponse.java  |    89 +
 .../locator/wan/RemoteLocatorPingRequest.java   |    56 +
 .../locator/wan/RemoteLocatorPingResponse.java  |    55 +
 .../locator/wan/RemoteLocatorRequest.java       |    66 +
 .../locator/wan/RemoteLocatorResponse.java      |    74 +
 .../internal/locator/wan/WANFactoryImpl.java    |    74 +
 .../locator/wan/WanLocatorDiscovererImpl.java   |   138 +
 .../cache/wan/AbstractRemoteGatewaySender.java  |   169 +
 .../cache/wan/GatewayReceiverFactoryImpl.java   |   147 +
 .../internal/cache/wan/GatewayReceiverImpl.java |   253 +
 .../wan/GatewaySenderEventRemoteDispatcher.java |   766 +
 .../cache/wan/GatewaySenderFactoryImpl.java     |   389 +
 .../wan/parallel/ParallelGatewaySenderImpl.java |   267 +
 ...rentParallelGatewaySenderEventProcessor.java |    67 +
 ...moteParallelGatewaySenderEventProcessor.java |   122 +
 ...urrentSerialGatewaySenderEventProcessor.java |    45 +
 ...RemoteSerialGatewaySenderEventProcessor.java |    50 +
 .../wan/serial/SerialGatewaySenderImpl.java     |   260 +
 ...ternal.locator.wan.LocatorMembershipListener |    15 +
 ...ne.gemfire.internal.cache.wan.spi.WANFactory |    15 +
 .../cache/CacheXml70GatewayDUnitTest.java       |   243 +
 .../cache/CacheXml80GatewayDUnitTest.java       |    77 +
 .../AnalyzeWANSerializablesJUnitTest.java       |    91 +
 .../internal/cache/UpdateVersionDUnitTest.java  |   960 +
 .../gemfire/internal/cache/wan/WANTestBase.java |  5164 +++++
 ...oncurrentParallelGatewaySenderDUnitTest.java |   860 +
 ...ntParallelGatewaySenderOffHeapDUnitTest.java |    32 +
 ...allelGatewaySenderOperation_1_DUnitTest.java |   848 +
 ...allelGatewaySenderOperation_2_DUnitTest.java |   537 +
 ...tSerialGatewaySenderOperationsDUnitTest.java |   111 +
 ...GatewaySenderOperationsOffHeapDUnitTest.java |    32 +
 .../ConcurrentWANPropogation_1_DUnitTest.java   |   608 +
 .../ConcurrentWANPropogation_2_DUnitTest.java   |   485 +
 .../cache/wan/disttx/DistTXWANDUnitTest.java    |   209 +
 .../CommonParallelGatewaySenderDUnitTest.java   |   481 +
 ...onParallelGatewaySenderOffHeapDUnitTest.java |    32 +
 ...wWANConcurrencyCheckForDestroyDUnitTest.java |   526 +
 .../cache/wan/misc/PDXNewWanDUnitTest.java      |   787 +
 ...dRegion_ParallelWANPersistenceDUnitTest.java |   752 +
 ...dRegion_ParallelWANPropogationDUnitTest.java |  1132 ++
 .../SenderWithTransportFilterDUnitTest.java     |   241 +
 ...downAllPersistentGatewaySenderDUnitTest.java |   205 +
 .../wan/misc/WANConfigurationJUnitTest.java     |   609 +
 .../wan/misc/WANLocatorServerDUnitTest.java     |   193 +
 .../cache/wan/misc/WANSSLDUnitTest.java         |   151 +
 .../wan/misc/WanAutoDiscoveryDUnitTest.java     |   557 +
 .../cache/wan/misc/WanValidationsDUnitTest.java |  1678 ++
 ...tewaySenderOperation_2_OffHeapDUnitTest.java |    32 +
 ...tewaySenderOperation_2_OffHeapDUnitTest.java |    32 +
 ...GatewaySenderOperationsOffHeapDUnitTest.java |    34 +
 ...ewaySenderQueueOverflowOffHeapDUnitTest.java |    34 +
 .../ParallelWANConflationOffHeapDUnitTest.java  |    34 +
 ...nceEnabledGatewaySenderOffHeapDUnitTest.java |    34 +
 ...ropogationConcurrentOpsOffHeapDUnitTest.java |    34 +
 .../ParallelWANPropogationOffHeapDUnitTest.java |    34 +
 ...erialGatewaySenderQueueOffHeapDUnitTest.java |    34 +
 ...nceEnabledGatewaySenderOffHeapDUnitTest.java |    34 +
 .../SerialWANPropogationOffHeapDUnitTest.java   |    34 +
 ...ation_PartitionedRegionOffHeapDUnitTest.java |    34 +
 ...allelGatewaySenderOperation_2_DUnitTest.java |    38 +
 ...arallelGatewaySenderOperationsDUnitTest.java |   636 +
 ...llelGatewaySenderQueueOverflowDUnitTest.java |   531 +
 .../ParallelWANConflationDUnitTest.java         |   496 +
 ...ersistenceEnabledGatewaySenderDUnitTest.java |  1823 ++
 ...llelWANPropagationClientServerDUnitTest.java |   114 +
 ...lelWANPropagationConcurrentOpsDUnitTest.java |   290 +
 .../ParallelWANPropagationDUnitTest.java        |  1448 ++
 ...ParallelWANPropagationLoopBackDUnitTest.java |   425 +
 .../wan/parallel/ParallelWANStatsDUnitTest.java |   526 +
 ...tewaySenderDistributedDeadlockDUnitTest.java |   407 +
 ...rialGatewaySenderEventListenerDUnitTest.java |   390 +
 .../SerialGatewaySenderOperationsDUnitTest.java |   654 +
 .../SerialGatewaySenderQueueDUnitTest.java      |   337 +
 ...ersistenceEnabledGatewaySenderDUnitTest.java |   602 +
 .../SerialWANPropagationLoopBackDUnitTest.java  |   538 +
 .../serial/SerialWANPropogationDUnitTest.java   |  1602 ++
 ...NPropogation_PartitionedRegionDUnitTest.java |   439 +
 .../SerialWANPropogationsFeatureDUnitTest.java  |   373 +
 .../wan/serial/SerialWANStatsDUnitTest.java     |   591 +
 .../wan/wancommand/WANCommandTestBase.java      |   511 +
 ...anCommandCreateGatewayReceiverDUnitTest.java |   699 +
 .../WanCommandCreateGatewaySenderDUnitTest.java |   763 +
 ...WanCommandGatewayReceiverStartDUnitTest.java |   327 +
 .../WanCommandGatewayReceiverStopDUnitTest.java |   332 +
 .../WanCommandGatewaySenderStartDUnitTest.java  |   416 +
 .../WanCommandGatewaySenderStopDUnitTest.java   |   367 +
 .../wan/wancommand/WanCommandListDUnitTest.java |   403 +
 .../WanCommandPauseResumeDUnitTest.java         |   716 +
 .../wancommand/WanCommandStatusDUnitTest.java   |   582 +
 .../management/WANManagementDUnitTest.java      |   525 +
 .../ClusterConfigurationDUnitTest.java          |  1055 +
 .../pulse/TestRemoteClusterDUnitTest.java       |   274 +
 .../gemfire/codeAnalysis/excludedClasses.txt    |     2 +
 .../gemstone/gemfire/codeAnalysis/openBugs.txt  |    21 +
 .../sanctionedDataSerializables.txt             |    28 +
 .../codeAnalysis/sanctionedSerializables.txt    |     0
 gemfire-web-api/build.gradle                    |    21 +-
 .../web/swagger/config/RestApiPathProvider.java |    13 +-
 .../main/webapp/WEB-INF/gemfire-api-servlet.xml |    16 +
 gemfire-web-api/src/main/webapp/WEB-INF/web.xml |    16 +
 gemfire-web/build.gradle                        |    24 +-
 .../src/main/webapp/WEB-INF/gemfire-servlet.xml |    16 +
 gemfire-web/src/main/webapp/WEB-INF/web.xml     |    16 +
 .../web/util/ConvertUtilsJUnitTest.java         |     2 +-
 gradle.properties                               |    19 +
 gradle/code-analysis.gradle                     |   113 +
 gradle/dependency-versions.properties           |    52 +-
 gradle/ide.gradle                               |    53 +
 gradle/java.gradle                              |   134 +
 gradle/publish.gradle                           |    83 +
 gradle/rat.gradle                               |   217 +
 gradle/test.gradle                              |   241 +
 settings.gradle                                 |    24 +
 2239 files changed, 319841 insertions(+), 35811 deletions(-)
----------------------------------------------------------------------



[35/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt
deleted file mode 100755
index 9e1ddef..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Module_7.0.txt
+++ /dev/null
@@ -1,471 +0,0 @@
-open_source_license.txt
-
-VMware vFabric GemFire HTTP Session Management Module 7.0 GA
-	
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software components (or portions thereof) that are distributed with
-this VMware software products.
-
-The VMware Product may also include other VMware components, which may contain additional open 
-source software packages. One or more such open_source_licenses.txt files may therefore 
-accompany this VMware Product. 
-
-The VMware product that includes this file does not necessarily use all the
-open source software components referred to below and may also only use
-portions of a given component.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in this
-document.  This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------- SECTION 1: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America. All such
-requests should clearly specify: OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium. This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively,
-the Source Files may accompany the VMware product.
-
-
-[GFEHTTPMODULE70GAKR100512]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt
deleted file mode 100755
index c510712..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-VMware_vFabric_GemFire_Modules_7.0.1.txt
+++ /dev/null
@@ -1,474 +0,0 @@
-open_source_license.txt
-
-VMware vFabric GemFire HTTP Session Management Module 7.0.1 GA
-
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software components (or portions thereof) that are distributed with
-this VMware software products.
-
-The VMware Product may also include other VMware components, which may contain additional open 
-source software packages. One or more such open_source_licenses.txt files may therefore 
-accompany this VMware Product. 
-
-The VMware product that includes this file does not necessarily use all the
-open source software components referred to below and may also only use
-portions of a given component.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in this
-document.  This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America. All such
-requests should clearly specify: OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium. This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively,
-the Source Files may accompany the VMware product.
-
-
-[GFEHTTPMODULE701GAKD021813]



[44/50] [abbrv] incubator-geode git commit: GEODE-14: Include modules as part of installDist task

Posted by kl...@apache.org.
GEODE-14: Include modules as part of installDist task


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f890a14d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f890a14d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f890a14d

Branch: refs/heads/feature/GEODE-268
Commit: f890a14d80393fff1532827eb313656a019e1221
Parents: 89b0ab2
Author: Jens Deppe <jd...@pivotal.io>
Authored: Thu Feb 4 18:44:05 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:28 2016 -0800

----------------------------------------------------------------------
 extensions/gemfire-modules-assembly/build.gradle | 16 +++++++++++-----
 gemfire-assembly/build.gradle                    |  6 ++++++
 2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f890a14d/extensions/gemfire-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/build.gradle b/extensions/gemfire-modules-assembly/build.gradle
index 8bfdde9..270e167 100644
--- a/extensions/gemfire-modules-assembly/build.gradle
+++ b/extensions/gemfire-modules-assembly/build.gradle
@@ -19,18 +19,14 @@ import org.apache.tools.ant.filters.ReplaceTokens
 
 configurations {
   slf4jDeps
-}
-
-configurations {
   servletApiDeps
+  moduleDistOutputs
 }
 
 dependencies {
   slf4jDeps 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
   slf4jDeps 'org.slf4j:slf4j-jdk14:' + project.'slf4j-api.version'
-}
 
-dependencies {
   servletApiDeps 'javax.servlet:servlet-api:2.5'
 }
 
@@ -231,4 +227,14 @@ task distTcServer30(type: Zip, dependsOn: [':extensions/gemfire-modules:build',
   configure(configureTcServer30Assembly)
 }
 
+dependencies {
+  moduleDistOutputs distTcServer.outputs.files
+  moduleDistOutputs distTcServer30.outputs.files
+  moduleDistOutputs distHibernate.outputs.files
+  moduleDistOutputs distAppServer.outputs.files
+  moduleDistOutputs distTomcat.outputs.files
+}
+
 task dist(type: Task, dependsOn: ['distTcServer', 'distTcServer30', 'distTomcat', 'distHibernate', 'distAppServer'])
+
+build.dependsOn dist

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f890a14d/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index 2d6cac9..c77d909 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -323,6 +323,10 @@ distributions {
           exclude '*.jar'
         }
       }
+
+      into ('tools/Modules') {
+        from (project(':extensions/gemfire-modules-assembly').configurations.moduleDistOutputs.files)
+      }
     }
   }
 }
@@ -341,3 +345,5 @@ integrationTest dependOnInstalledProduct
 
 // Make build final task to generate all test and product resources
 build.dependsOn installDist
+
+installDist.dependsOn ':extensions/gemfire-modules-assembly:dist'


[05/50] [abbrv] incubator-geode git commit: GEODE-915: add FORCE_INVALIDATE_EVENT

Posted by kl...@apache.org.
GEODE-915: add FORCE_INVALIDATE_EVENT

If the system property gemfire.FORCE_INVALIDATE_EVENT
is set to true then afterInvalidate on CacheListeners will be called even
if the entry does not exist or if the entry is already invalid.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f3dd3353
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f3dd3353
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f3dd3353

Branch: refs/heads/feature/GEODE-268
Commit: f3dd3353deb154ade18136781cc18308d3f615dd
Parents: e97d746
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Thu Feb 4 16:30:54 2016 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri Feb 5 08:59:14 2016 -0800

----------------------------------------------------------------------
 .../internal/cache/AbstractRegionMap.java       |  22 ++-
 .../gemfire/internal/cache/LocalRegion.java     |   4 +-
 .../gemfire/cache30/CacheListenerTestCase.java  |  69 +++++++
 .../internal/cache/AbstractRegionMapTest.java   | 186 +++++++++++++++++++
 4 files changed, 278 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f3dd3353/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 3679519..6fe60ce 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -105,7 +105,7 @@ import com.gemstone.gemfire.pdx.internal.ConvertableToBytes;
 // which checks for RegionEntry classes of GFE and validates the same with its 
 // own classes.
 
-abstract class AbstractRegionMap implements RegionMap {
+public abstract class AbstractRegionMap implements RegionMap {
 
   private static final Logger logger = LogService.getLogger();
   
@@ -1953,6 +1953,23 @@ abstract class AbstractRegionMap implements RegionMap {
     }
   }
 
+  /**
+   * If true then invalidates that throw EntryNotFoundException
+   * or that are already invalid will first call afterInvalidate on CacheListeners. 
+   * The old value on the event passed to afterInvalidate will be null.
+   */
+  public static boolean FORCE_INVALIDATE_EVENT = Boolean.getBoolean("gemfire.FORCE_INVALIDATE_EVENT");
+
+  /**
+   * If the FORCE_INVALIDATE_EVENT flag is true
+   * then invoke callbacks on the given event.
+   */
+  void forceInvalidateEvent(EntryEventImpl event) {
+    if (FORCE_INVALIDATE_EVENT) {
+      event.invokeCallbacks(_getOwner(), false, false);
+    }
+  }
+  
   public final boolean invalidate(EntryEventImpl event,
       boolean invokeCallbacks, boolean forceNewEntry, boolean forceCallbacks)
       throws EntryNotFoundException
@@ -2019,6 +2036,7 @@ abstract class AbstractRegionMap implements RegionMap {
                         // that's okay - when writing an invalid into a disk, the
                         // region has been cleared (including this token)
                       }
+                      forceInvalidateEvent(event);
                     } else {
                       owner.cacheWriteBeforeInvalidate(event, invokeCallbacks, forceNewEntry);
                       if (owner.concurrencyChecksEnabled && event.noVersionReceivedFromServer()) {
@@ -2247,6 +2265,7 @@ abstract class AbstractRegionMap implements RegionMap {
                   if (event.getVersionTag() != null && owner.getVersionVector() != null) {
                     owner.getVersionVector().recordVersion((InternalDistributedMember) event.getDistributedMember(), event.getVersionTag());
                   }
+                  forceInvalidateEvent(event);
                 }
                 else { // previous value not invalid
                   event.setRegionEntry(re);
@@ -2313,6 +2332,7 @@ abstract class AbstractRegionMap implements RegionMap {
             // is in region, do nothing
           }
           if (!entryExisted) {
+            forceInvalidateEvent(event);
             owner.checkEntryNotFound(event.getKey());
           }
         } // while(retry)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f3dd3353/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 1c5f321..2092508 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -804,11 +804,11 @@ public class LocalRegion extends AbstractRegion
     }
   }
 
-  public final IndexUpdater getIndexUpdater() {
+  public IndexUpdater getIndexUpdater() {
     return this.entries.getIndexUpdater();
   }
 
-  final boolean isCacheClosing()
+  boolean isCacheClosing()
   {
     return this.cache.isClosed();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f3dd3353/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
index 9a725e7..4e4147f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
@@ -19,6 +19,7 @@ package com.gemstone.gemfire.cache30;
 import com.gemstone.gemfire.cache.*;
 //import com.gemstone.gemfire.cache.util.*;
 //import java.util.*;
+import com.gemstone.gemfire.internal.cache.AbstractRegionMap;
 
 /**
  * An abstract class whose test methods test the functionality of
@@ -234,11 +235,79 @@ public abstract class CacheListenerTestCase
     Region region =
       createRegion(name, factory.create());
 
+    // Does not exist so should not invoke listener
+    try {
+      region.invalidate(key);
+      fail("expected EntryNotFoundException");
+    } catch (EntryNotFoundException expected) {
+    }
+    assertFalse(listener.wasInvoked());
+
     region.create(key, value);
     assertTrue(listener.wasInvoked());
     region.invalidate(key);
     assertTrue(listener.wasInvoked());
+
+    // already invalid so should not invoke listener
+    region.invalidate(key);
+    assertFalse(listener.wasInvoked());
   }
+  
+  public void testCacheListenerAfterInvalidateWithForce() throws CacheException {
+    AbstractRegionMap.FORCE_INVALIDATE_EVENT = true;
+    try {
+      String name = this.getUniqueName();
+      final Object key = this.getUniqueName();
+      final Object value = new Integer(42);
+
+      TestCacheListener listener = new TestCacheListener() {
+          int invalidateCount = 0;
+          public void afterCreate2(EntryEvent event) {
+            // This method will get invoked when the region is populated
+          }
+
+          public void afterInvalidate2(EntryEvent event) {
+            invalidateCount++;
+            assertEquals(key, event.getKey());
+            if (invalidateCount == 2) {
+              assertEquals(value, event.getOldValue());
+            } else {
+              assertNull(event.getOldValue());
+            }
+            assertNull(event.getNewValue());
+            assertFalse(event.isLoad());
+            assertFalse(event.isLocalLoad());
+            assertFalse(event.isNetLoad());
+            assertFalse(event.isNetSearch());
+          }
+        };
+
+      AttributesFactory factory =
+        new AttributesFactory(getRegionAttributes());
+      factory.setCacheListener(listener);
+      Region region =
+        createRegion(name, factory.create());
+
+      // Does not exist but should still invoke listener
+      try {
+        region.invalidate(key);
+        fail("expected EntryNotFoundException");
+      } catch (EntryNotFoundException expected) {
+      }
+      assertTrue(listener.wasInvoked());
+
+      region.create(key, value);
+      assertTrue(listener.wasInvoked());
+      region.invalidate(key);
+      assertTrue(listener.wasInvoked());
+      // already invalid but should still invoke listener
+      region.invalidate(key);
+      assertTrue(listener.wasInvoked());
+    } finally {
+      AbstractRegionMap.FORCE_INVALIDATE_EVENT = false;
+    }
+  }
+
 
   /**
    * Tests that the <code>CacheListener</code> is called after a region

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f3dd3353/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
new file mode 100644
index 0000000..b54bbe2
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.cache;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Operation;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class AbstractRegionMapTest {
+
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception {
+  }
+
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+  }
+
+  @Before
+  public void setUp() throws Exception {
+  }
+
+  @After
+  public void tearDown() throws Exception {
+  }
+
+  @Test
+  public void invalidateOfNonExistentRegionThrowsEntryNotFound() {
+    TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
+    EntryEventImpl event = createEventForInvalidate(arm.owner);
+    when(arm.owner.isInitialized()).thenReturn(true);
+
+    try {
+      arm.invalidate(event, true, false, false);
+      fail("expected EntryNotFoundException");
+    } catch (EntryNotFoundException expected) {
+    }
+    verify(arm.owner, never()).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+    verify(arm.owner, never()).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+  }
+  
+  @Test
+  public void invalidateOfNonExistentRegionThrowsEntryNotFoundWithForce() {
+    AbstractRegionMap.FORCE_INVALIDATE_EVENT = true;
+    try {
+      TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
+      EntryEventImpl event = createEventForInvalidate(arm.owner);
+      when(arm.owner.isInitialized()).thenReturn(true);
+
+      try {
+        arm.invalidate(event, true, false, false);
+        fail("expected EntryNotFoundException");
+      } catch (EntryNotFoundException expected) {
+      }
+      verify(arm.owner, never()).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+      verify(arm.owner, times(1)).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+    } finally {
+      AbstractRegionMap.FORCE_INVALIDATE_EVENT = false;
+    }
+  }
+  
+  @Test
+  public void invalidateOfAlreadyInvalidEntryReturnsFalse() {
+    TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
+    EntryEventImpl event = createEventForInvalidate(arm.owner);
+    
+    // invalidate on region that is not initialized should create
+    // entry in map as invalid.
+    try {
+      arm.invalidate(event, true, false, false);
+      fail("expected EntryNotFoundException");
+    } catch (EntryNotFoundException expected) {
+    }
+    
+    when(arm.owner.isInitialized()).thenReturn(true);
+    assertFalse(arm.invalidate(event, true, false, false));
+    verify(arm.owner, never()).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+    verify(arm.owner, never()).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+  }
+
+  @Test
+  public void invalidateOfAlreadyInvalidEntryReturnsFalseWithForce() {
+    AbstractRegionMap.FORCE_INVALIDATE_EVENT = true;
+    try {
+      TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
+      EntryEventImpl event = createEventForInvalidate(arm.owner);
+
+      // invalidate on region that is not initialized should create
+      // entry in map as invalid.
+      try {
+        arm.invalidate(event, true, false, false);
+        fail("expected EntryNotFoundException");
+      } catch (EntryNotFoundException expected) {
+      }
+
+      when(arm.owner.isInitialized()).thenReturn(true);
+      assertFalse(arm.invalidate(event, true, false, false));
+      verify(arm.owner, never()).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+      verify(arm.owner, times(1)).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+    } finally {
+      AbstractRegionMap.FORCE_INVALIDATE_EVENT = false;
+    }
+  }
+
+  private EntryEventImpl createEventForInvalidate(LocalRegion lr) {
+    Object key = "key";
+    when(lr.getKeyInfo(key)).thenReturn(new KeyInfo(key, null, null));
+    return EntryEventImpl.create(lr, Operation.INVALIDATE, key, false, null, true, false);
+  }
+  
+  @Test
+  public void invalidateForceNewEntryOfAlreadyInvalidEntryReturnsFalse() {
+    TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
+    EntryEventImpl event = createEventForInvalidate(arm.owner);
+
+    // invalidate on region that is not initialized should create
+    // entry in map as invalid.
+    assertTrue(arm.invalidate(event, true, true, false));
+    verify(arm.owner, times(1)).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+    
+    when(arm.owner.isInitialized()).thenReturn(true);
+    assertFalse(arm.invalidate(event, true, true, false));
+    verify(arm.owner, times(1)).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+    verify(arm.owner, never()).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+  }
+
+  @Test
+  public void invalidateForceNewEntryOfAlreadyInvalidEntryReturnsFalseWithForce() {
+    AbstractRegionMap.FORCE_INVALIDATE_EVENT = true;
+    try {
+      TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
+      EntryEventImpl event = createEventForInvalidate(arm.owner);
+
+      // invalidate on region that is not initialized should create
+      // entry in map as invalid.
+      assertTrue(arm.invalidate(event, true, true, false));
+      verify(arm.owner, times(1)).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+      verify(arm.owner, never()).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+
+      when(arm.owner.isInitialized()).thenReturn(true);
+      assertFalse(arm.invalidate(event, true, true, false));
+      verify(arm.owner, times(1)).basicInvalidatePart2(any(), any(), anyBoolean(), anyBoolean());
+      verify(arm.owner, times(1)).invokeInvalidateCallbacks(any(), any(), anyBoolean());
+    } finally {
+      AbstractRegionMap.FORCE_INVALIDATE_EVENT = false;
+    }
+  }
+
+  public static class TestableAbstractRegionMap extends AbstractRegionMap {
+    public LocalRegion owner;
+
+    protected TestableAbstractRegionMap() {
+      super(null);
+      this.owner = mock(LocalRegion.class);
+      when(this.owner.getDataPolicy()).thenReturn(DataPolicy.REPLICATE);
+      doThrow(EntryNotFoundException.class).when(this.owner).checkEntryNotFound(any());
+      initialize(owner, new Attributes(), null, false);
+    }
+  }
+}


[37/50] [abbrv] incubator-geode git commit: GEODE-14: Fix dependencies for assembly

Posted by kl...@apache.org.
GEODE-14: Fix dependencies for assembly


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ec3533d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ec3533d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ec3533d7

Branch: refs/heads/feature/GEODE-268
Commit: ec3533d79b5a163cb245773ab196e0907f5d1830
Parents: 6400970
Author: Jens Deppe <jd...@pivotal.io>
Authored: Tue Jan 5 09:49:17 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:25 2016 -0800

----------------------------------------------------------------------
 extensions/gemfire-modules-assembly/build.gradle | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ec3533d7/extensions/gemfire-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/build.gradle b/extensions/gemfire-modules-assembly/build.gradle
index ba6e489..2381be9 100644
--- a/extensions/gemfire-modules-assembly/build.gradle
+++ b/extensions/gemfire-modules-assembly/build.gradle
@@ -157,7 +157,7 @@ def configureTcServer30Assembly = {
   }
 }
 
-task distTomcat(type: Zip) {
+task distTomcat(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
   archiveName = "Apache_Geode_Modules-${version}-Tomcat.zip"
 
   // All client-server files
@@ -187,7 +187,7 @@ task distTomcat(type: Zip) {
   }
 }
 
-task distHibernate(type: Zip) {
+task distHibernate(type: Zip, dependsOn: ':extensions/gemfire-modules-hibernate:build') {
   archiveName = "Apache_Geode_Modules-${version}-Hibernate.zip"
 
   into('lib') {
@@ -199,7 +199,7 @@ task distHibernate(type: Zip) {
   }
 }
 
-task distAppServer(type: Zip) {
+task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:build') {
   archiveName = "Apache_Geode_Modules-${version}-AppServer.zip"
 
   into('lib') {
@@ -239,11 +239,11 @@ task distAppServer(type: Zip) {
   }
 }
 
-task distTcServer(type: Zip, dependsOn: 'build') {
+task distTcServer(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
   configure(configureTcServerAssembly)
 }
 
-task distTcServer30(type: Zip, dependsOn: 'build') {
+task distTcServer30(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
   configure(configureTcServerAssembly)
   configure(configureTcServer30Assembly)
 }


[41/50] [abbrv] incubator-geode git commit: GEODE-14: Don't include source and javadoc jars

Posted by kl...@apache.org.
GEODE-14: Don't include source and javadoc jars


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cea74ab1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cea74ab1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cea74ab1

Branch: refs/heads/feature/GEODE-268
Commit: cea74ab19588bc1fdb385dc62d98e15a72bed7f2
Parents: c3b91bc
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Feb 3 10:37:01 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:27 2016 -0800

----------------------------------------------------------------------
 .../gemfire-modules-assembly/build.gradle       | 45 ++++++++++++--------
 .../gemfire-modules-hibernate/build.gradle      |  4 --
 extensions/gemfire-modules-session/build.gradle |  2 -
 extensions/gemfire-modules-tomcat7/build.gradle |  6 +--
 extensions/gemfire-modules/build.gradle         |  4 --
 gradle/java.gradle                              |  6 +++
 6 files changed, 34 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cea74ab1/extensions/gemfire-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/build.gradle b/extensions/gemfire-modules-assembly/build.gradle
index 3936850..8bfdde9 100644
--- a/extensions/gemfire-modules-assembly/build.gradle
+++ b/extensions/gemfire-modules-assembly/build.gradle
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import org.apache.tools.ant.filters.ReplaceTokens
+
 configurations {
   slf4jDeps
 }
@@ -34,13 +36,19 @@ dependencies {
 
 jar.enabled = false
 
+def getJarArtifact(module) {
+  project(module).configurations.archives.artifacts.findAll {
+    it instanceof PublishArtifact && it.classifier == '' && it.type == 'jar'
+  }.collect { it.file }
+}
+
 def configureTcServerAssembly = {
   archiveName = "Apache_Geode_Modules-${version}-tcServer.zip"
 
   // All client-server files
   into('gemfire-cs/lib') {
-    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
-    from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
+    from getJarArtifact(':extensions/gemfire-modules')
+    from getJarArtifact(':extensions/gemfire-modules-tomcat7')
     from configurations.slf4jDeps
   }
   into('gemfire-cs/bin') {
@@ -50,7 +58,7 @@ def configureTcServerAssembly = {
     from('release/tcserver/gemfire-cs') {
       include 'modules.env'
     }
-    filter { it.replaceAll('@GEMFIRE_MODULES_VERSION@', version) }
+    filter(ReplaceTokens, tokens:['GEMFIRE_MODULES_VERSION': version])
   }
   into('gemfire-cs/conf') {
     from('release/conf') {
@@ -65,7 +73,7 @@ def configureTcServerAssembly = {
     from('release/tcserver/gemfire-cs') {
       include 'configuration-prompts.properties'
       include 'README.txt'
-      filter { it.replaceAll('@VERSION@', version) }
+      filter(ReplaceTokens, tokens:['VERSION': version])
     }
   }
 
@@ -82,8 +90,8 @@ def configureTcServerAssembly = {
   }
   // All peer-to-peer files
   into('gemfire-p2p/lib') {
-    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
-    from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
+    from getJarArtifact(':extensions/gemfire-modules')
+    from getJarArtifact(':extensions/gemfire-modules-tomcat7')
     from configurations.slf4jDeps
     from('release/3rdparty_license') {
       include "open_source_licenses*${version}.txt"
@@ -111,7 +119,7 @@ def configureTcServerAssembly = {
     from('release/tcserver/gemfire-p2p') {
       include 'configuration-prompts.properties'
       include 'README.txt'
-      filter { it.replaceAll('@VERSION@', version) }
+      filter(ReplaceTokens, tokens:['VERSION': version])
     }
   }
 
@@ -159,8 +167,8 @@ task distTomcat(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
 
   // All client-server files
   into('lib') {
-    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
-    from project(':extensions/gemfire-modules-tomcat7').configurations.archives.allArtifacts.files
+    from getJarArtifact(':extensions/gemfire-modules')
+    from getJarArtifact(':extensions/gemfire-modules-tomcat7')
     from configurations.slf4jDeps
   }
   into('bin') {
@@ -180,7 +188,8 @@ task distHibernate(type: Zip, dependsOn: ':extensions/gemfire-modules-hibernate:
   archiveName = "Apache_Geode_Modules-${version}-Hibernate.zip"
 
   into('lib') {
-    from project(':extensions/gemfire-modules-hibernate').configurations.archives.allArtifacts.files
+    from getJarArtifact(':extensions/gemfire-modules')
+    from getJarArtifact(':extensions/gemfire-modules-hibernate')
   }
 }
 
@@ -188,8 +197,8 @@ task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:bu
   archiveName = "Apache_Geode_Modules-${version}-AppServer.zip"
 
   into('lib') {
-    from project(':extensions/gemfire-modules').configurations.archives.allArtifacts.files
-    from project(':extensions/gemfire-modules-session').configurations.archives.allArtifacts.files
+    from getJarArtifact(':extensions/gemfire-modules')
+    from getJarArtifact(':extensions/gemfire-modules-session')
     from configurations.slf4jDeps
     from configurations.servletApiDeps
   }
@@ -201,10 +210,10 @@ task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:bu
       include 'cacheserver.*'
       include 'gemfire.*'
 
-      filter { it.replaceAll('@GEMFIRE_MODULES_VERSION@', version) }
-      filter { it.replaceAll('@SLF4J_VERSION@', project.'slf4j-api.version') }
-      filter { it.replaceAll('@SERVLET_API_VERSION@', project.'javax.servlet-api_version') }
-      filter { it.replaceAll('@GEMFIRE_VERSION@', version) }
+      filter(ReplaceTokens, tokens:['GEMFIRE_MODULES_VERSION': version])
+      filter(ReplaceTokens, tokens:['SLF4J_VERSION': project.'slf4j-api.version'])
+      filter(ReplaceTokens, tokens:['SERVLET_API_VERSION': project.'javax.servlet-api.version'])
+      filter(ReplaceTokens, tokens:['GEMFIRE_VERSION': version])
     }
   }
 
@@ -213,11 +222,11 @@ task distAppServer(type: Zip, dependsOn: ':extensions/gemfire-modules-session:bu
   }
 }
 
-task distTcServer(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
+task distTcServer(type: Zip, dependsOn: [':extensions/gemfire-modules:build', ':extensions/gemfire-modules-tomcat7:build']) {
   configure(configureTcServerAssembly)
 }
 
-task distTcServer30(type: Zip, dependsOn: ':extensions/gemfire-modules:build') {
+task distTcServer30(type: Zip, dependsOn: [':extensions/gemfire-modules:build', ':extensions/gemfire-modules-tomcat7:build']) {
   configure(configureTcServerAssembly)
   configure(configureTcServer30Assembly)
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cea74ab1/extensions/gemfire-modules-hibernate/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/build.gradle b/extensions/gemfire-modules-hibernate/build.gradle
index 7681301..56e9956 100644
--- a/extensions/gemfire-modules-hibernate/build.gradle
+++ b/extensions/gemfire-modules-hibernate/build.gradle
@@ -15,10 +15,6 @@
  * limitations under the License.
  */
 
-jar {
-  baseName = 'gemfire-modules-hibernate'
-}
-
 dependencies {
   compile project(':extensions/gemfire-modules')
   compile 'org.hibernate:hibernate-core:' + project.'hibernate.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cea74ab1/extensions/gemfire-modules-session/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/build.gradle b/extensions/gemfire-modules-session/build.gradle
index 7435d37..9562e0f 100644
--- a/extensions/gemfire-modules-session/build.gradle
+++ b/extensions/gemfire-modules-session/build.gradle
@@ -26,7 +26,6 @@ dependencies {
   }
   testCompile(group: 'org.eclipse.jetty', name: 'jetty-http', version: project.'jetty.version', classifier: 'tests')
   testCompile(group: 'org.eclipse.jetty', name: 'jetty-servlet', version: project.'jetty.version', classifier: 'tests')
-//  testCompile 'org.apache.tomcat:jasper:6.0.29'
 
   provided project(path: ':gemfire-junit')
 }
@@ -35,7 +34,6 @@ jar {
   include '**/session/filter/**/*'
   include '**/session/installer/**/*'
   includeEmptyDirs = false
-  baseName = 'gemfire-modules-session-external'
 
   manifest {
     attributes 'Main-Class': 'com.gemstone.gemfire.modules.session.installer.Installer'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cea74ab1/extensions/gemfire-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/build.gradle b/extensions/gemfire-modules-tomcat7/build.gradle
index fc08fc0..5a4c28e 100644
--- a/extensions/gemfire-modules-tomcat7/build.gradle
+++ b/extensions/gemfire-modules-tomcat7/build.gradle
@@ -24,10 +24,6 @@ test  {
   }
 }
 
-jar {
-  baseName = 'gemfire-modules-tomcat7'
-}
-
 dependencies {
   compile(project(':extensions/gemfire-modules')) {
     // Remove everything related to Tomcat 6.x
@@ -53,5 +49,5 @@ dependencies {
     exclude group: 'org.apache.tomcat', module: 'catalina-ha'
     exclude group: 'org.apache.tomcat', module: 'juli'
   }
-  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+  provided project(path: ':gemfire-junit')
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cea74ab1/extensions/gemfire-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/build.gradle b/extensions/gemfire-modules/build.gradle
index 5b452b7..68197bf 100644
--- a/extensions/gemfire-modules/build.gradle
+++ b/extensions/gemfire-modules/build.gradle
@@ -24,10 +24,6 @@ test  {
   }
 }
 
-jar {
-  baseName = 'gemfire-modules'
-}
-
 dependencies {
   compile project(':gemfire-core')
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cea74ab1/gradle/java.gradle
----------------------------------------------------------------------
diff --git a/gradle/java.gradle b/gradle/java.gradle
index 90179b8..015da2f 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -125,4 +125,10 @@ subprojects {
     compile 'com.google.code.findbugs:jsr305:' + project.'jsr305.version'
     compile 'javax.enterprise:cdi-api:' + project.'cdi-api.version'
   }
+
+  jar {
+    // Intended to strip off 'extensions/' from the modules so that artifacts don't end up in libs/extensions/
+    def parts = project.name.split("/")
+    baseName = parts[parts.length - 1]
+  }
 }


[18/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/ImmediateSessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/ImmediateSessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/ImmediateSessionAttributes.java
new file mode 100644
index 0000000..15936ba
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/ImmediateSessionAttributes.java
@@ -0,0 +1,68 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.Instantiator;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class implements immediately transmitted attributes. All attributes are
+ * transmitted for every attribute update. This is bound to be a performance hit
+ * in some cases but ensures much higher data availability.
+ */
+public class ImmediateSessionAttributes extends AbstractSessionAttributes {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(ImmediateSessionAttributes.class.getName());
+
+  /**
+   * Register ourselves for de-serialization
+   */
+  static {
+    Instantiator.register(
+        new Instantiator(ImmediateSessionAttributes.class, 347) {
+          @Override
+          public DataSerializable newInstance() {
+            return new ImmediateSessionAttributes();
+          }
+        });
+  }
+
+  /**
+   * Default constructor
+   */
+  public ImmediateSessionAttributes() {
+  }
+
+  @Override
+  public Object putAttribute(String attr, Object value) {
+    Object obj = attributes.put(attr, value);
+    flush();
+    return obj;
+  }
+
+  @Override
+  public Object removeAttribute(String attr) {
+    Object obj = attributes.remove(attr);
+    flush();
+    return obj;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/QueuedSessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/QueuedSessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/QueuedSessionAttributes.java
new file mode 100644
index 0000000..8d20b43
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/QueuedSessionAttributes.java
@@ -0,0 +1,65 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.Instantiator;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class implements an attribute container which delays sending updates
+ * until the session goes out of scope. All attributes are transmitted during
+ * the update.
+ */
+public class QueuedSessionAttributes extends AbstractSessionAttributes {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(QueuedSessionAttributes.class.getName());
+
+  /**
+   * Register ourselves for de-serialization
+   */
+  static {
+    Instantiator.register(new Instantiator(QueuedSessionAttributes.class, 347) {
+      @Override
+      public DataSerializable newInstance() {
+        return new QueuedSessionAttributes();
+      }
+    });
+  }
+
+  /**
+   * Default constructor
+   */
+  public QueuedSessionAttributes() {
+  }
+
+  @Override
+  public Object putAttribute(String attr, Object value) {
+    Object obj = attributes.put(attr, value);
+    return obj;
+  }
+
+  @Override
+  public Object removeAttribute(String attr) {
+    Object obj = attributes.remove(attr);
+    return obj;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/SessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/SessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/SessionAttributes.java
new file mode 100644
index 0000000..b3b0cef
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/SessionAttributes.java
@@ -0,0 +1,120 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.modules.session.internal.filter.GemfireHttpSession;
+
+import java.util.Set;
+
+/**
+ * Interface for session attribute storage. In reality, this interface is
+ * responsible for anything, in the session which needs to be propagated for
+ * caching - as such it also includes other 'attributes' such as
+ * maxInactiveInterval and lastAccessedTime
+ */
+public interface SessionAttributes extends DataSerializable {
+
+  /**
+   * Set the session to which these attributes belong.
+   *
+   * @param session the session to set
+   */
+  public void setSession(GemfireHttpSession session);
+
+  /**
+   * Set an attribute value.
+   *
+   * @param attr  the name of the attribute to set
+   * @param value the value for the attribute
+   * @return the value object
+   */
+  public Object putAttribute(String attr, Object value);
+
+  /**
+   * Retrieve an attribute's value.
+   *
+   * @param attr the name of the attribute
+   * @return the object associated with the attribute or null if none exists.
+   */
+  public Object getAttribute(String attr);
+
+  /**
+   * Remove the named attribute.
+   *
+   * @param attr the name of the attribute to remove
+   * @return the value of the attribute removed or null if the named attribute
+   * did not exist.
+   */
+  public Object removeAttribute(String attr);
+
+  /**
+   * Return a set of all attribute names.
+   *
+   * @return a set of all attribute names
+   */
+  public Set<String> getAttributeNames();
+
+  /**
+   * Set the max inactive interval for replication to other systems
+   *
+   * @param interval the time interval in seconds
+   */
+  public void setMaxInactiveInterval(int interval);
+
+  /**
+   * Retrieve the max inactive interval
+   *
+   * @return the max inactive interval in seconds
+   */
+  public int getMaxIntactiveInterval();
+
+  /**
+   * Set the last accessed time for replication to other systems
+   *
+   * @param time the last accessed time in milliseconds
+   */
+  public void setLastAccessedTime(long time);
+
+  /**
+   * Return the last accessed time in milliseconds
+   *
+   * @return the last accessed time
+   */
+  public long getLastAccessedTime();
+
+  /**
+   * Explicitly flush the attributes to backing store.
+   */
+  public void flush();
+
+  /**
+   * Return the last jvm which 'owned' these attributes
+   *
+   * @return the jvmId
+   */
+  public String getJvmOwnerId();
+
+  /**
+   * Set the jvmId. This is set every time the attributes are flushed to the
+   * cache.
+   *
+   * @param jvmId
+   */
+  public void setJvmOwnerId(String jvmId);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/NamedThreadFactory.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/NamedThreadFactory.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/NamedThreadFactory.java
new file mode 100644
index 0000000..7491cf0
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/NamedThreadFactory.java
@@ -0,0 +1,68 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.util;
+
+import java.lang.Thread.UncaughtExceptionHandler;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Factory to create named threads for easy identification at runtime.
+ */
+public class NamedThreadFactory implements ThreadFactory {
+
+  private static final Logger LOG = Logger.getLogger(
+      NamedThreadFactory.class.getName());
+
+  private final String id;
+
+  private final AtomicLong serial = new AtomicLong();
+
+  /**
+   * Create a new thread factory, using the specified pool ID as a basis for
+   * naming each thread.
+   *
+   * @param poolID pool name/ID
+   */
+  public NamedThreadFactory(final String poolID) {
+    id = poolID;
+  }
+
+  /**
+   * {@inheritDoc}
+   * <p/>
+   * This implementation sets the name of the thread, sets the thread to be a
+   * daemon thread, and adds an uncaught exception handler.
+   */
+  @Override
+  public Thread newThread(Runnable r) {
+    Thread thr = new Thread(r);
+    thr.setDaemon(true);
+    thr.setName(id + " - " + serial.incrementAndGet());
+    thr.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
+      @Override
+      public void uncaughtException(Thread t, Throwable e) {
+        LOG.log(Level.WARNING,
+            "Uncaught Exception in thread: " + t.getName(), e);
+      }
+    });
+    return thr;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/ThreadLocalSession.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/ThreadLocalSession.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/ThreadLocalSession.java
new file mode 100644
index 0000000..996b1fd
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/ThreadLocalSession.java
@@ -0,0 +1,39 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.util;
+
+import javax.servlet.http.HttpSession;
+
+/**
+ */
+public class ThreadLocalSession {
+  private static ThreadLocal<HttpSession> threadLocal =
+      new ThreadLocal<HttpSession>();
+
+  public static HttpSession get() {
+    return threadLocal.get();
+  }
+
+  public static void set(HttpSession session) {
+    threadLocal.set(session);
+  }
+
+  public static void remove() {
+    threadLocal.remove();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/TypeAwareMap.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/TypeAwareMap.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/TypeAwareMap.java
new file mode 100644
index 0000000..705bafd
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/util/TypeAwareMap.java
@@ -0,0 +1,50 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.util;
+
+import com.gemstone.gemfire.modules.session.internal.common.CacheProperty;
+
+import java.util.HashMap;
+
+/**
+ *
+ */
+public class TypeAwareMap<K extends CacheProperty, Object> extends HashMap {
+
+  private Class<K> keyType;
+
+  public TypeAwareMap(Class<K> keyType) {
+    super();
+    this.keyType = keyType;
+  }
+
+  public Object put(K key, Object value) {
+    if (!key.getClazz().isAssignableFrom(value.getClass())) {
+      if (key.getClazz() == Boolean.class) {
+        return (Object) super.put(key, Boolean.valueOf((String) value));
+      } else if (key.getClazz() == Integer.class) {
+        return (Object) super.put(key, Integer.valueOf((String) value));
+      } else {
+        throw new IllegalArgumentException("Value is not of type " +
+            key.getClazz().getName());
+      }
+    }
+
+    return (Object) super.put(key, value);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatistics.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatistics.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatistics.java
new file mode 100644
index 0000000..9f945da
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatistics.java
@@ -0,0 +1,78 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.jmx;
+
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * Class to manage session statistics
+ */
+public class SessionStatistics implements SessionStatisticsMXBean {
+
+  private AtomicInteger activeSessions = new AtomicInteger(0);
+
+  private AtomicInteger totalSessions = new AtomicInteger(0);
+
+  private AtomicLong regionUpdates = new AtomicLong(0);
+
+  @Override
+  public int getActiveSessions() {
+    return activeSessions.get();
+  }
+
+  @Override
+  public int getTotalSessions() {
+    return totalSessions.get();
+  }
+
+  @Override
+  public long getRegionUpdates() {
+    return regionUpdates.get();
+  }
+
+  public void setActiveSessions(int sessions) {
+    activeSessions.set(sessions);
+  }
+
+  public void setTotalSessions(int sessions) {
+    totalSessions.set(sessions);
+  }
+
+  public void incActiveSessions() {
+    activeSessions.incrementAndGet();
+    totalSessions.incrementAndGet();
+  }
+
+  public void decActiveSessions() {
+    activeSessions.decrementAndGet();
+  }
+
+  public void incTotalSessions() {
+    totalSessions.incrementAndGet();
+  }
+
+  public void decTotalSessions() {
+    totalSessions.decrementAndGet();
+  }
+
+  public void incRegionUpdates() {
+    regionUpdates.incrementAndGet();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatisticsMXBean.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatisticsMXBean.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatisticsMXBean.java
new file mode 100644
index 0000000..33cfc3e
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/jmx/SessionStatisticsMXBean.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.modules.session.internal.jmx;
+
+/**
+ * MXBean interface to retrieve Session statistics
+ */
+public interface SessionStatisticsMXBean {
+
+  public int getActiveSessions();
+
+  public int getTotalSessions();
+
+  public long getRegionUpdates();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/AbstractListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/AbstractListener.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/AbstractListener.java
new file mode 100644
index 0000000..0bca895
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/AbstractListener.java
@@ -0,0 +1,57 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author jdeppe
+ */
+public abstract class AbstractListener {
+
+  protected final List<ListenerEventType> events =
+      new ArrayList<ListenerEventType>();
+
+  protected CountDownLatch latch;
+
+  public AbstractListener() {
+    this(1);
+  }
+
+  public AbstractListener(int numCalls) {
+    latch = new CountDownLatch(numCalls);
+    RendezvousManager.registerListener(this);
+  }
+
+  public synchronized void setLatch(int numCalls) {
+    latch = new CountDownLatch(numCalls);
+    events.clear();
+  }
+
+  public boolean await(long timeout,
+      TimeUnit unit) throws InterruptedException {
+    return latch.await(timeout, unit);
+  }
+
+  public List<ListenerEventType> getEvents() {
+    return events;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/BasicServlet.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/BasicServlet.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/BasicServlet.java
new file mode 100644
index 0000000..5804317
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/BasicServlet.java
@@ -0,0 +1,52 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import java.io.IOException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.jetty.servlet.DefaultServlet;
+/**
+ *
+ */
+public class BasicServlet extends DefaultServlet {
+
+  Callback callback = null;
+
+  @Override
+  public void doGet(HttpServletRequest request, HttpServletResponse response)
+      throws IOException, ServletException {
+
+    if (callback != null) {
+      callback.call(request, response);
+    }
+  }
+
+  @Override
+  public void init(ServletConfig config) throws ServletException {
+    super.init(config);
+    ServletContext context = config.getServletContext();
+
+    String cbInitParam = config.getInitParameter("test.callback");
+    callback = (Callback) context.getAttribute(cbInitParam);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/Callback.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/Callback.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/Callback.java
new file mode 100644
index 0000000..fa5b64f
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/Callback.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * Interface which, when implemented, can be put into a servlet context and executed by the servlet.
+ */
+public interface Callback {
+  void call(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CallbackServlet.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CallbackServlet.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CallbackServlet.java
new file mode 100644
index 0000000..3050280
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CallbackServlet.java
@@ -0,0 +1,91 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class CallbackServlet extends HttpServlet {
+
+  private Callback callback;
+
+  /**
+   * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
+   * methods.
+   *
+   * @param request  servlet request
+   * @param response servlet response
+   * @throws ServletException if a servlet-specific error occurs
+   * @throws IOException      if an I/O error occurs
+   */
+  protected void processRequest(HttpServletRequest request,
+      HttpServletResponse response)
+      throws ServletException, IOException {
+
+    if (callback != null) {
+      callback.call(request, response);
+    }
+  }
+
+  public void setCallback(Callback callback) {
+    this.callback = callback;
+  }
+
+  /**
+   * Handles the HTTP <code>GET</code> method.
+   *
+   * @param request  servlet request
+   * @param response servlet response
+   * @throws ServletException if a servlet-specific error occurs
+   * @throws IOException      if an I/O error occurs
+   */
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException {
+    processRequest(request, response);
+  }
+
+  /**
+   * Handles the HTTP <code>POST</code> method.
+   *
+   * @param request  servlet request
+   * @param response servlet response
+   * @throws ServletException if a servlet-specific error occurs
+   * @throws IOException      if an I/O error occurs
+   */
+  @Override
+  protected void doPost(HttpServletRequest request,
+      HttpServletResponse response)
+      throws ServletException, IOException {
+    processRequest(request, response);
+  }
+
+  /**
+   * Returns a short description of the servlet.
+   *
+   * @return a String containing servlet description
+   */
+  @Override
+  public String getServletInfo() {
+    return "Short description";
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CommonTests.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CommonTests.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CommonTests.java
new file mode 100644
index 0000000..4a37d36
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/CommonTests.java
@@ -0,0 +1,582 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.mockrunner.mock.web.MockHttpServletRequest;
+import com.mockrunner.mock.web.MockHttpServletResponse;
+import com.mockrunner.mock.web.MockHttpSession;
+import com.mockrunner.servlet.BasicServletTestCaseAdapter;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.util.concurrent.TimeUnit;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionAttributeListener;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+/**
+ * This servlet tests the effects of the downstream SessionCachingFilter filter.
+ * When these tests are performed, the filter would already have taken effect.
+ */
+public abstract class CommonTests extends BasicServletTestCaseAdapter {
+
+  protected static final String CONTEXT_PATH = "/test";
+
+  @Test
+  public void testGetSession1() throws Exception {
+    doFilter();
+    HttpSession session1 =
+        ((HttpServletRequest) getFilteredRequest()).getSession();
+    HttpSession session2 =
+        ((HttpServletRequest) getFilteredRequest()).getSession();
+
+    assertSame("Session should be the same", session1, session2);
+  }
+
+  @Test
+  public void testGetSession2() throws Exception {
+    doFilter();
+
+    HttpSession session1 = ((HttpServletRequest) getFilteredRequest()).getSession();
+
+    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
+    Cookie cookie = (Cookie) response.getCookies().get(0);
+    getWebMockObjectFactory().getMockRequest().addCookie(cookie);
+
+    doFilter();
+
+    HttpSession session2 = ((HttpServletRequest) getFilteredRequest()).getSession();
+
+    assertEquals("Session objects across requests should be the same", session1, session2);
+  }
+
+  @Test
+  public void testGetAttributeRequest1() throws Exception {
+    doFilter();
+
+    getFilteredRequest().setAttribute("foo", "bar");
+
+    assertEquals("bar", getFilteredRequest().getAttribute("foo"));
+    assertNull("Unknown attribute should be null",
+        getFilteredRequest().getAttribute("baz"));
+  }
+
+  @Test
+  public void testGetAttributeRequest2() throws Exception {
+    // Setup
+    CallbackServlet s = (CallbackServlet) getServlet();
+    s.setCallback(new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) {
+        request.setAttribute("foo", "bar");
+      }
+    });
+    doFilter();
+
+    assertEquals("bar", getFilteredRequest().getAttribute("foo"));
+    assertNull("Unknown attribute should be null",
+        getFilteredRequest().getAttribute("baz"));
+  }
+
+  @Test
+  public void testGetAttributeSession1() throws Exception {
+    doFilter();
+
+    ((HttpServletRequest) getFilteredRequest()).getSession().setAttribute("foo", "bar");
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    assertEquals("bar", request.getSession().getAttribute("foo"));
+  }
+
+  /**
+   * Are attributes preserved across client requests?
+   */
+  @Test
+  public void testGetAttributeSession2() throws Exception {
+    doFilter();
+
+    ((HttpServletRequest) getFilteredRequest()).getSession().setAttribute("foo", "bar");
+
+    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
+    Cookie cookie = (Cookie) response.getCookies().get(0);
+    getWebMockObjectFactory().getMockRequest().addCookie(cookie);
+
+    doFilter();
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+
+    assertEquals("bar", request.getSession().getAttribute("foo"));
+  }
+
+  /**
+   * Setting a session attribute to null should remove it
+   */
+  @Test
+  public void testSetAttributeNullSession1() throws Exception {
+    // Setup
+    CallbackServlet s = (CallbackServlet) getServlet();
+    s.setCallback(new Callback() {
+      private boolean called = false;
+
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) {
+        if (called) {
+          request.getSession().setAttribute("foo", null);
+        } else {
+          request.getSession().setAttribute("foo", "bar");
+          called = true;
+        }
+      }
+    });
+
+    doFilter();
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+
+    String attr = (String) session.getAttribute("foo");
+    assertNull("Attribute should be null but is " + attr, attr);
+  }
+
+
+  /**
+   * Test that various methods throw the appropriate exception when the session is
+   * invalid.
+   */
+  @Test
+  public void testInvalidate1() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getAttribute("foo");
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Test
+  public void testInvalidate2() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getAttributeNames();
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Ignore(value = "until mockrunner 1.0.9 - see pull request #23")
+  public void testInvalidate3() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getCreationTime();
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Test
+  public void testInvalidate4() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getId();
+    } catch (Exception iex) {
+      fail("Exception should not be thrown");
+    }
+  }
+
+  @Test
+  public void testInvalidate5() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getLastAccessedTime();
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Test
+  public void testInvalidate6() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getMaxInactiveInterval();
+    } catch (Exception ex) {
+      fail("Exception should not be thrown");
+    }
+  }
+
+  @Test
+  public void testInvalidate7() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.getServletContext();
+    } catch (Exception ex) {
+      fail("Exception should not be thrown");
+    }
+  }
+
+  @Test
+  public void testInvalidate8() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.isNew();
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Test
+  public void testInvalidate9() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.removeAttribute("foo");
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Test
+  public void testInvalidate10() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.setAttribute("foo", "bar");
+      fail("Session should be invalid and an exception should be thrown");
+    } catch (IllegalStateException iex) {
+      // Pass
+    }
+  }
+
+  @Test
+  public void testInvalidate11() throws Exception {
+    doFilter();
+
+    HttpSession session = ((HttpServletRequest) getFilteredRequest()).getSession();
+    session.invalidate();
+
+    try {
+      session.setMaxInactiveInterval(1);
+    } catch (Exception ex) {
+      fail("Exception should not be thrown");
+    }
+  }
+
+  /**
+   * Test that Session Attribute events get triggered
+   */
+  @Test
+  public void testSessionAttributeListener1() throws Exception {
+    AbstractListener listener = new HttpSessionAttributeListenerImpl();
+    RendezvousManager.registerListener(listener);
+    listener.setLatch(3);
+
+    doFilter();
+
+    // Ugh
+    MockHttpSession session = (MockHttpSession) ((GemfireHttpSession) ((HttpServletRequest) getFilteredRequest()).getSession()).getNativeSession();
+    session.addAttributeListener((HttpSessionAttributeListener) listener);
+    session.setAttribute("foo", "bar");
+    session.setAttribute("foo", "baz");
+    session.setAttribute("foo", null);
+
+    assertTrue("Event timeout", listener.await(1, TimeUnit.SECONDS));
+    assertEquals(ListenerEventType.SESSION_ATTRIBUTE_ADDED, listener.getEvents().get(0));
+    assertEquals(ListenerEventType.SESSION_ATTRIBUTE_REPLACED,
+        listener.getEvents().get(1));
+    assertEquals(ListenerEventType.SESSION_ATTRIBUTE_REMOVED,
+        listener.getEvents().get(2));
+  }
+
+  /**
+   * Test that both replace and remove events get triggered
+   */
+  @Test
+  public void testHttpSessionBindingListener1() throws Exception {
+    doFilter();
+
+    HttpSession session =
+        ((HttpServletRequest) getFilteredRequest()).getSession();
+
+    HttpSessionBindingListenerImpl listener1 =
+        new HttpSessionBindingListenerImpl(2);
+    HttpSessionBindingListenerImpl listener2 =
+        new HttpSessionBindingListenerImpl(2);
+
+    session.setAttribute("foo", listener1);
+    session.setAttribute("foo", listener2);
+    session.setAttribute("foo", null);
+
+    assertTrue("Event timeout", listener1.await(1, TimeUnit.SECONDS));
+    assertTrue("Event timeout", listener2.await(1, TimeUnit.SECONDS));
+
+    assertEquals("Event list size incorrect", 2, listener1.getEvents().size());
+    assertEquals("Event list size incorrect", 2, listener2.getEvents().size());
+    assertEquals(ListenerEventType.SESSION_VALUE_BOUND, listener1.getEvents().get(0));
+    assertEquals(ListenerEventType.SESSION_VALUE_UNBOUND,
+        listener1.getEvents().get(1));
+    assertEquals(ListenerEventType.SESSION_VALUE_BOUND, listener2.getEvents().get(0));
+    assertEquals(ListenerEventType.SESSION_VALUE_UNBOUND,
+        listener2.getEvents().get(1));
+  }
+
+  @Test
+  public void testGetId1() throws Exception {
+    doFilter();
+
+    assertNotNull("Session Id should not be null",
+        ((HttpServletRequest) getFilteredRequest()).getSession().getId());
+  }
+
+  /**
+   * Test that multiple calls from the same client return the same session id
+   */
+  @Test
+  public void testGetId2() throws Exception {
+    doFilter();
+
+    String sessionId = ((HttpServletRequest) getFilteredRequest()).getSession().getId();
+
+    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
+    Cookie cookie = (Cookie) response.getCookies().get(0);
+    getWebMockObjectFactory().getMockRequest().addCookie(cookie);
+
+    doFilter();
+
+    assertEquals("Session Ids should be the same", sessionId,
+        ((HttpServletRequest) getFilteredRequest()).getSession().getId());
+  }
+
+  @Test
+  public void testGetCreationTime1() throws Exception {
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    assertTrue("Session should have a non-zero creation time",
+        request.getSession().getCreationTime() > 0);
+  }
+
+
+  /**
+   * Test that multiple calls from the same client don't change the creation time.
+   */
+  @Test
+  public void testGetCreationTime2() throws Exception {
+    doFilter();
+
+    long creationTime = ((HttpServletRequest) getFilteredRequest()).getSession().getCreationTime();
+
+    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
+    Cookie cookie = (Cookie) response.getCookies().get(0);
+    getWebMockObjectFactory().getMockRequest().addCookie(cookie);
+
+    doFilter();
+
+    assertEquals("Session creation time should be the same", creationTime,
+        ((HttpServletRequest) getFilteredRequest()).getSession().getCreationTime());
+  }
+
+  @Test
+  public void testResponseContainsRequestedSessionId1() throws Exception {
+    Cookie cookie = new Cookie("JSESSIONID", "999-GF");
+    getWebMockObjectFactory().getMockRequest().addCookie(cookie);
+
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+
+    assertEquals("Request does not contain requested session ID", "999-GF",
+        request.getRequestedSessionId());
+  }
+
+  @Test
+  public void testGetLastAccessedTime1() throws Exception {
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    assertTrue("Session should have a non-zero last access time",
+        request.getSession().getLastAccessedTime() > 0);
+  }
+
+
+  /**
+   * Test that repeated accesses update the last accessed time
+   */
+  @Test
+  public void testGetLastAccessedTime2() throws Exception {
+    // Setup
+    CallbackServlet s = (CallbackServlet) getServlet();
+    s.setCallback(new Callback() {
+
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) {
+        request.getSession();
+      }
+    });
+
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    long lastAccess = request.getSession().getLastAccessedTime();
+    assertTrue("Session should have a non-zero last access time", lastAccess > 0);
+
+    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
+    Cookie cookie = (Cookie) response.getCookies().get(0);
+
+    MockHttpServletRequest mRequest = getWebMockObjectFactory().createMockRequest();
+    mRequest.setRequestURL("/test/foo/bar");
+    mRequest.setContextPath(CONTEXT_PATH);
+    mRequest.addCookie(cookie);
+    getWebMockObjectFactory().addRequestWrapper(mRequest);
+
+    Thread.sleep(50);
+    doFilter();
+
+    assertTrue("Last access time should be changing",
+        request.getSession().getLastAccessedTime() > lastAccess);
+  }
+
+  @Test
+  public void testGetSetMaxInactiveInterval() throws Exception {
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    request.getSession().setMaxInactiveInterval(50);
+
+    assertEquals(50, request.getSession().getMaxInactiveInterval());
+  }
+
+  @Test
+  public void testIsNew1() throws Exception {
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    assertTrue("Session should be new", request.getSession().isNew());
+  }
+
+  /**
+   * Subsequent calls should not return true
+   */
+  @Test
+  public void testIsNew2() throws Exception {
+    // Setup
+    CallbackServlet s = (CallbackServlet) getServlet();
+    s.setCallback(new Callback() {
+
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) {
+        request.getSession();
+      }
+    });
+
+    doFilter();
+
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    request.getSession();
+
+    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
+    Cookie cookie = (Cookie) response.getCookies().get(0);
+
+    MockHttpServletRequest mRequest = getWebMockObjectFactory().createMockRequest();
+    mRequest.setRequestURL("/test/foo/bar");
+    mRequest.setContextPath(CONTEXT_PATH);
+    mRequest.addCookie(cookie);
+    getWebMockObjectFactory().addRequestWrapper(mRequest);
+
+    doFilter();
+
+    request = (HttpServletRequest) getFilteredRequest();
+    HttpSession s1 = request.getSession();
+
+    assertFalse("Subsequent isNew() calls should be false", request.getSession().isNew());
+  }
+
+  @Test
+  public void testIsRequestedSessionIdFromCookie() {
+    MockHttpServletRequest mRequest = getWebMockObjectFactory().getMockRequest();
+    Cookie c = new Cookie("JSESSIONID", "1-GF");
+    mRequest.addCookie(c);
+
+    doFilter();
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    request.getSession();
+
+    assertTrue(request.isRequestedSessionIdFromCookie());
+  }
+
+  @Test
+  public void testIsRequestedSessionIdFromURL() {
+    MockHttpServletRequest mRequest = getWebMockObjectFactory().getMockRequest();
+    mRequest.setRequestURL("/foo/bar;jsessionid=1");
+
+    doFilter();
+    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
+    request.getSession();
+
+    assertFalse("Session ID should not be from cookie",
+        request.isRequestedSessionIdFromCookie());
+    assertTrue("Session ID should be from URL", request.isRequestedSessionIdFromURL());
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionAttributeListenerImpl.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionAttributeListenerImpl.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionAttributeListenerImpl.java
new file mode 100644
index 0000000..6d5679a
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionAttributeListenerImpl.java
@@ -0,0 +1,46 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import javax.servlet.http.HttpSessionAttributeListener;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/**
+ *
+ */
+public class HttpSessionAttributeListenerImpl extends AbstractListener
+    implements HttpSessionAttributeListener {
+
+  @Override
+  public synchronized void attributeAdded(HttpSessionBindingEvent se) {
+    events.add(ListenerEventType.SESSION_ATTRIBUTE_ADDED);
+    latch.countDown();
+  }
+
+  @Override
+  public synchronized void attributeRemoved(HttpSessionBindingEvent se) {
+    events.add(ListenerEventType.SESSION_ATTRIBUTE_REMOVED);
+    latch.countDown();
+  }
+
+  @Override
+  public synchronized void attributeReplaced(HttpSessionBindingEvent se) {
+    events.add(ListenerEventType.SESSION_ATTRIBUTE_REPLACED);
+    latch.countDown();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionBindingListenerImpl.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionBindingListenerImpl.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionBindingListenerImpl.java
new file mode 100644
index 0000000..ce25cb6
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionBindingListenerImpl.java
@@ -0,0 +1,42 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import java.io.Serializable;
+import javax.servlet.http.HttpSessionBindingEvent;
+import javax.servlet.http.HttpSessionBindingListener;
+
+public class HttpSessionBindingListenerImpl extends AbstractListener implements
+    HttpSessionBindingListener, Serializable {
+
+  public HttpSessionBindingListenerImpl(int i) {
+    super(i);
+  }
+
+  @Override
+  public synchronized void valueBound(HttpSessionBindingEvent event) {
+    events.add(ListenerEventType.SESSION_VALUE_BOUND);
+    latch.countDown();
+  }
+
+  @Override
+  public synchronized void valueUnbound(HttpSessionBindingEvent event) {
+    events.add(ListenerEventType.SESSION_VALUE_UNBOUND);
+    latch.countDown();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl.java
new file mode 100644
index 0000000..55510a6
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl.java
@@ -0,0 +1,41 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+public class HttpSessionListenerImpl extends AbstractListener
+    implements HttpSessionListener {
+
+  public synchronized void sessionCreated(HttpSessionEvent se) {
+    HttpSession gfeSession = SessionCachingFilter.getWrappingSession(
+        se.getSession());
+    gfeSession.setAttribute("gemfire-session-id", gfeSession.getId());
+    events.add(ListenerEventType.SESSION_CREATED);
+    latch.countDown();
+  }
+
+  public synchronized void sessionDestroyed(HttpSessionEvent se) {
+    events.add(ListenerEventType.SESSION_DESTROYED);
+    latch.countDown();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl2.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl2.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl2.java
new file mode 100644
index 0000000..bccd83f
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/HttpSessionListenerImpl2.java
@@ -0,0 +1,43 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+public class HttpSessionListenerImpl2 extends AbstractListener
+    implements HttpSessionListener {
+
+  @Override
+  public void sessionCreated(HttpSessionEvent se) {
+    events.add(ListenerEventType.SESSION_CREATED);
+    latch.countDown();
+  }
+
+  @Override
+  public void sessionDestroyed(HttpSessionEvent se) {
+    HttpSession gfeSession = SessionCachingFilter.getWrappingSession(
+        se.getSession());
+    assert (gfeSession != null);
+    events.add(ListenerEventType.SESSION_DESTROYED);
+    latch.countDown();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/MyServletTester.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/MyServletTester.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/MyServletTester.java
new file mode 100644
index 0000000..09c9536
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/MyServletTester.java
@@ -0,0 +1,38 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import org.eclipse.jetty.servlet.ServletTester;
+
+/**
+ * Extend the base ServletTester class with a couple of helper methods. This
+ * depends on a patched ServletTester class which exposes the _server variable
+ * as package-private.
+ */
+public class MyServletTester extends ServletTester {
+
+  public boolean isStarted() {
+//    return _server.isStarted();
+    return false;
+  }
+
+  public boolean isStopped() {
+//    return _server.isStopped();
+    return false;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/RendezvousManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/RendezvousManager.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/RendezvousManager.java
new file mode 100644
index 0000000..acb5a1b
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/RendezvousManager.java
@@ -0,0 +1,46 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ *
+ */
+public class RendezvousManager {
+
+  private static AbstractListener listener = null;
+
+  private static CountDownLatch latch = new CountDownLatch(1);
+
+  public static void registerListener(AbstractListener listener) {
+    RendezvousManager.listener = listener;
+    latch.countDown();
+  }
+
+  public static AbstractListener getListener() {
+    try {
+      latch.await(2, TimeUnit.SECONDS);
+    } catch (InterruptedException ex) {
+    }
+
+    return listener;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestAttributeListenerImpl.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestAttributeListenerImpl.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestAttributeListenerImpl.java
new file mode 100644
index 0000000..ab06356
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestAttributeListenerImpl.java
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.ServletRequestAttributeListener;
+
+/**
+ * @author jdeppe
+ */
+public class ServletRequestAttributeListenerImpl extends AbstractListener
+    implements ServletRequestAttributeListener {
+
+  public synchronized void attributeAdded(ServletRequestAttributeEvent srae) {
+    events.add(ListenerEventType.SERVLET_REQUEST_ATTRIBUTE_ADDED);
+    latch.countDown();
+  }
+
+  public synchronized void attributeRemoved(ServletRequestAttributeEvent srae) {
+    events.add(ListenerEventType.SERVLET_REQUEST_ATTRIBUTE_REMOVED);
+    latch.countDown();
+  }
+
+  public synchronized void attributeReplaced(
+      ServletRequestAttributeEvent srae) {
+    events.add(ListenerEventType.SERVLET_REQUEST_ATTRIBUTE_REPLACED);
+    latch.countDown();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestListenerImpl.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestListenerImpl.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestListenerImpl.java
new file mode 100644
index 0000000..5e007dd
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/ServletRequestListenerImpl.java
@@ -0,0 +1,36 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.ServletRequestListener;
+
+public class ServletRequestListenerImpl extends AbstractListener
+    implements ServletRequestListener {
+
+  public synchronized void requestDestroyed(ServletRequestEvent sre) {
+    events.add(ListenerEventType.SERVLET_REQUEST_DESTROYED);
+    latch.countDown();
+  }
+
+  public synchronized void requestInitialized(ServletRequestEvent sre) {
+    events.add(ListenerEventType.SERVLET_REQUEST_INITIALIZED);
+    latch.countDown();
+  }
+
+}


[19/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/ClientServerSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/ClientServerSessionCache.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/ClientServerSessionCache.java
new file mode 100644
index 0000000..a23888c
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/ClientServerSessionCache.java
@@ -0,0 +1,186 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.common;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientRegionFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.execute.Execution;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.modules.util.BootstrappingFunction;
+import com.gemstone.gemfire.modules.util.CreateRegionFunction;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import com.gemstone.gemfire.modules.util.RegionStatus;
+
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpSession;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Class which defines a client/server cache.
+ */
+public class ClientServerSessionCache extends AbstractSessionCache {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(PeerToPeerSessionCache.class.getName());
+
+  private ClientCache cache;
+
+  protected static final String DEFAULT_REGION_ATTRIBUTES_ID =
+      RegionShortcut.PARTITION_REDUNDANT.toString();
+
+  protected static final Boolean DEFAULT_ENABLE_LOCAL_CACHE = true;
+
+  /**
+   * Constructor
+   *
+   * @param cache
+   * @param properties
+   */
+  public ClientServerSessionCache(ClientCache cache,
+      Map<CacheProperty, Object> properties) {
+    super();
+    this.cache = cache;
+
+    /**
+     * Set some default properties for this cache if they haven't already
+     * been set
+     */
+    this.properties.put(CacheProperty.REGION_ATTRIBUTES_ID,
+        DEFAULT_REGION_ATTRIBUTES_ID);
+    this.properties.put(CacheProperty.ENABLE_LOCAL_CACHE,
+        DEFAULT_ENABLE_LOCAL_CACHE);
+    this.properties.putAll(properties);
+  }
+
+  @Override
+  public void initialize() {
+    // Bootstrap the servers
+    bootstrapServers();
+
+    // Create or retrieve the region
+    createOrRetrieveRegion();
+
+    // Set the session region directly as the operating region since there is no difference
+    // between the local cache region and the session region.
+    operatingRegion = sessionRegion;
+
+    // Create or retrieve the statistics
+    createStatistics();
+  }
+
+  @Override
+  public GemFireCache getCache() {
+    return cache;
+  }
+
+  @Override
+  public boolean isClientServer() {
+    return true;
+  }
+
+
+  ////////////////////////////////////////////////////////////////////////
+  // Private methods
+
+  private void bootstrapServers() {
+    Execution execution = FunctionService.onServers(this.cache);
+    ResultCollector collector = execution.execute(new BootstrappingFunction());
+    // Get the result. Nothing is being done with it.
+    try {
+      collector.getResult();
+    } catch (Exception e) {
+      // If an exception occurs in the function, log it.
+      LOG.warn("Caught unexpected exception:", e);
+    }
+  }
+
+  private void createOrRetrieveRegion() {
+    // Retrieve the local session region
+    this.sessionRegion =
+        this.cache.getRegion(
+            (String) properties.get(CacheProperty.REGION_NAME));
+
+    // If necessary, create the regions on the server and client
+    if (this.sessionRegion == null) {
+      // Create the PR on the servers
+      createSessionRegionOnServers();
+
+      // Create the region on the client
+      this.sessionRegion = createLocalSessionRegion();
+      LOG.debug("Created session region: " + this.sessionRegion);
+    } else {
+      LOG.debug("Retrieved session region: " + this.sessionRegion);
+    }
+  }
+
+  private void createSessionRegionOnServers() {
+    // Create the RegionConfiguration
+    RegionConfiguration configuration = createRegionConfiguration();
+
+    // Send it to the server tier
+    Execution execution = FunctionService.onServer(this.cache).withArgs(
+        configuration);
+    ResultCollector collector = execution.execute(CreateRegionFunction.ID);
+
+    // Verify the region was successfully created on the servers
+    List<RegionStatus> results = (List<RegionStatus>) collector.getResult();
+    for (RegionStatus status : results) {
+      if (status == RegionStatus.INVALID) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(
+            "An exception occurred on the server while attempting to create or validate region named ");
+        builder.append(properties.get(CacheProperty.REGION_NAME));
+        builder.append(". See the server log for additional details.");
+        throw new IllegalStateException(builder.toString());
+      }
+    }
+  }
+
+  private Region<String, HttpSession> createLocalSessionRegion() {
+    ClientRegionFactory<String, HttpSession> factory = null;
+    boolean enableLocalCache =
+        (Boolean) properties.get(CacheProperty.ENABLE_LOCAL_CACHE);
+
+    String regionName = (String) properties.get(CacheProperty.REGION_NAME);
+    if (enableLocalCache) {
+      // Create the region factory with caching and heap LRU enabled
+      factory = ((ClientCache) this.cache).
+          createClientRegionFactory(
+              ClientRegionShortcut.CACHING_PROXY_HEAP_LRU);
+      LOG.info("Created new local client session region: {}", regionName);
+    } else {
+      // Create the region factory without caching enabled
+      factory = ((ClientCache) this.cache).createClientRegionFactory(
+          ClientRegionShortcut.PROXY);
+      LOG.info(
+          "Created new local client (uncached) session region: {} without any session expiry",
+          regionName);
+    }
+
+    // Create the region
+    return factory.create(regionName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/PeerToPeerSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/PeerToPeerSessionCache.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/PeerToPeerSessionCache.java
new file mode 100644
index 0000000..878adaa
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/PeerToPeerSessionCache.java
@@ -0,0 +1,184 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.common;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.modules.session.catalina.callback.LocalSessionCacheLoader;
+import com.gemstone.gemfire.modules.session.catalina.callback.LocalSessionCacheWriter;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import com.gemstone.gemfire.modules.util.RegionHelper;
+import com.gemstone.gemfire.modules.util.TouchPartitionedRegionEntriesFunction;
+import com.gemstone.gemfire.modules.util.TouchReplicatedRegionEntriesFunction;
+
+import java.util.Map;
+import javax.servlet.http.HttpSession;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Class which defines a peer-to-peer cache
+ */
+public class PeerToPeerSessionCache extends AbstractSessionCache {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(PeerToPeerSessionCache.class.getName());
+
+  private Cache cache;
+
+  private static final String DEFAULT_REGION_ATTRIBUTES_ID =
+      RegionShortcut.REPLICATE.toString();
+
+  private static final Boolean DEFAULT_ENABLE_LOCAL_CACHE = false;
+
+  /**
+   * Constructor
+   *
+   * @param cache
+   * @param properties
+   */
+  public PeerToPeerSessionCache(Cache cache,
+      Map<CacheProperty, Object> properties) {
+    super();
+    this.cache = cache;
+
+    /**
+     * Set some default properties for this cache if they haven't already
+     * been set
+     */
+    this.properties.put(CacheProperty.REGION_ATTRIBUTES_ID,
+        DEFAULT_REGION_ATTRIBUTES_ID);
+    this.properties.put(CacheProperty.ENABLE_LOCAL_CACHE,
+        DEFAULT_ENABLE_LOCAL_CACHE);
+    this.properties.putAll(properties);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void initialize() {
+    // Register Functions
+    registerFunctions();
+
+    // Create or retrieve the region
+    createOrRetrieveRegion();
+
+    /**
+     * If local cache is enabled, create the local region fronting the
+     * session region and set it as the operating region; otherwise, use
+     * the session region directly as the operating region.
+     */
+    boolean enableLocalCache =
+        (Boolean) properties.get(CacheProperty.ENABLE_LOCAL_CACHE);
+    operatingRegion = enableLocalCache
+        ? createOrRetrieveLocalRegion()
+        : this.sessionRegion;
+
+    // Create or retrieve the statistics
+    createStatistics();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public GemFireCache getCache() {
+    return cache;
+  }
+
+  @Override
+  public boolean isClientServer() {
+    return false;
+  }
+
+  private void registerFunctions() {
+    // Register the touch partitioned region entries function if it is not already registered
+    if (!FunctionService.isRegistered(
+        TouchPartitionedRegionEntriesFunction.ID)) {
+      FunctionService.registerFunction(
+          new TouchPartitionedRegionEntriesFunction());
+    }
+
+    // Register the touch replicated region entries function if it is not already registered
+    if (!FunctionService.isRegistered(
+        TouchReplicatedRegionEntriesFunction.ID)) {
+      FunctionService.registerFunction(
+          new TouchReplicatedRegionEntriesFunction());
+    }
+  }
+
+  private void createOrRetrieveRegion() {
+    // Create the RegionConfiguration
+    RegionConfiguration configuration = createRegionConfiguration();
+
+    // Attempt to retrieve the region
+    // If it already exists, validate it
+    // If it doesn't already exist, create it
+    Region region = this.cache.getRegion(
+        (String) properties.get(CacheProperty.REGION_NAME));
+    if (region == null) {
+      // Create the region
+      region = RegionHelper.createRegion(cache, configuration);
+      LOG.info("Created new session region: {}", region);
+    } else {
+      // Validate the existing region
+      LOG.info("Retrieved existing session region: {}", region);
+      RegionHelper.validateRegion(cache, configuration, region);
+    }
+
+    // Set the session region
+    this.sessionRegion = region;
+  }
+
+  /**
+   * Create a local region fronting the main region.
+   *
+   * @return
+   */
+  private Region<String, HttpSession> createOrRetrieveLocalRegion() {
+    // Attempt to retrieve the fronting region
+    String frontingRegionName = this.sessionRegion.getName() + "_local";
+    Region<String, HttpSession> frontingRegion =
+        this.cache.getRegion(frontingRegionName);
+
+    if (frontingRegion == null) {
+      // Create the region factory
+      RegionFactory<String, HttpSession> factory =
+          this.cache.createRegionFactory(RegionShortcut.LOCAL_HEAP_LRU);
+
+      // Add the cache loader and writer
+      factory.setCacheLoader(new LocalSessionCacheLoader(this.sessionRegion));
+      factory.setCacheWriter(new LocalSessionCacheWriter(this.sessionRegion));
+
+      // Create the region
+      frontingRegion = factory.create(frontingRegionName);
+      LOG.info("Created new local session region: {}", frontingRegion);
+    } else {
+      LOG.info("Retrieved existing local session region: {}",
+          frontingRegion);
+    }
+
+    return frontingRegion;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionCache.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionCache.java
new file mode 100644
index 0000000..7562dff
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionCache.java
@@ -0,0 +1,68 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.common;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+
+import javax.servlet.http.HttpSession;
+
+/**
+ * Interface to basic cache operations.
+ */
+public interface SessionCache {
+
+  /**
+   * Initialize the cache and create the appropriate region.
+   */
+  public void initialize();
+
+  /**
+   * Stop the cache.
+   */
+  public void stop();
+
+  /**
+   * Retrieve the cache reference.
+   *
+   * @return a {@code GemFireCache} reference
+   */
+  public GemFireCache getCache();
+
+  /**
+   * Get the {@code Region} being used by client code to put attributes.
+   *
+   * @return a {@code Region<String, HttpSession>} reference
+   */
+  public Region<String, HttpSession> getOperatingRegion();
+
+  /**
+   * Get the backing {@code Region} being used. This may not be the same as the
+   * region being used by client code to put attributes.
+   *
+   * @return a {@code Region<String, HttpSession>} reference
+   */
+  public Region<String, HttpSession> getSessionRegion();
+
+  /**
+   * Is this cache client-server? The only other alternative is peer-to-peer.
+   *
+   * @return true if this cache is client-server.
+   */
+  public boolean isClientServer();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionExpirationCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionExpirationCacheListener.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionExpirationCacheListener.java
new file mode 100644
index 0000000..648e711
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/common/SessionExpirationCacheListener.java
@@ -0,0 +1,53 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.common;
+
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.Operation;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+
+import java.util.Properties;
+import javax.servlet.http.HttpSession;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SessionExpirationCacheListener extends
+    CacheListenerAdapter<String, HttpSession> implements Declarable {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(SessionExpirationCacheListener.class.getName());
+
+  @Override
+  public void afterDestroy(EntryEvent<String, HttpSession> event) {
+    /**
+     * A Session expired. If it was destroyed by GemFire expiration,
+     * process it. If it was destroyed via Session.invalidate, ignore it
+     * since it has already been processed.
+     */
+    if (event.getOperation() == Operation.EXPIRE_DESTROY) {
+      HttpSession session = (HttpSession) event.getOldValue();
+      session.invalidate();
+    }
+  }
+
+  @Override
+  public void init(Properties p) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/Constants.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/Constants.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/Constants.java
new file mode 100644
index 0000000..4ce8733
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/Constants.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+/**
+ * Various constant values used through the app
+ */
+public class Constants {
+
+  public static String GEMFIRE_SESSION_REQUEST = "_gemfire_session_request_";
+
+  public static String SESSION_STATISTICS_MBEAN_NAME =
+      "com.gemstone:type=SessionStatistics,name=sessionStatistics";
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/DummySessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/DummySessionManager.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/DummySessionManager.java
new file mode 100644
index 0000000..9628912
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/DummySessionManager.java
@@ -0,0 +1,132 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.AbstractSessionAttributes;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Class which fakes an in-memory basic session manager for testing purposes.
+ */
+public class DummySessionManager implements SessionManager {
+
+  /**
+   * Map of sessions
+   */
+  private final Map<String, HttpSession> sessions =
+      new HashMap<String, HttpSession>();
+
+  private class Attributes extends AbstractSessionAttributes {
+
+    @Override
+    public Object putAttribute(String attr, Object value) {
+      return attributes.put(attr, value);
+    }
+
+    @Override
+    public Object removeAttribute(String attr) {
+      return attributes.remove(attr);
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void start(Object config, ClassLoader loader) {
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void stop() {
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public HttpSession getSession(String id) {
+    return sessions.get(id);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public HttpSession wrapSession(HttpSession nativeSession) {
+    String id = generateId();
+    AbstractSessionAttributes attributes = new Attributes();
+    GemfireHttpSession session = new GemfireHttpSession(id, nativeSession);
+    session.setManager(this);
+    session.setAttributes(attributes);
+    sessions.put(id, session);
+
+    return session;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public HttpSession getWrappingSession(String nativeId) {
+    return sessions.get(nativeId);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void putSession(HttpSession session) {
+    // shouldn't ever get called
+    throw new UnsupportedOperationException("Not supported yet.");
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void destroySession(String id) {
+    sessions.remove(id);
+  }
+
+  @Override
+  public String destroyNativeSession(String id) {
+    return null;
+  }
+
+  public String getSessionCookieName() {
+    return "JSESSIONID";
+  }
+
+  public String getJvmId() {
+    return "jvm-id";
+  }
+
+  /**
+   * Generate an ID string
+   */
+  private String generateId() {
+    return UUID.randomUUID().toString().toUpperCase() + "-GF";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireHttpSession.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireHttpSession.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireHttpSession.java
new file mode 100644
index 0000000..695a03b
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireHttpSession.java
@@ -0,0 +1,526 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Delta;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.InvalidDeltaException;
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.AbstractSessionAttributes;
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.SessionAttributes;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionContext;
+
+import com.gemstone.gemfire.modules.util.ClassLoaderObjectInputStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Class which implements a Gemfire persisted {@code HttpSession}
+ */
+public class GemfireHttpSession implements
+    HttpSession, DataSerializable, Delta {
+
+  private static transient final Logger LOG =
+      LoggerFactory.getLogger(GemfireHttpSession.class.getName());
+
+  /**
+   * Serial id
+   */
+  private static final long serialVersionUID = 238915238964017823L;
+
+  /**
+   * Id for the session
+   */
+  private String id;
+
+  /**
+   * Attributes really hold the essence of persistence.
+   */
+  private SessionAttributes attributes;
+
+  private transient SessionManager manager;
+
+  private HttpSession nativeSession = null;
+
+  /**
+   * A session becomes invalid if it is explicitly invalidated or if it
+   * expires.
+   */
+  private boolean isValid = true;
+
+  private boolean isNew = true;
+
+  private boolean isDirty = false;
+
+  /**
+   * This is set during serialization and then reset by the SessionManager when
+   * it is retrieved from the attributes.
+   */
+  private AtomicBoolean serialized = new AtomicBoolean(false);
+
+  /**
+   * Register ourselves for de-serialization
+   */
+  static {
+    Instantiator.register(new Instantiator(GemfireHttpSession.class, 27315) {
+      @Override
+      public DataSerializable newInstance() {
+        return new GemfireHttpSession();
+      }
+    });
+  }
+
+  /**
+   * Constructor used for de-serialization
+   */
+  private GemfireHttpSession() {
+  }
+
+  /**
+   * Constructor
+   */
+  public GemfireHttpSession(String id, HttpSession nativeSession) {
+    this();
+    this.id = id;
+    this.nativeSession = nativeSession;
+    if (nativeSession != null) {
+      attributes.setMaxInactiveInterval(nativeSession.getMaxInactiveInterval());
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Object getAttribute(String name) {
+    if (!isValid) {
+      throw new IllegalStateException("Session is already invalidated");
+    }
+    Object obj = attributes.getAttribute(name);
+
+    if (obj != null) {
+      Object tmpObj = null;
+      ClassLoader loader = ((GemfireSessionManager) manager).getReferenceClassLoader();
+
+      if (obj.getClass().getClassLoader() != loader) {
+        LOG.debug(
+            "Attribute '{}' needs to be reconstructed with a new classloader",
+            name);
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try {
+          ObjectOutputStream oos = new ObjectOutputStream(baos);
+          oos.writeObject(obj);
+          oos.close();
+
+          ObjectInputStream ois = new ClassLoaderObjectInputStream(
+              new ByteArrayInputStream(baos.toByteArray()),
+              loader);
+          tmpObj = ois.readObject();
+        } catch (IOException e) {
+          LOG.error("Exception while recreating attribute '" + name +
+              "'", e);
+        } catch (ClassNotFoundException e) {
+          LOG.error("Exception while recreating attribute '" + name +
+              "'", e);
+        }
+        if (tmpObj != null) {
+          setAttribute(name, tmpObj);
+          obj = tmpObj;
+        }
+      }
+    }
+
+    return obj;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Enumeration getAttributeNames() {
+    if (!isValid) {
+      throw new IllegalStateException("Session is already invalidated");
+    }
+    return Collections.enumeration(attributes.getAttributeNames());
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public long getCreationTime() {
+    if (nativeSession != null) {
+      return nativeSession.getCreationTime();
+    } else {
+      return 0;
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public long getLastAccessedTime() {
+    if (!isValid) {
+      throw new IllegalStateException("Session is already invalidated");
+    }
+    return attributes.getLastAccessedTime();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public ServletContext getServletContext() {
+    if (nativeSession != null) {
+      return nativeSession.getServletContext();
+    } else {
+      return null;
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public HttpSessionContext getSessionContext() {
+    return null;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Object getValue(String name) {
+    return getAttribute(name);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public String[] getValueNames() {
+    return attributes.getAttributeNames().toArray(new String[0]);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void invalidate() {
+    nativeSession.invalidate();
+    manager.destroySession(id);
+    isValid = false;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isNew() {
+    if (!isValid) {
+      throw new IllegalStateException("Session is already invalidated");
+    }
+    return isNew;
+  }
+
+  public void setIsNew(boolean isNew) {
+    this.isNew = isNew;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void setMaxInactiveInterval(int interval) {
+    if (nativeSession != null) {
+      nativeSession.setMaxInactiveInterval(interval);
+    }
+    attributes.setMaxInactiveInterval(interval);
+    isDirty = true;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public int getMaxInactiveInterval() {
+    if (nativeSession != null) {
+      return nativeSession.getMaxInactiveInterval();
+    } else {
+      return attributes.getMaxIntactiveInterval();
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void putValue(String name, Object value) {
+    setAttribute(name, value);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void removeAttribute(final String name) {
+    LOG.debug("Session {} removing attribute {}", getId(), name);
+    nativeSession.removeAttribute(name);
+    attributes.removeAttribute(name);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void removeValue(String name) {
+    removeAttribute(name);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void setAttribute(final String name, final Object value) {
+
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Session {} setting attribute {} = '{}'",
+          new Object[]{id, name, value});
+    }
+
+    isDirty = true;
+    nativeSession.setAttribute(name, value);
+    if (value == null) {
+      removeAttribute(name);
+    } else {
+      attributes.putAttribute(name, value);
+    }
+  }
+
+  /**
+   * Gemfire serialization {@inheritDoc}
+   */
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(id, out);
+    DataSerializer.writeObject(attributes, out);
+  }
+
+  /**
+   * Gemfire de-serialization {@inheritDoc}
+   */
+  @Override
+  public void fromData(DataInput in) throws IOException,
+      ClassNotFoundException {
+    id = DataSerializer.readString(in);
+    attributes = DataSerializer.readObject(in);
+    if (getNativeSession() != null) {
+      for (String s : attributes.getAttributeNames()) {
+        getNativeSession().setAttribute(s, attributes.getAttribute(s));
+      }
+    }
+
+    // Explicit sets
+    serialized.set(true);
+    attributes.setSession(this);
+  }
+
+  /**
+   * These three methods handle delta propagation and are deferred to the
+   * attribute object.
+   */
+  @Override
+  public boolean hasDelta() {
+    return isDirty;
+  }
+
+  @Override
+  public void toDelta(DataOutput out) throws IOException {
+    if (attributes instanceof Delta) {
+      ((Delta) attributes).toDelta(out);
+    } else {
+      toData(out);
+    }
+  }
+
+  @Override
+  public void fromDelta(DataInput in) throws IOException,
+      InvalidDeltaException {
+    if (attributes instanceof Delta) {
+      ((Delta) attributes).fromDelta(in);
+    } else {
+      try {
+        fromData(in);
+      } catch (ClassNotFoundException cex) {
+        throw new IOException("Unable to forward fromDelta() call "
+            + "to fromData()", cex);
+      }
+    }
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder builder = new StringBuilder();
+    builder.append("[id=").append(id)
+        .append(", isNew=").append(isNew)
+        .append(", isValid=").append(isValid)
+        .append(", hasDelta=").append(hasDelta())
+        .append(", lastAccessedTime=").append(attributes.getLastAccessedTime())
+        .append(", jvmOwnerId=").append(attributes.getJvmOwnerId());
+    builder.append("]");
+    return builder.toString();
+  }
+
+  /**
+   * Flush the session object to the region
+   */
+  public void putInRegion() {
+
+    manager.putSession(this);
+    isDirty = false;
+  }
+
+  /**
+   * Determine whether the session is still valid or whether it has expired.
+   *
+   * @return true or false
+   */
+  public boolean isValid() {
+    if (!isValid) {
+      return false;
+    }
+    if (getMaxInactiveInterval() >= 0) {
+      long now = System.currentTimeMillis();
+      if (now - attributes.getLastAccessedTime() >= getMaxInactiveInterval() * 1000) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Is this session dirty and should it be written to cache
+   */
+  public boolean isDirty() {
+    return isDirty;
+  }
+
+  public void setManager(SessionManager manager) {
+    this.manager = manager;
+  }
+
+  /**
+   * For testing allow retrieval of the wrapped, native session.
+   */
+  public HttpSession getNativeSession() {
+    return nativeSession;
+  }
+
+
+  public void setNativeSession(HttpSession session) {
+    this.nativeSession = session;
+  }
+
+  /**
+   * Handle the process of failing over the session to a new native session
+   * object.
+   *
+   * @param session
+   */
+  public void failoverSession(HttpSession session) {
+    LOG.debug("Failing over session {} to {}", getId(), session.getId());
+    setNativeSession(session);
+    for (String name : attributes.getAttributeNames()) {
+      LOG.debug("Copying '{}' => {}", name, attributes.getAttribute(name));
+      session.setAttribute(name, attributes.getAttribute(name));
+    }
+    session.setMaxInactiveInterval(attributes.getMaxIntactiveInterval());
+    manager.putSession(this);
+  }
+
+
+  /**
+   * Update the last accessed time
+   */
+  public void updateAccessTime() {
+    attributes.setLastAccessedTime(System.currentTimeMillis());
+  }
+
+  /**
+   * The {@code SessionManager} injects this when creating a new session.
+   *
+   * @param attributes
+   */
+  public void setAttributes(AbstractSessionAttributes attributes) {
+    this.attributes = attributes;
+  }
+
+  /**
+   * This is called on deserialization. You can only call it once to get a
+   * meaningful value as it resets the serialized state. In other words, this
+   * call is not idempotent.
+   *
+   * @return whether this object has just been serialized
+   */
+  public boolean justSerialized() {
+    return serialized.getAndSet(false);
+  }
+
+  /**
+   * Called when the session is about to go out of scope. If the session has
+   * been defined to use async queued attributes then they will be written out
+   * at this point.
+   */
+  public void commit() {
+    attributes.setJvmOwnerId(manager.getJvmId());
+    attributes.flush();
+  }
+
+  public String getJvmOwnerId() {
+    if (attributes != null) {
+      return attributes.getJvmOwnerId();
+    }
+
+    return null;
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java
new file mode 100644
index 0000000..3ce81be
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java
@@ -0,0 +1,41 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+/**
+ * Exception class for Gemfire Session Cache specific exceptions.
+ */
+public class GemfireSessionException extends Exception {
+
+  public GemfireSessionException() {
+    super();
+  }
+
+  public GemfireSessionException(String message) {
+    super(message);
+  }
+
+  public GemfireSessionException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  public GemfireSessionException(Throwable cause) {
+    super(cause);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
new file mode 100644
index 0000000..a3d3c10
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
@@ -0,0 +1,511 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.control.ResourceManager;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.modules.session.bootstrap.AbstractCache;
+import com.gemstone.gemfire.modules.session.bootstrap.ClientServerCache;
+import com.gemstone.gemfire.modules.session.bootstrap.LifecycleTypeAdapter;
+import com.gemstone.gemfire.modules.session.bootstrap.PeerToPeerCache;
+import com.gemstone.gemfire.modules.session.internal.common.CacheProperty;
+import com.gemstone.gemfire.modules.session.internal.common.ClientServerSessionCache;
+import com.gemstone.gemfire.modules.session.internal.common.PeerToPeerSessionCache;
+import com.gemstone.gemfire.modules.session.internal.common.SessionCache;
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.AbstractSessionAttributes;
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.DeltaQueuedSessionAttributes;
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.DeltaSessionAttributes;
+import com.gemstone.gemfire.modules.session.internal.filter.attributes.ImmediateSessionAttributes;
+import com.gemstone.gemfire.modules.session.internal.filter.util.TypeAwareMap;
+import com.gemstone.gemfire.modules.session.internal.jmx.SessionStatistics;
+import com.gemstone.gemfire.modules.util.RegionHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.servlet.FilterConfig;
+import javax.servlet.http.HttpSession;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * This class implements the session management using a Gemfire distributedCache
+ * as a persistent store for the session objects
+ */
+public class GemfireSessionManager implements SessionManager {
+
+  private final Logger LOG;
+
+  /**
+   * Prefix of init param string used to set gemfire properties
+   */
+  private static final String GEMFIRE_PROPERTY = "gemfire.property.";
+
+  /**
+   * Prefix of init param string used to set gemfire distributedCache setting
+   */
+  private static final String GEMFIRE_CACHE = "gemfire.cache.";
+
+  private static final String INIT_PARAM_CACHE_TYPE = "cache-type";
+  private static final String CACHE_TYPE_CLIENT_SERVER = "client-server";
+  private static final String CACHE_TYPE_PEER_TO_PEER = "peer-to-peer";
+  private static final String INIT_PARAM_SESSION_COOKIE_NAME = "session-cookie-name";
+  private static final String INIT_PARAM_JVM_ID = "jvm-id";
+  private static final String DEFAULT_JVM_ID = "default";
+
+  private SessionCache sessionCache = null;
+
+  /**
+   * Reference to the distributed system
+   */
+  private AbstractCache distributedCache = null;
+
+  /**
+   * Boolean indicating whether the manager is shutting down
+   */
+  private boolean isStopping = false;
+
+  /**
+   * Boolean indicating whether this manager is defined in the same context (war
+   * / classloader) as the filter.
+   */
+  private boolean isolated = false;
+
+  /**
+   * Map of wrapping GemFire session id to native session id
+   */
+  private Map<String, String> nativeSessionMap =
+      new HashMap<String, String>();
+
+  /**
+   * MBean for statistics
+   */
+  private SessionStatistics mbean;
+
+  /**
+   * This CL is used to compare against the class loader of attributes getting
+   * pulled out of the cache. This variable should be set to the CL of the
+   * filter running everything.
+   */
+  private ClassLoader referenceClassLoader;
+
+  private String sessionCookieName = "JSESSIONID";
+
+  /**
+   * Give this JVM a unique identifier.
+   */
+  private String jvmId = "default";
+
+  /**
+   * Set up properties with default values
+   */
+  private TypeAwareMap<CacheProperty, Object> properties =
+      new TypeAwareMap<CacheProperty, Object>(CacheProperty.class) {{
+        put(CacheProperty.REGION_NAME, RegionHelper.NAME + "_sessions");
+        put(CacheProperty.ENABLE_GATEWAY_DELTA_REPLICATION, Boolean.FALSE);
+        put(CacheProperty.ENABLE_GATEWAY_REPLICATION, Boolean.FALSE);
+        put(CacheProperty.ENABLE_DEBUG_LISTENER, Boolean.FALSE);
+        put(CacheProperty.STATISTICS_NAME, "gemfire_statistics");
+        put(CacheProperty.SESSION_DELTA_POLICY, "delta_queued");
+        put(CacheProperty.REPLICATION_TRIGGER, "set");
+        /**
+         * For REGION_ATTRIBUTES_ID and ENABLE_LOCAL_CACHE the default
+         * is different for ClientServerCache and PeerToPeerCache
+         * so those values are set in the relevant constructors when
+         * these properties are passed in to them.
+         */
+      }};
+
+  public GemfireSessionManager() {
+    LOG = LoggerFactory.getLogger(GemfireSessionManager.class.getName());
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void start(Object conf, ClassLoader loader) {
+    this.referenceClassLoader = loader;
+    FilterConfig config = (FilterConfig) conf;
+
+    startDistributedSystem(config);
+    initializeSessionCache(config);
+
+    // Register MBean
+    registerMBean();
+
+    if (distributedCache.getClass().getClassLoader() == loader) {
+      isolated = true;
+    }
+
+    String sessionCookieName = config.getInitParameter(
+        INIT_PARAM_SESSION_COOKIE_NAME);
+    if (sessionCookieName != null && !sessionCookieName.isEmpty()) {
+      this.sessionCookieName = sessionCookieName;
+      LOG.info("Session cookie name set to: {}", this.sessionCookieName);
+    }
+
+    jvmId = config.getInitParameter(INIT_PARAM_JVM_ID);
+    if (jvmId == null || jvmId.isEmpty()) {
+      jvmId = DEFAULT_JVM_ID;
+    }
+
+    LOG.info("Started GemfireSessionManager (isolated={}, jvmId={})",
+        isolated, jvmId);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void stop() {
+    isStopping = true;
+
+    if (isolated) {
+      if (distributedCache != null) {
+        LOG.info("Closing distributed cache - assuming isolated cache");
+        distributedCache.close();
+      }
+    } else {
+      LOG.info("Not closing distributed cache - assuming common cache");
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public HttpSession getSession(String id) {
+    GemfireHttpSession session = (GemfireHttpSession) sessionCache.getOperatingRegion().get(
+        id);
+
+    if (session != null) {
+      if (session.justSerialized()) {
+        session.setManager(this);
+        LOG.debug("Recovered serialized session {} (jvmId={})", id,
+            session.getJvmOwnerId());
+      }
+      LOG.debug("Retrieved session id {}", id);
+    } else {
+      LOG.debug("Session id {} not found", id);
+    }
+    return session;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public HttpSession wrapSession(HttpSession nativeSession) {
+    String id = generateId();
+    GemfireHttpSession session =
+        new GemfireHttpSession(id, nativeSession);
+
+    /**
+     * Set up the attribute container depending on how things are configured
+     */
+    AbstractSessionAttributes attributes;
+    if ("delta_queued".equals(
+        properties.get(CacheProperty.SESSION_DELTA_POLICY))) {
+      attributes = new DeltaQueuedSessionAttributes();
+      ((DeltaQueuedSessionAttributes) attributes).setReplicationTrigger(
+          (String) properties.get(CacheProperty.REPLICATION_TRIGGER));
+    } else if ("delta_immediate".equals(
+        properties.get(CacheProperty.SESSION_DELTA_POLICY))) {
+      attributes = new DeltaSessionAttributes();
+    } else if ("immediate".equals(
+        properties.get(CacheProperty.SESSION_DELTA_POLICY))) {
+      attributes = new ImmediateSessionAttributes();
+    } else {
+      attributes = new DeltaSessionAttributes();
+      LOG.warn(
+          "No session delta policy specified - using default of 'delta_immediate'");
+    }
+
+    attributes.setSession(session);
+    attributes.setJvmOwnerId(jvmId);
+
+    session.setManager(this);
+    session.setAttributes(attributes);
+
+    LOG.debug("Creating new session {}", id);
+    sessionCache.getOperatingRegion().put(id, session);
+
+    mbean.incActiveSessions();
+
+    return session;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  public HttpSession getWrappingSession(String nativeId) {
+    HttpSession session = null;
+    String gemfireId = getGemfireSessionIdFromNativeId(nativeId);
+
+    if (gemfireId != null) {
+      session = getSession(gemfireId);
+    }
+    return session;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void destroySession(String id) {
+    if (!isStopping) {
+      try {
+        GemfireHttpSession session = (GemfireHttpSession) sessionCache.getOperatingRegion().get(
+            id);
+        if (session != null && session.getJvmOwnerId().equals(jvmId)) {
+          LOG.debug("Destroying session {}", id);
+          sessionCache.getOperatingRegion().destroy(id);
+          mbean.decActiveSessions();
+        }
+      } catch (EntryNotFoundException nex) {
+      }
+    } else {
+      if (sessionCache.isClientServer()) {
+        LOG.debug("Destroying session {}", id);
+        try {
+          sessionCache.getOperatingRegion().localDestroy(id);
+        } catch (EntryNotFoundException nex) {
+          // Ignored
+        } catch (CacheClosedException ccex) {
+          // Ignored
+        }
+      } else {
+        GemfireHttpSession session = (GemfireHttpSession) sessionCache.getOperatingRegion().get(
+            id);
+        if (session != null) {
+          session.setNativeSession(null);
+        }
+      }
+    }
+
+    synchronized (nativeSessionMap) {
+      String nativeId = nativeSessionMap.remove(id);
+      LOG.debug("destroySession called for {} wrapping {}", id, nativeId);
+    }
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void putSession(HttpSession session) {
+    sessionCache.getOperatingRegion().put(session.getId(), session);
+    mbean.incRegionUpdates();
+    nativeSessionMap.put(session.getId(),
+        ((GemfireHttpSession) session).getNativeSession().getId());
+  }
+
+  @Override
+  public String destroyNativeSession(String nativeId) {
+    String gemfireSessionId = getGemfireSessionIdFromNativeId(nativeId);
+    if (gemfireSessionId != null) {
+      destroySession(gemfireSessionId);
+    }
+    return gemfireSessionId;
+  }
+
+  public ClassLoader getReferenceClassLoader() {
+    return referenceClassLoader;
+  }
+
+  /**
+   * This method is called when a native session gets destroyed. It will check
+   * if the GemFire session is actually still valid/not expired and will then
+   * attach a new, native session.
+   *
+   * @param nativeId the id of the native session
+   * @return the id of the newly attached native session or null if the GemFire
+   * session was already invalid
+   */
+  public String refreshSession(String nativeId) {
+    String gemfireId = getGemfireSessionIdFromNativeId(nativeId);
+    if (gemfireId == null) {
+      return null;
+    }
+
+    GemfireHttpSession session = (GemfireHttpSession) sessionCache.getOperatingRegion().get(
+        gemfireId);
+    if (session.isValid()) {
+
+    }
+
+    return null;
+  }
+
+  public String getSessionCookieName() {
+    return sessionCookieName;
+  }
+
+  public String getJvmId() {
+    return jvmId;
+  }
+
+
+  ///////////////////////////////////////////////////////////////////////
+  // Private methods
+
+  private String getGemfireSessionIdFromNativeId(String nativeId) {
+    if (nativeId == null) {
+      return null;
+    }
+
+    for (Map.Entry<String, String> e : nativeSessionMap.entrySet()) {
+      if (nativeId.equals(e.getValue())) {
+        return e.getKey();
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Start the underlying distributed system
+   *
+   * @param config
+   */
+  private void startDistributedSystem(FilterConfig config) {
+    // Get the distributedCache type
+    final String cacheType = config.getInitParameter(INIT_PARAM_CACHE_TYPE);
+    if (CACHE_TYPE_CLIENT_SERVER.equals(cacheType)) {
+      distributedCache = ClientServerCache.getInstance();
+    } else if (CACHE_TYPE_PEER_TO_PEER.equals(cacheType)) {
+      distributedCache = PeerToPeerCache.getInstance();
+    } else {
+      LOG.error("No 'cache-type' initialization param set. "
+          + "Cache will not be started");
+      return;
+    }
+
+    if (!distributedCache.isStarted()) {
+      /**
+       * Process all the init params and see if any apply to the
+       * distributed system.
+       */
+      for (Enumeration<String> e = config.getInitParameterNames(); e.hasMoreElements(); ) {
+        String param = e.nextElement();
+        if (!param.startsWith(GEMFIRE_PROPERTY)) {
+          continue;
+        }
+
+        String gemfireProperty = param.substring(GEMFIRE_PROPERTY.length());
+        LOG.info("Setting gemfire property: {} = {}",
+            gemfireProperty, config.getInitParameter(param));
+        distributedCache.setProperty(gemfireProperty,
+            config.getInitParameter(param));
+      }
+
+      distributedCache.lifecycleEvent(LifecycleTypeAdapter.START);
+    }
+  }
+
+  /**
+   * Initialize the distributedCache
+   */
+  private void initializeSessionCache(FilterConfig config) {
+    // Retrieve the distributedCache
+    GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.getAnyInstance();
+    if (cache == null) {
+      throw new IllegalStateException("No cache exists. Please configure "
+          + "either a PeerToPeerCacheLifecycleListener or "
+          + "ClientServerCacheLifecycleListener in the "
+          + "server.xml file.");
+    }
+
+    /**
+     * Process all the init params and see if any apply to the distributedCache
+     */
+    ResourceManager rm = cache.getResourceManager();
+    for (Enumeration<String> e = config.getInitParameterNames(); e.hasMoreElements(); ) {
+      String param = e.nextElement();
+
+      // Uggh - don't like this non-generic stuff
+      if (param.equalsIgnoreCase("criticalHeapPercentage")) {
+        float val = Float.parseFloat(config.getInitParameter(param));
+        rm.setCriticalHeapPercentage(val);
+      }
+
+      if (param.equalsIgnoreCase("evictionHeapPercentage")) {
+        float val = Float.parseFloat(config.getInitParameter(param));
+        rm.setEvictionHeapPercentage(val);
+      }
+
+
+      if (!param.startsWith(GEMFIRE_CACHE)) {
+        continue;
+      }
+
+      String gemfireWebParam = param.substring(GEMFIRE_CACHE.length());
+      LOG.info("Setting cache parameter: {} = {}",
+          gemfireWebParam, config.getInitParameter(param));
+      properties.put(CacheProperty.valueOf(gemfireWebParam.toUpperCase()),
+          config.getInitParameter(param));
+    }
+
+    // Create the appropriate session distributedCache
+    sessionCache = cache.isClient()
+        ? new ClientServerSessionCache(cache, properties)
+        : new PeerToPeerSessionCache(cache, properties);
+
+    // Initialize the session distributedCache
+    sessionCache.initialize();
+  }
+
+  /**
+   * Register a bean for statistic gathering purposes
+   */
+  private void registerMBean() {
+    mbean = new SessionStatistics();
+
+    try {
+      InitialContext ctx = new InitialContext();
+      MBeanServer mbs = MBeanServer.class.cast(
+          ctx.lookup("java:comp/env/jmx/runtime"));
+      ObjectName oname = new ObjectName(
+          Constants.SESSION_STATISTICS_MBEAN_NAME);
+
+      mbs.registerMBean(mbean, oname);
+    } catch (Exception ex) {
+      LOG.warn("Unable to register statistics MBean. Error: {}",
+          ex.getMessage());
+    }
+  }
+
+
+  /**
+   * Generate an ID string
+   */
+  private String generateId() {
+    return UUID.randomUUID().toString().toUpperCase() + "-GF";
+  }
+
+  AbstractCache getCache() {
+    return distributedCache;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/ListenerEventType.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/ListenerEventType.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/ListenerEventType.java
new file mode 100644
index 0000000..b040dda
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/ListenerEventType.java
@@ -0,0 +1,75 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+/**
+ * Enumeration of all possible event types which can be listened for.
+ */
+public enum ListenerEventType {
+
+  /**
+   * HttpSessionAttributeListener
+   */
+  SESSION_ATTRIBUTE_ADDED,
+  SESSION_ATTRIBUTE_REMOVED,
+  SESSION_ATTRIBUTE_REPLACED,
+
+  /**
+   * HttpSessionBindingListener
+   */
+  SESSION_VALUE_BOUND,
+  SESSION_VALUE_UNBOUND,
+
+  /**
+   * HttpSessionListener
+   */
+  SESSION_CREATED,
+  SESSION_DESTROYED,
+
+  /**
+   * HttpSessionActivationListener
+   */
+  SESSION_WILL_ACTIVATE,
+  SESSION_DID_PASSIVATE,
+
+  /**
+   * ServletContextListener
+   */
+  SERVLET_CONTEXT_INITIALIZED,
+  SERVLET_CONTEXT_DESTROYED,
+
+  /**
+   * ServletContextAttributeListener
+   */
+  SERVLET_CONTEXT_ATTRIBUTE_ADDED,
+  SERVLET_CONTEXT_ATTRIBUTE_REMOVED,
+  SERVLET_CONTEXT_ATTRIBUTE_REPLACED,
+
+  /**
+   * ServletRequestListener
+   */
+  SERVLET_REQUEST_DESTROYED,
+  SERVLET_REQUEST_INITIALIZED,
+
+  /**
+   * ServletRequestAttributeListener
+   */
+  SERVLET_REQUEST_ATTRIBUTE_ADDED,
+  SERVLET_REQUEST_ATTRIBUTE_REMOVED,
+  SERVLET_REQUEST_ATTRIBUTE_REPLACED;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/SessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/SessionManager.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/SessionManager.java
new file mode 100644
index 0000000..9d8996c
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/SessionManager.java
@@ -0,0 +1,110 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import javax.servlet.http.HttpSession;
+
+/**
+ * Interface to session management. This class would be responsible for creating
+ * new sessions.
+ */
+public interface SessionManager {
+
+  /**
+   * Start the manager possibly using the config passed in.
+   *
+   * @param config Config object specific to individual implementations.
+   * @param loader This is a hack. When the manager is started it wants to be
+   *               able to determine if the cache, which it would create, and
+   *               the filter which starts everything, are defined by the same
+   *               classloader. This is so that during shutdown, the manager can
+   *               decide whether or not to also stop the cache. This option
+   *               allows the filter's classloader to be passed in.
+   */
+  public void start(Object config, ClassLoader loader);
+
+  /**
+   * Stop the session manager and free up any resources.
+   */
+  public void stop();
+
+  /**
+   * Write the session to the region
+   *
+   * @param session the session to write
+   */
+  public void putSession(HttpSession session);
+
+  /**
+   * Return a session if it exists or null otherwise
+   *
+   * @param id The session id to attempt to retrieve
+   * @return a HttpSession object if a session was found otherwise null.
+   */
+  public HttpSession getSession(String id);
+
+  /**
+   * Create a new session, wrapping a container session.
+   *
+   * @param nativeSession
+   * @return the HttpSession object
+   */
+  public HttpSession wrapSession(HttpSession nativeSession);
+
+  /**
+   * Get the wrapped (GemFire) session from a native session id. This method
+   * would typically be used from within session/http event listeners which
+   * receive the original session id.
+   *
+   * @param nativeId
+   * @return the wrapped GemFire session which maps the native session
+   */
+  public HttpSession getWrappingSession(String nativeId);
+
+  /**
+   * Destroy the session associated with the given id.
+   *
+   * @param id The id of the session to destroy.
+   */
+  public void destroySession(String id);
+
+  /**
+   * Destroy the session associated with a given native session
+   *
+   * @param id the id of the native session
+   * @return the corresponding Gemfire session which wrapped the native session
+   * and was destroyed.
+   */
+  public String destroyNativeSession(String id);
+
+  /**
+   * Returns the cookie name used to hold the session id. By default this is
+   * JSESSIONID.
+   *
+   * @return the name of the cookie which contains the session id
+   */
+  public String getSessionCookieName();
+
+  /**
+   * Get the JVM Id - this is a unique string used internally to identify who
+   * last touched a session.
+   *
+   * @return the jvm id
+   */
+  public String getJvmId();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java
new file mode 100644
index 0000000..f46495d
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java
@@ -0,0 +1,107 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Delta;
+import com.gemstone.gemfire.InvalidDeltaException;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This abstract class contains the structures and methods to handle delta
+ * updates to attributes.
+ */
+public abstract class AbstractDeltaSessionAttributes
+    extends AbstractSessionAttributes implements Delta {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(AbstractDeltaSessionAttributes.class.getName());
+
+  /**
+   * This map holds the updates to attributes
+   */
+  protected transient Map<String, DeltaEvent> deltas =
+      Collections.synchronizedMap(new HashMap<String, DeltaEvent>());
+
+  @Override
+  public boolean hasDelta() {
+    return true;
+  }
+
+  @Override
+  public void toDelta(DataOutput out) throws IOException {
+    out.writeInt(maxInactiveInterval);
+    out.writeLong(lastAccessedTime);
+
+    synchronized (deltas) {
+      DataSerializer.writeInteger(deltas.size(), out);
+      for (Map.Entry<String, DeltaEvent> e : deltas.entrySet()) {
+        DataSerializer.writeString(e.getKey(), out);
+        DataSerializer.writeObject(e.getValue(), out);
+      }
+      deltas.clear();
+    }
+
+    out.writeUTF(jvmOwnerId);
+  }
+
+  @Override
+  public void fromDelta(DataInput in)
+      throws IOException, InvalidDeltaException {
+    maxInactiveInterval = in.readInt();
+    lastAccessedTime = in.readLong();
+    Map<String, DeltaEvent> localDeltas = new HashMap<String, DeltaEvent>();
+    try {
+      int size = DataSerializer.readInteger(in);
+      for (int i = 0; i < size; i++) {
+        String key = DataSerializer.readString(in);
+        DeltaEvent evt = DataSerializer.readObject(in);
+        localDeltas.put(key, evt);
+      }
+    } catch (ClassNotFoundException ex) {
+      LOG.error("Unable to de-serialize delta events", ex);
+      return;
+    }
+
+    LOG.debug("Processing {} delta events for {}",
+        localDeltas.size(), session);
+    for (DeltaEvent e : localDeltas.values()) {
+      if (e.isUpdate()) {
+        attributes.put(e.getName(), e.getValue());
+        if (session.getNativeSession() != null) {
+          session.getNativeSession().setAttribute(e.getName(), e.getValue());
+        }
+      } else {
+        attributes.remove(e.getName());
+        if (session.getNativeSession() != null) {
+          session.getNativeSession().setAttribute(e.getName(), null);
+        }
+      }
+    }
+    jvmOwnerId = in.readUTF();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java
new file mode 100644
index 0000000..c4af041
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java
@@ -0,0 +1,188 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.internal.util.BlobHelper;
+import com.gemstone.gemfire.modules.session.internal.filter.GemfireHttpSession;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Abstract implementation for attributes. Should be sub-classed to provide
+ * differing implementations for synchronous or delta propagation. The backing
+ * store used is defined by the session manager.
+ */
+public abstract class AbstractSessionAttributes implements SessionAttributes {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(AbstractSessionAttributes.class.getName());
+
+  /**
+   * Internal attribute store.
+   */
+  protected Map<String, Object> attributes =
+      Collections.synchronizedMap(new HashMap<String, Object>());
+
+  /**
+   * The session to which these attributes belong
+   */
+  protected transient GemfireHttpSession session;
+
+  /**
+   * The last accessed time
+   */
+  protected long lastAccessedTime;
+
+  /**
+   * The maximum inactive interval. Default is 1800 seconds.
+   */
+  protected int maxInactiveInterval = 60 * 30;
+
+  /**
+   * The JVM Id who last committed these attributes
+   */
+  protected String jvmOwnerId;
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void setSession(GemfireHttpSession session) {
+    this.session = session;
+  }
+
+  /**
+   * {@inheritDoc} The actual de-serialization of any domain objects is deferred
+   * until the point at which they are actually retrieved by the application
+   * layer.
+   */
+  @Override
+  public Object getAttribute(String name) {
+    Object value = attributes.get(name);
+
+    // If the value is a byte[] (meaning it came from the server),
+    // deserialize it and re-add it to attributes map before returning it.
+    if (value instanceof byte[]) {
+      try {
+        value = BlobHelper.deserializeBlob((byte[]) value);
+        attributes.put(name, value);
+      } catch (Exception iox) {
+        LOG.error("Attribute '" + name +
+            " contains a byte[] that cannot be deserialized due "
+            + "to the following exception", iox);
+      }
+    }
+
+    return value;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Set<String> getAttributeNames() {
+    return attributes.keySet();
+  }
+
+  /**
+   * {@inheritDoc} +
+   */
+  @Override
+  public void setMaxInactiveInterval(int interval) {
+    maxInactiveInterval = interval;
+  }
+
+  @Override
+  public int getMaxIntactiveInterval() {
+    return maxInactiveInterval;
+  }
+
+  @Override
+  public void setLastAccessedTime(long time) {
+    lastAccessedTime = time;
+  }
+
+  @Override
+  public long getLastAccessedTime() {
+    return lastAccessedTime;
+  }
+
+  /**
+   * {@inheritDoc} This method calls back into the session to flush the whole
+   * session including its attributes.
+   */
+  @Override
+  public void flush() {
+    session.putInRegion();
+  }
+
+  /**
+   * Use DeltaEvents to propagate the actual attribute data - DeltaEvents turn
+   * the values into byte arrays which means that the actual domain classes are
+   * not required on the server.
+   */
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    out.writeInt(maxInactiveInterval);
+    out.writeLong(lastAccessedTime);
+
+    synchronized (attributes) {
+      out.writeInt(attributes.size());
+      for (Map.Entry<String, Object> entry : attributes.entrySet()) {
+        DeltaEvent delta = new DeltaEvent(true, entry.getKey(),
+            entry.getValue());
+        DataSerializer.writeObject(delta, out);
+      }
+    }
+
+    out.writeUTF(jvmOwnerId);
+  }
+
+  @Override
+  public void fromData(
+      DataInput in) throws IOException, ClassNotFoundException {
+    maxInactiveInterval = in.readInt();
+    lastAccessedTime = in.readLong();
+    int size = in.readInt();
+    while (size-- > 0) {
+      DeltaEvent event = DataSerializer.readObject(in);
+      attributes.put(event.getName(), event.getValue());
+    }
+    jvmOwnerId = in.readUTF();
+  }
+
+  @Override
+  public void setJvmOwnerId(String jvmId) {
+    this.jvmOwnerId = jvmId;
+  }
+
+  @Override
+  public String getJvmOwnerId() {
+    return jvmOwnerId;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaEvent.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaEvent.java
new file mode 100644
index 0000000..4c248dd
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaEvent.java
@@ -0,0 +1,119 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.internal.util.BlobHelper;
+import com.gemstone.gemfire.modules.session.internal.filter.GemfireHttpSession;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * Capture the update to a particular name
+ */
+public class DeltaEvent implements DataSerializable {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(DeltaEvent.class.getName());
+  /**
+   * The event is either an update (true) or a remove (false)
+   */
+  private boolean update;
+
+  private String name;
+
+  private Object value = null;
+
+  private GemfireHttpSession session = null;
+
+  /**
+   * Constructor for de-serialization only
+   */
+  public DeltaEvent() {
+  }
+
+  /**
+   * Constructor which creates a 'deferred' event. This is used when the value
+   * should only be applied when the object is serialized.
+   *
+   * @param session   the session from which the value ultimately will be
+   *                  retrieved
+   * @param attribute the name of the attribute
+   */
+  public DeltaEvent(GemfireHttpSession session, String attribute) {
+    this.session = session;
+    this.name = attribute;
+    this.update = true;
+  }
+
+  public DeltaEvent(boolean update, String attribute, Object value) {
+    this.update = update;
+    this.name = attribute;
+    this.value = value;
+    blobifyValue();
+  }
+
+  private void blobifyValue() {
+    if (value instanceof byte[]) {
+      LOG.warn("Session attribute is already a byte[] - problems may "
+          + "occur transmitting this delta.");
+    }
+    try {
+      value = BlobHelper.serializeToBlob(value);
+    } catch (IOException iox) {
+      LOG.error("Attribute '" + name + "' value: " + value
+          + " cannot be serialized due to the following exception", iox);
+    }
+  }
+
+  public boolean isUpdate() {
+    return update;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public Object getValue() {
+    return value;
+  }
+
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    if (session != null) {
+      value = session.getNativeSession().getAttribute(name);
+      blobifyValue();
+    }
+    out.writeBoolean(update);
+    DataSerializer.writeString(name, out);
+    DataSerializer.writeObject(value, out);
+  }
+
+  @Override
+  public void fromData(
+      DataInput in) throws IOException, ClassNotFoundException {
+    update = in.readBoolean();
+    name = DataSerializer.readString(in);
+    value = DataSerializer.readObject(in);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java
new file mode 100644
index 0000000..cb4f673
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java
@@ -0,0 +1,94 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.Instantiator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class implements delayed attribute delta propagation. Updates to
+ * attributes are only propagated once the session goes out of scope - i.e. as
+ * the request is done being processed.
+ */
+public class DeltaQueuedSessionAttributes extends AbstractDeltaSessionAttributes {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(DeltaQueuedSessionAttributes.class.getName());
+
+  private Trigger trigger = Trigger.SET;
+
+  private enum Trigger {
+    SET,
+    SET_AND_GET;
+  }
+
+  /**
+   * Register ourselves for de-serialization
+   */
+  static {
+    Instantiator.register(
+        new Instantiator(DeltaQueuedSessionAttributes.class, 3479) {
+          @Override
+          public DataSerializable newInstance() {
+            return new DeltaQueuedSessionAttributes();
+          }
+        });
+  }
+
+  /**
+   * Default constructor
+   */
+  public DeltaQueuedSessionAttributes() {
+  }
+
+  public void setReplicationTrigger(String trigger) {
+    this.trigger = Trigger.valueOf(trigger.toUpperCase());
+  }
+
+  @Override
+  public Object getAttribute(String attr) {
+    if (trigger == Trigger.SET_AND_GET) {
+      deltas.put(attr, new DeltaEvent(session, attr));
+    }
+    return super.getAttribute(attr);
+  }
+
+  /**
+   * {@inheritDoc} Put an attribute, setting the dirty flag. The changes are
+   * flushed at the end of filter processing.
+   */
+  @Override
+  public Object putAttribute(String attr, Object value) {
+    Object obj = attributes.put(attr, value);
+    deltas.put(attr, new DeltaEvent(true, attr, value));
+    return obj;
+  }
+
+  /**
+   * {@inheritDoc} Remove an attribute, setting the dirty flag. The changes are
+   * flushed at the end of filter processing.
+   */
+  @Override
+  public Object removeAttribute(String attr) {
+    Object obj = attributes.remove(attr);
+    deltas.put(attr, new DeltaEvent(false, attr, null));
+    return obj;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaSessionAttributes.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaSessionAttributes.java b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaSessionAttributes.java
new file mode 100644
index 0000000..8cc9866
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/DeltaSessionAttributes.java
@@ -0,0 +1,75 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter.attributes;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.Instantiator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class implements synchronous attribute delta propagation. Updates to
+ * attributes are immediately propagated.
+ */
+public class DeltaSessionAttributes extends AbstractDeltaSessionAttributes {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(DeltaSessionAttributes.class.getName());
+
+  /**
+   * Register ourselves for de-serialization
+   */
+  static {
+    Instantiator.register(new Instantiator(DeltaSessionAttributes.class, 347) {
+      @Override
+      public DataSerializable newInstance() {
+        return new DeltaSessionAttributes();
+      }
+    });
+  }
+
+  /**
+   * Default constructor
+   */
+  public DeltaSessionAttributes() {
+  }
+
+  /**
+   * {@inheritDoc} Put an attribute, setting the dirty flag and immediately
+   * flushing the delta queue.
+   */
+  @Override
+  public Object putAttribute(String attr, Object value) {
+    Object obj = attributes.put(attr, value);
+    deltas.put(attr, new DeltaEvent(true, attr, value));
+    flush();
+    return obj;
+  }
+
+  /**
+   * {@inheritDoc} Remove an attribute, setting the dirty flag and immediately
+   * flushing the delta queue.
+   */
+  @Override
+  public Object removeAttribute(String attr) {
+    Object obj = attributes.remove(attr);
+    deltas.put(attr, new DeltaEvent(false, attr, null));
+    flush();
+    return obj;
+  }
+}



[30/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt
deleted file mode 100755
index 8253152..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_Modules_7.0.Beta.txt
+++ /dev/null
@@ -1,471 +0,0 @@
-open_source_license.txt
-
-VMware vFabric GemFire HTTP Session Management Module 7.0 Beta
-	
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software components (or portions thereof) that are distributed with
-this VMware software products.
-
-The VMware Product may also include other VMware components, which may contain additional open 
-source software packages. One or more such open_source_licenses.txt files may therefore 
-accompany this VMware Product. 
-
-The VMware product that includes this file does not necessarily use all the
-open source software components referred to below and may also only use
-portions of a given component.
-
-
-=============== TABLE OF CONTENTS =============================
-
-
-The following is a listing of the open source components detailed in this
-document.  This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Common Development and Distribution License, V1.0
-
-
-
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 is applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------- SECTION 1: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America. All such
-requests should clearly specify: OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium. This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively,
-the Source Files may accompany the VMware product.
-
-
-[GFEHTTPMODULE70BKR100512]
\ No newline at end of file


[27/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt
new file mode 100755
index 0000000..82db8ad
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt
@@ -0,0 +1,1316 @@
+open_source_licenses.txt
+
+vFabric GemFire HTTP Session Management Module 2.0.1
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software packages (or portions thereof) that are distributed with
+this VMware Product.
+
+The VMware Product may also include other VMware components, which may
+contain additional open source software packages. One or more such
+open_source_licenses.txt files may therefore accompany this VMware Product.
+
+The VMware Product that includes this file does not necessarily use all the
+open source software packages referred to below and may also only use
+portions of a given package.
+
+===========================================================================
+TABLE OF CONTENTS
+===========================================================================
+
+The following is a listing of the open source components detailed in this
+document. This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> antlr-2.7.3
+   >>> backport-util-concurrent-java_5.0
+   >>> mx4j-2.0.1
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Apache License, V2.0
+
+    >>> commons-modeler-2.0
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+SECTION 4: GNU Lesser General Public License, V2.1
+
+   >>> jgroups-2.10
+   >>> trove-1.1.b3
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> GNU Lesser General Public License, V2.1
+
+   >>> Common Development and Distribution License, V1.0
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+
+>>> antlr-2.7.3
+
+SOFTWARE RIGHTS
+
+ANTLR 1989-2004 Developed by Terence Parr
+Partially supported by University of San Francisco & jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
+parrt@cs.usfca.edu
+parrt@antlr.org
+
+
+>>> backport-util-concurrent-java_5.0
+
+License
+This software is released to the public domain, in the spirit of the original code written by Doug Lea. The code can be used for any purpose, modified, and redistributed without acknowledgment. No warranty is provided, either express or implied.
+
+
+>>> mx4j-2.0.1
+
+The MX4J License, Version 1.0
+
+Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+         1. Redistributions of source code must retain the above copyright
+            notice, this list of conditions and the following disclaimer.
+
+         2. Redistributions in binary form must reproduce the above copyright
+            notice, this list of conditions and the following disclaimer in
+            the documentation and/or other materials provided with the
+            distribution.
+
+         3. The end-user documentation included with the redistribution,
+            if any, must include the following acknowledgment:
+               "This product includes software developed by the
+                MX4J project (http://mx4j.sourceforge.net)."
+            Alternately, this acknowledgment may appear in the software itself,
+            if and wherever such third-party acknowledgments normally appear.
+
+         4. The name "MX4J" must not be used to endorse or promote
+            products derived from this software without prior written
+            permission.
+            For written permission, please contact
+            biorn_steedom [at] users [dot] sourceforge [dot] net
+
+         5. Products derived from this software may not be called "MX4J",
+            nor may "MX4J" appear in their name, without prior written
+            permission of Simone Bordet.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the MX4J project.  For more information on
+MX4J, please see
+the MX4J website.
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 are applicable to the following component(s).
+
+>>> commons-modeler-2.0
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 are applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
+
+GNU Lesser General Public License, V2.1 are applicable to the following component(s).
+
+
+>>> jgroups-2.10
+
+This library 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 library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+>>> trove-1.1.b3
+
+The Trove library is licensed under the Lesser GNU Public License,
+which is included with the distribution in a file called LICENSE.txt.
+
+The PrimeFinder and HashFunctions classes in Trove are subject to the
+following license restrictions:
+
+Copyright (c) 1999 CERN - European Organization for Nuclear Research.
+
+Permission to use, copy, modify, distribute and sell this software and
+its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. CERN makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without expressed or implied warranty.
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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 library 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 library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America or email info@vmware.com.  All such
+requests should clearly specify:  OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium.  This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively, 
+the Source Files may accompany the VMware product.
+
+[GFEHTTP201KP101911]


[14/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheWriter.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheWriter.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheWriter.java
new file mode 100644
index 0000000..0385ebf
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/LocalSessionCacheWriter.java
@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.callback;
+
+import com.gemstone.gemfire.cache.CacheWriterException;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
+
+import javax.servlet.http.HttpSession;
+import java.util.Properties;
+
+public class LocalSessionCacheWriter extends CacheWriterAdapter<String, HttpSession> implements Declarable {
+
+  private final Region<String, HttpSession> backingRegion;
+
+  public LocalSessionCacheWriter(Region<String, HttpSession> backingRegion) {
+    this.backingRegion = backingRegion;
+  }
+
+  public void beforeCreate(EntryEvent<String, HttpSession> event) throws CacheWriterException {
+    this.backingRegion.put(event.getKey(), event.getNewValue(), event.getCallbackArgument());
+  }
+
+  public void beforeUpdate(EntryEvent<String, HttpSession> event) throws CacheWriterException {
+    this.backingRegion.put(event.getKey(), event.getNewValue(), event.getCallbackArgument());
+  }
+
+  public void beforeDestroy(EntryEvent<String, HttpSession> event) throws CacheWriterException {
+    try {
+      this.backingRegion.destroy(event.getKey(), event.getCallbackArgument());
+    } catch (EntryNotFoundException e) {
+      // I think it is safe to ignore this exception. The entry could have
+      // expired already in the backing region.
+    }
+  }
+
+  public void close() {
+  }
+
+  public void init(Properties p) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
new file mode 100644
index 0000000..dff6d58
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/callback/SessionExpirationCacheListener.java
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.callback;
+
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.Operation;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
+import com.gemstone.gemfire.modules.util.ContextMapper;
+
+import javax.servlet.http.HttpSession;
+import java.util.Properties;
+
+public class SessionExpirationCacheListener extends CacheListenerAdapter<String, HttpSession> implements Declarable {
+
+  public void afterDestroy(EntryEvent<String, HttpSession> event) {
+    // A Session expired. If it was destroyed by GemFire expiration, process it.
+    // If it was destroyed via Session.invalidate, ignore it since it has
+    // already been processed.
+    DeltaSession session = null;
+    if (event.getOperation() == Operation.EXPIRE_DESTROY) {
+      session = (DeltaSession) event.getOldValue();
+    } else {
+      /*
+       * This comes into play when we're dealing with an empty client proxy. We
+       * need the actual destroyed object to come back from the server so that
+       * any associated listeners can fire correctly. Having the destroyed
+       * object come back as the callback arg depends on setting the property
+       * gemfire.EXPIRE_SENDS_ENTRY_AS_CALLBACK.
+       */
+      Object callback = event.getCallbackArgument();
+      if (callback != null && callback instanceof DeltaSession) {
+        session = (DeltaSession) callback;
+        DeltaSessionManager m = ContextMapper.getContext(session.getContextName());
+        if (m != null) {
+          session.setOwner(m);
+        }
+      }
+    }
+    if (session != null) {
+      session.processExpired();
+    }
+  }
+
+  public void init(Properties p) {
+  }
+
+  public boolean equals(Object obj) {
+    // This method is only implemented so that RegionAttributesCreation.sameAs
+    // works properly.
+    if (this == obj) {
+      return true;
+    }
+
+    if (obj == null || !(obj instanceof SessionExpirationCacheListener)) {
+      return false;
+    }
+
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEvent.java
new file mode 100644
index 0000000..90b6f28
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEvent.java
@@ -0,0 +1,25 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.internal;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+
+public interface DeltaSessionAttributeEvent extends DataSerializable {
+
+  public void apply(DeltaSession session);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEventBatch.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEventBatch.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEventBatch.java
new file mode 100644
index 0000000..47df071
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionAttributeEventBatch.java
@@ -0,0 +1,88 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.internal;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.gatewaydelta.AbstractGatewayDeltaEvent;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+@SuppressWarnings("serial")
+public class DeltaSessionAttributeEventBatch extends AbstractGatewayDeltaEvent {
+
+  private List<DeltaSessionAttributeEvent> eventQueue;
+
+  public DeltaSessionAttributeEventBatch() {
+  }
+
+  public DeltaSessionAttributeEventBatch(String regionName, String sessionId,
+      List<DeltaSessionAttributeEvent> eventQueue) {
+    super(regionName, sessionId);
+    this.eventQueue = eventQueue;
+  }
+
+  public List<DeltaSessionAttributeEvent> getEventQueue() {
+    return this.eventQueue;
+  }
+
+  public void apply(Cache cache) {
+    Region<String, DeltaSession> region = getRegion(cache);
+    DeltaSession session = region.get(this.key);
+    if (session == null) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Session ").append(this.key).append(" was not found while attempting to apply ").append(this);
+      cache.getLogger().warning(builder.toString());
+    } else {
+      session.applyAttributeEvents(region, this.eventQueue);
+      if (cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("Applied ").append(this);
+        cache.getLogger().fine(builder.toString());
+      }
+    }
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    super.fromData(in);
+    this.eventQueue = DataSerializer.readArrayList(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    super.toData(out);
+    DataSerializer.writeArrayList((ArrayList) this.eventQueue, out);
+  }
+
+  public String toString() {
+    return new StringBuilder().append("DeltaSessionAttributeEventBatch[")
+        .append("regionName=")
+        .append(this.regionName)
+        .append("; sessionId=")
+        .append(this.key)
+        .append("; numberOfEvents=")
+        .append(this.eventQueue.size())
+        .append("]")
+        .toString();
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionDestroyAttributeEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionDestroyAttributeEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionDestroyAttributeEvent.java
new file mode 100644
index 0000000..989474f
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionDestroyAttributeEvent.java
@@ -0,0 +1,73 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.internal;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+
+@SuppressWarnings("serial")
+public class DeltaSessionDestroyAttributeEvent implements DeltaSessionAttributeEvent {
+
+  private String attributeName;
+
+  public DeltaSessionDestroyAttributeEvent() {
+  }
+
+  public DeltaSessionDestroyAttributeEvent(String attributeName) {
+    this.attributeName = attributeName;
+  }
+
+  public String getAttributeName() {
+    return this.attributeName;
+  }
+
+  public void apply(DeltaSession session) {
+    session.localDestroyAttribute(this.attributeName);
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.attributeName = DataSerializer.readString(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(this.attributeName, out);
+  }
+
+  public static void registerInstantiator(int id) {
+    Instantiator.register(new Instantiator(DeltaSessionDestroyAttributeEvent.class, id) {
+      public DataSerializable newInstance() {
+        return new DeltaSessionDestroyAttributeEvent();
+      }
+    });
+  }
+
+  public String toString() {
+    return new StringBuilder().append("DeltaSessionDestroyAttributeEvent[")
+        .append("attributeName=")
+        .append(this.attributeName)
+        .append("]")
+        .toString();
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java
new file mode 100644
index 0000000..2d59103
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionStatistics.java
@@ -0,0 +1,88 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.internal;
+
+import com.gemstone.gemfire.StatisticDescriptor;
+import com.gemstone.gemfire.Statistics;
+import com.gemstone.gemfire.StatisticsFactory;
+import com.gemstone.gemfire.StatisticsType;
+import com.gemstone.gemfire.StatisticsTypeFactory;
+import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+
+public class DeltaSessionStatistics {
+
+  public static final String typeName = "SessionStatistics";
+
+  private static final StatisticsType type;
+
+  private static final String SESSIONS_CREATED = "sessionsCreated";
+  private static final String SESSIONS_INVALIDATED = "sessionsInvalidated";
+  private static final String SESSIONS_EXPIRED = "sessionsExpired";
+
+  private static final int sessionsCreatedId;
+  private static final int sessionsInvalidatedId;
+  private static final int sessionsExpiredId;
+
+  static {
+    // Initialize type
+    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
+    type = f.createType(typeName, typeName,
+        new StatisticDescriptor[]{f.createIntCounter(SESSIONS_CREATED, "The number of sessions created",
+            "operations"), f.createIntCounter(SESSIONS_INVALIDATED,
+            "The number of sessions invalidated by invoking invalidate", "operations"), f.createIntCounter(
+            SESSIONS_EXPIRED, "The number of sessions invalidated by timeout", "operations"),});
+
+    // Initialize id fields
+    sessionsCreatedId = type.nameToId(SESSIONS_CREATED);
+    sessionsInvalidatedId = type.nameToId(SESSIONS_INVALIDATED);
+    sessionsExpiredId = type.nameToId(SESSIONS_EXPIRED);
+  }
+
+  private final Statistics stats;
+
+  public DeltaSessionStatistics(StatisticsFactory factory, String applicationName) {
+    this.stats = factory.createAtomicStatistics(type, typeName + "_" + applicationName);
+  }
+
+  public void close() {
+    this.stats.close();
+  }
+
+  public int getSessionsCreated() {
+    return this.stats.getInt(sessionsCreatedId);
+  }
+
+  public void incSessionsCreated() {
+    this.stats.incInt(sessionsCreatedId, 1);
+  }
+
+  public int getSessionsInvalidated() {
+    return this.stats.getInt(sessionsInvalidatedId);
+  }
+
+  public void incSessionsInvalidated() {
+    this.stats.incInt(sessionsInvalidatedId, 1);
+  }
+
+  public int getSessionsExpired() {
+    return this.stats.getInt(sessionsExpiredId);
+  }
+
+  public void incSessionsExpired() {
+    this.stats.incInt(sessionsExpiredId, 1);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionUpdateAttributeEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionUpdateAttributeEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionUpdateAttributeEvent.java
new file mode 100644
index 0000000..6678e55
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/internal/DeltaSessionUpdateAttributeEvent.java
@@ -0,0 +1,83 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina.internal;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+@SuppressWarnings("serial")
+public class DeltaSessionUpdateAttributeEvent implements DeltaSessionAttributeEvent {
+
+  private String attributeName;
+
+  private Object attributeValue;
+
+  public DeltaSessionUpdateAttributeEvent() {
+  }
+
+  public DeltaSessionUpdateAttributeEvent(String attributeName, Object attributeValue) {
+    this.attributeName = attributeName;
+    this.attributeValue = attributeValue;
+  }
+
+  public String getAttributeName() {
+    return this.attributeName;
+  }
+
+  public Object getAttributeValue() {
+    return this.attributeValue;
+  }
+
+  public void apply(DeltaSession session) {
+    session.localUpdateAttribute(this.attributeName, this.attributeValue);
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.attributeName = DataSerializer.readString(in);
+    this.attributeValue = DataSerializer.readObject(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(this.attributeName, out);
+    DataSerializer.writeObject(this.attributeValue, out);
+  }
+
+  public static void registerInstantiator(int id) {
+    Instantiator.register(new Instantiator(DeltaSessionUpdateAttributeEvent.class, id) {
+      public DataSerializable newInstance() {
+        return new DeltaSessionUpdateAttributeEvent();
+      }
+    });
+  }
+
+  public String toString() {
+    return new StringBuilder().append("DeltaSessionUpdateAttributeEvent[")
+        .append("attributeName=")
+        .append(this.attributeName)
+        .append("; attributeValue=")
+        .append(this.attributeValue)
+        .append("]")
+        .toString();
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/Banner.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/Banner.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/Banner.java
new file mode 100644
index 0000000..dbe8e05
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/Banner.java
@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.internal.GemFireVersion;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Properties;
+
+public class Banner {
+
+  private static String VERSION = "unknown";
+
+  private static Properties props = new Properties();
+
+  static {
+    InputStream is = Banner.class.getResourceAsStream("/modules-version.properties");
+    try {
+      props.load(is);
+      VERSION = props.getProperty("version");
+    } catch (IOException e) {
+    }
+  }
+
+  public static String getString() {
+    StringWriter sw = new StringWriter();
+    PrintWriter pw = new PrintWriter(sw);
+    print(pw);
+    pw.close();
+    return sw.toString();
+  }
+
+  private static void print(PrintWriter pw) {
+    pw.println("GemFire Modules");
+    pw.print("Modules version: ");
+    pw.println(VERSION);
+    GemFireVersion.print(pw);
+  }
+
+  private Banner() {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/BootstrappingFunction.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/BootstrappingFunction.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/BootstrappingFunction.java
new file mode 100644
index 0000000..827c6f7
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/BootstrappingFunction.java
@@ -0,0 +1,188 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.execute.Execution;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.MembershipListener;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+
+import java.util.List;
+import java.util.Set;
+
+public class BootstrappingFunction implements Function, MembershipListener {
+
+  private static final long serialVersionUID = 1856043174458190605L;
+
+  public static final String ID = "bootstrapping-function";
+
+  private static final int TIME_TO_WAIT_FOR_CACHE = Integer.getInteger("gemfiremodules.timeToWaitForCache", 30000);
+
+  @Override
+  public void execute(FunctionContext context) {
+    // Verify that the cache exists before continuing.
+    // When this function is executed by a remote membership listener, it is
+    // being invoked before the cache is started.
+    Cache cache = verifyCacheExists();
+
+    // Register as membership listener
+    registerAsMembershipListener(cache);
+
+    // Register functions
+    registerFunctions();
+
+    // Return status
+    context.getResultSender().lastResult(Boolean.TRUE);
+  }
+
+  private Cache verifyCacheExists() {
+    int timeToWait = 0;
+    Cache cache = null;
+    while (timeToWait < TIME_TO_WAIT_FOR_CACHE) {
+      try {
+        cache = CacheFactory.getAnyInstance();
+        break;
+      } catch (Exception ignore) {
+        //keep trying and hope for the best
+      }
+      try {
+        Thread.sleep(250);
+      } catch (InterruptedException ie) {
+        Thread.currentThread().interrupt();
+        break;
+      }
+      timeToWait += 250;
+    }
+
+    if (cache == null) {
+      cache = new CacheFactory().create();
+    }
+
+    return cache;
+  }
+
+  private void registerAsMembershipListener(Cache cache) {
+    DM dm = ((InternalDistributedSystem) cache.getDistributedSystem()).getDistributionManager();
+    dm.addMembershipListener(this);
+  }
+
+  private void registerFunctions() {
+    // Synchronize so that these functions aren't registered twice. The
+    // constructor for the CreateRegionFunction creates a meta region.
+    synchronized (ID) {
+      // Register the create region function if it is not already registered
+      if (!FunctionService.isRegistered(CreateRegionFunction.ID)) {
+        FunctionService.registerFunction(new CreateRegionFunction());
+      }
+
+      // Register the touch partitioned region entries function if it is not already registered
+      if (!FunctionService.isRegistered(TouchPartitionedRegionEntriesFunction.ID)) {
+        FunctionService.registerFunction(new TouchPartitionedRegionEntriesFunction());
+      }
+
+      // Register the touch replicated region entries function if it is not already registered
+      if (!FunctionService.isRegistered(TouchReplicatedRegionEntriesFunction.ID)) {
+        FunctionService.registerFunction(new TouchReplicatedRegionEntriesFunction());
+      }
+
+      // Register the region size function if it is not already registered
+      if (!FunctionService.isRegistered(RegionSizeFunction.ID)) {
+        FunctionService.registerFunction(new RegionSizeFunction());
+      }
+    }
+  }
+
+  private void bootstrapMember(InternalDistributedMember member) {
+    // Create and execute the function
+    Cache cache = CacheFactory.getAnyInstance();
+    Execution execution = FunctionService.onMember(cache.getDistributedSystem(), member);
+    ResultCollector collector = execution.execute(this);
+
+    // Get the result. Nothing is being done with it.
+    try {
+      collector.getResult();
+    } catch (Exception e) {
+      // If an exception occurs in the function, log it.
+      cache.getLogger().warning("Caught unexpected exception:", e);
+    }
+  }
+
+  @Override
+  public String getId() {
+    return ID;
+  }
+
+  @Override
+  public boolean hasResult() {
+    return true;
+  }
+
+  @Override
+  public boolean isHA() {
+    return false;
+  }
+
+  @Override
+  public boolean optimizeForWrite() {
+    return false;
+  }
+
+  public int hashCode() {
+    // This method is only implemented so that multiple instances of this class
+    // don't get added as membership listeners.
+    return ID.hashCode();
+  }
+
+  public boolean equals(Object obj) {
+    // This method is only implemented so that multiple instances of this class
+    // don't get added as membership listeners.
+    if (this == obj) {
+      return true;
+    }
+
+    if (obj == null || !(obj instanceof BootstrappingFunction)) {
+      return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public void memberDeparted(InternalDistributedMember id, boolean crashed) {
+  }
+
+  @Override
+  public void memberJoined(InternalDistributedMember id) {
+    bootstrapMember(id);
+  }
+
+  @Override
+  public void memberSuspect(InternalDistributedMember id, InternalDistributedMember whoSuspected, String reason) {
+  }
+
+  @Override
+  public void quorumLost(Set<InternalDistributedMember> internalDistributedMembers,
+      List<InternalDistributedMember> internalDistributedMembers2) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ClassLoaderObjectInputStream.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ClassLoaderObjectInputStream.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ClassLoaderObjectInputStream.java
new file mode 100644
index 0000000..8cd600e
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ClassLoaderObjectInputStream.java
@@ -0,0 +1,40 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamClass;
+
+/**
+ * This class is used when session attributes need to be reconstructed with a new classloader.
+ */
+public class ClassLoaderObjectInputStream extends ObjectInputStream {
+
+  private final ClassLoader loader;
+
+  public ClassLoaderObjectInputStream(InputStream in, ClassLoader loader) throws IOException {
+    super(in);
+    this.loader = loader;
+  }
+
+  @Override
+  public Class<?> resolveClass(ObjectStreamClass desc) throws ClassNotFoundException {
+    return Class.forName(desc.getName(), false, loader);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ContextMapper.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ContextMapper.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ContextMapper.java
new file mode 100644
index 0000000..3b7b2de
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ContextMapper.java
@@ -0,0 +1,53 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This basic singleton class maps context paths to manager instances.
+ * <p>
+ * This class exists for a particular corner case described here. Consider a client-server environment with empty client
+ * regions *and* the need to fire HttpSessionListener destroy events. When a session expires, in this scenario, the
+ * Gemfire destroy events originate on the server and, with some Gemfire hackery, the destroyed object ends up as the
+ * event's callback argument. At the point that the CacheListener then gets the event, the re-constituted session object
+ * has no manager associated and so we need to re-attach a manager to it so that events can be fired correctly.
+ */
+
+public class ContextMapper {
+
+  private static Map<String, DeltaSessionManager> managers = new HashMap<String, DeltaSessionManager>();
+
+  private ContextMapper() {
+    // This is a singleton
+  }
+
+  public static void addContext(String path, DeltaSessionManager manager) {
+    managers.put(path, manager);
+  }
+
+  public static DeltaSessionManager getContext(String path) {
+    return managers.get(path);
+  }
+
+  public static DeltaSessionManager removeContext(String path) {
+    return managers.remove(path);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/CreateRegionFunction.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/CreateRegionFunction.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/CreateRegionFunction.java
new file mode 100644
index 0000000..564ccb7
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/CreateRegionFunction.java
@@ -0,0 +1,245 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
+import com.gemstone.gemfire.distributed.DistributedLockService;
+import com.gemstone.gemfire.distributed.internal.locks.DistributedMemberLock;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Properties;
+
+public class CreateRegionFunction implements Function, Declarable {
+
+  private static final long serialVersionUID = -9210226844302128969L;
+
+  private final Cache cache;
+
+  private final Region<String, RegionConfiguration> regionConfigurationsRegion;
+
+  public static final String ID = "create-region-function";
+
+  private static final boolean DUMP_SESSION_CACHE_XML = Boolean.getBoolean("gemfiremodules.dumpSessionCacheXml");
+
+  private static final String REGION_CONFIGURATION_METADATA_REGION = "__regionConfigurationMetadata";
+
+  public CreateRegionFunction() {
+    this(CacheFactory.getAnyInstance());
+  }
+
+  public CreateRegionFunction(Cache cache) {
+    this.cache = cache;
+    this.regionConfigurationsRegion = createRegionConfigurationMetadataRegion();
+  }
+
+  public CreateRegionFunction(ClientCache cache) {
+    this.cache = null;
+    this.regionConfigurationsRegion = null;
+  }
+
+  public void execute(FunctionContext context) {
+    RegionConfiguration configuration = (RegionConfiguration) context.getArguments();
+    if (this.cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Function ").append(ID).append(" received request: ").append(configuration);
+      this.cache.getLogger().fine(builder.toString());
+    }
+
+    // Create or retrieve region
+    RegionStatus status = createOrRetrieveRegion(configuration);
+
+    // Dump XML
+    if (DUMP_SESSION_CACHE_XML) {
+      writeCacheXml();
+    }
+    // Return status
+    context.getResultSender().lastResult(status);
+  }
+
+  private RegionStatus createOrRetrieveRegion(RegionConfiguration configuration) {
+    RegionStatus status = null;
+    String regionName = configuration.getRegionName();
+    if (this.cache.getLogger().fineEnabled()) {
+      this.cache.getLogger().fine("Function " + ID + " retrieving region named: " + regionName);
+    }
+    Region region = this.cache.getRegion(regionName);
+    if (region == null) {
+      status = createRegion(configuration);
+    } else {
+      status = RegionStatus.VALID;
+      try {
+        RegionHelper.validateRegion(this.cache, configuration, region);
+      } catch (Exception e) {
+        if (!e.getMessage()
+            .equals(LocalizedStrings.RegionAttributesCreation_CACHELISTENERS_ARE_NOT_THE_SAME.toLocalizedString())) {
+          this.cache.getLogger().warning(e);
+        }
+        status = RegionStatus.INVALID;
+      }
+    }
+    return status;
+  }
+
+  public String getId() {
+    return ID;
+  }
+
+  public boolean optimizeForWrite() {
+    return false;
+  }
+
+  public boolean isHA() {
+    return true;
+  }
+
+  public boolean hasResult() {
+    return true;
+  }
+
+  public void init(Properties properties) {
+  }
+
+  private RegionStatus createRegion(RegionConfiguration configuration) {
+    // Get a distributed lock
+    DistributedMemberLock dml = getDistributedLock();
+    if (this.cache.getLogger().fineEnabled()) {
+      this.cache.getLogger().fine(this + ": Attempting to lock " + dml);
+    }
+    long start = 0, end = 0;
+    RegionStatus status = null;
+    try {
+      if (this.cache.getLogger().fineEnabled()) {
+        start = System.currentTimeMillis();
+      }
+      // Obtain a lock on the distributed lock
+      dml.lockInterruptibly();
+      if (this.cache.getLogger().fineEnabled()) {
+        end = System.currentTimeMillis();
+        this.cache.getLogger().fine(this + ": Obtained lock on " + dml + " in " + (end - start) + " ms");
+      }
+
+      // Attempt to get the region again after the lock has been obtained
+      String regionName = configuration.getRegionName();
+      Region region = this.cache.getRegion(regionName);
+
+      // If it exists now, validate it.
+      // Else put an entry into the sessionRegionConfigurationsRegion
+      // while holding the lock. This will create the region in all VMs.
+      if (region == null) {
+        this.regionConfigurationsRegion.put(regionName, configuration);
+
+        // Retrieve the region after creating it
+        region = this.cache.getRegion(regionName);
+        // If the region is null now, it wasn't created for some reason
+        // (e.g. the region attributes id were invalid)
+        if (region == null) {
+          status = RegionStatus.INVALID;
+        } else {
+          // Create the PR buckets if necessary)
+          if (region instanceof PartitionedRegion) {
+            PartitionedRegion pr = (PartitionedRegion) region;
+            createBuckets(pr);
+          }
+          status = RegionStatus.VALID;
+        }
+      } else {
+        status = RegionStatus.VALID;
+        try {
+          RegionHelper.validateRegion(this.cache, configuration, region);
+        } catch (Exception e) {
+          if (!e.getMessage()
+              .equals(LocalizedStrings.RegionAttributesCreation_CACHELISTENERS_ARE_NOT_THE_SAME.toLocalizedString())) {
+            this.cache.getLogger().warning(e);
+          }
+          status = RegionStatus.INVALID;
+        }
+      }
+    } catch (Exception e) {
+      StringBuilder builder = new StringBuilder();
+      builder.append(this)
+          .append(": Caught Exception attempting to create region named ")
+          .append(configuration.getRegionName())
+          .append(":");
+      this.cache.getLogger().warning(builder.toString(), e);
+      status = RegionStatus.INVALID;
+    } finally {
+      // Unlock the distributed lock
+      try {
+        dml.unlock();
+      } catch (Exception e) {
+      }
+    }
+    return status;
+  }
+
+  private void createBuckets(PartitionedRegion region) {
+    PartitionRegionHelper.assignBucketsToPartitions(region);
+  }
+
+  private Region<String, RegionConfiguration> createRegionConfigurationMetadataRegion() {
+    // a sessionFactory in hibernate could have been re-started
+    // so, it is possible that this region exists already
+    Region<String, RegionConfiguration> r = this.cache.getRegion(REGION_CONFIGURATION_METADATA_REGION);
+    if (r != null) {
+      return r;
+    }
+    RegionFactory<String, RegionConfiguration> factory = this.cache.createRegionFactory(RegionShortcut.REPLICATE);
+    factory.addCacheListener(new RegionConfigurationCacheListener());
+    return factory.create(REGION_CONFIGURATION_METADATA_REGION);
+  }
+
+  private void writeCacheXml() {
+    File file = new File("cache-" + System.currentTimeMillis() + ".xml");
+    try {
+      PrintWriter pw = new PrintWriter(new FileWriter(file), true);
+      CacheXmlGenerator.generate(this.cache, pw);
+      pw.close();
+    } catch (IOException e) {
+    }
+  }
+
+  private DistributedMemberLock getDistributedLock() {
+    String dlsName = this.regionConfigurationsRegion.getName();
+    DistributedLockService lockService = initializeDistributedLockService(dlsName);
+    String lockToken = dlsName + "_token";
+    return new DistributedMemberLock(lockService, lockToken);
+  }
+
+  private DistributedLockService initializeDistributedLockService(String dlsName) {
+    DistributedLockService lockService = DistributedLockService.getServiceNamed(dlsName);
+    if (lockService == null) {
+      lockService = DistributedLockService.create(dlsName, this.cache.getDistributedSystem());
+    }
+    return lockService;
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/DebugCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/DebugCacheListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/DebugCacheListener.java
new file mode 100644
index 0000000..baca5b8
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/DebugCacheListener.java
@@ -0,0 +1,72 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+
+import java.util.Properties;
+
+@SuppressWarnings("unchecked")
+public class DebugCacheListener extends CacheListenerAdapter implements Declarable {
+
+  public void afterCreate(EntryEvent event) {
+    log(event);
+  }
+
+  public void afterUpdate(EntryEvent event) {
+    log(event);
+  }
+
+  public void afterInvalidate(EntryEvent event) {
+    log(event);
+  }
+
+  public void afterDestroy(EntryEvent event) {
+    log(event);
+  }
+
+  private void log(EntryEvent event) {
+    StringBuilder builder = new StringBuilder();
+    builder.append("DebugCacheListener: Received ")
+        .append(event.getOperation())
+        .append(" for key=")
+        .append(event.getKey());
+    if (event.getNewValue() != null) {
+      builder.append("; value=").append(event.getNewValue());
+    }
+    event.getRegion().getCache().getLogger().info(builder.toString());
+  }
+
+  public void init(Properties p) {
+  }
+
+  public boolean equals(Object obj) {
+    // This method is only implemented so that RegionCreator.validateRegion works properly.
+    // The CacheListener comparison fails because two of these instances are not equal.
+    if (this == obj) {
+      return true;
+    }
+
+    if (obj == null || !(obj instanceof DebugCacheListener)) {
+      return false;
+    }
+
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
new file mode 100644
index 0000000..dff5b95
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ModuleStatistics.java
@@ -0,0 +1,91 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.StatisticDescriptor;
+import com.gemstone.gemfire.Statistics;
+import com.gemstone.gemfire.StatisticsFactory;
+import com.gemstone.gemfire.StatisticsType;
+import com.gemstone.gemfire.StatisticsTypeFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+
+/**
+ * Statistics for modules.
+ *
+ * @author sbawaska
+ */
+public class ModuleStatistics {
+
+  private static final StatisticsType type;
+
+  private static final int cacheHitsId;
+
+  private static final int cacheMissesId;
+
+  private static final int hibernateEntityDestroyJobsScheduledId;
+
+  static {
+    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
+    type = f.createType("pluginStats", "statistics for hibernate plugin and hibernate L2 cache",
+        new StatisticDescriptor[]{f.createLongCounter("cacheHits", "number of times an entity was found in L2 cache",
+            "count"), f.createLongCounter("cacheMisses", "number of times an entity was NOT found in l2 cache",
+            "count"), f.createLongCounter("hibernateEntityDestroyJobsScheduled",
+            "number of entities scheduled for destroy because of version conflict with a remote member", "jobs")});
+
+    cacheHitsId = type.nameToId("cacheHits");
+    cacheMissesId = type.nameToId("cacheMisses");
+    hibernateEntityDestroyJobsScheduledId = type.nameToId("hibernateEntityDestroyJobsScheduled");
+  }
+
+  private final Statistics stats;
+
+  private static ModuleStatistics instance;
+
+  private ModuleStatistics(StatisticsFactory factory) {
+    this.stats = factory.createAtomicStatistics(type, "PluginStatistics");
+  }
+
+  public static ModuleStatistics getInstance(DistributedSystem system) {
+    synchronized (ModuleStatistics.class) {
+      if (instance == null) {
+        instance = new ModuleStatistics(system);
+      }
+    }
+    return instance;
+  }
+
+  public void incCacheHit() {
+    stats.incLong(cacheHitsId, 1);
+  }
+
+  public long getCacheHits() {
+    return stats.getLong(cacheHitsId);
+  }
+
+  public void incCacheMiss() {
+    stats.incLong(cacheMissesId, 1);
+  }
+
+  public long getCacheMiss() {
+    return stats.getLong(cacheMissesId);
+  }
+
+  public void incHibernateDestroyJobsScheduled() {
+    stats.incLong(hibernateEntityDestroyJobsScheduledId, 1);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfiguration.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfiguration.java
new file mode 100644
index 0000000..5b025bc
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfiguration.java
@@ -0,0 +1,308 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.cache.CacheWriter;
+import com.gemstone.gemfire.cache.CustomExpiry;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Class <code>RegionConfiguration</code> encapsulates the configuration attributes for a <code>Region</code> to be
+ * created on the server.
+ *
+ * @author Barry Oglesby
+ * @since 6.5
+ */
+@SuppressWarnings({"serial", "unchecked"})
+public class RegionConfiguration implements DataSerializable {
+
+  /**
+   * The name of the <code>Region</code> to be created
+   */
+  private String regionName;
+
+  /**
+   * The id of the <code>RegionAttributes</code> to be used
+   */
+  private String regionAttributesId;
+
+  /**
+   * The default max inactive interval. The default value is -1.
+   */
+  public static final int DEFAULT_MAX_INACTIVE_INTERVAL = -1;
+
+  /**
+   * The maximum time interval in seconds before entries are expired
+   */
+  private int maxInactiveInterval = DEFAULT_MAX_INACTIVE_INTERVAL;
+
+  /**
+   * The <code>CustomExpiry</code> to be used
+   */
+  private CustomExpiry customExpiry;
+
+  /**
+   * Whether delta replication across a <code>Gateway</code> is enabled.
+   */
+  private boolean enableGatewayDeltaReplication = false;
+
+  /**
+   * Whether replication across a <code>Gateway</code> is enabled.
+   */
+  private boolean enableGatewayReplication = false;
+
+  /**
+   * Whether to add a <code>DebugCacheListener</code> to the <code>Region</code>.
+   */
+  private boolean enableDebugListener = false;
+
+  /**
+   * Whether to add a cache listener for session expiration events
+   */
+  private boolean enableSessionExpirationCacheListener = false;
+
+  /**
+   * name for the CacheWriter to be associated with this region. This cache writer must have a zero arg constructor and
+   * must be present on the classpath on the server.
+   */
+  private String cacheWriterName;
+
+  /**
+   * Default constructor used by the <code>DataSerialiable</code> interface
+   */
+  public RegionConfiguration() {
+  }
+
+  /**
+   * Sets the name of the <code>Region</code> to be created
+   *
+   * @param regionName The name of the <code>Region</code> to be created
+   */
+  public void setRegionName(String regionName) {
+    this.regionName = regionName;
+  }
+
+  /**
+   * Returns the name of the <code>Region</code> to be created
+   *
+   * @return the name of the <code>Region</code> to be created
+   */
+  public String getRegionName() {
+    return this.regionName;
+  }
+
+  /**
+   * Sets the id of the <code>RegionAttributes</code> to be used
+   *
+   * @param regionAttributesId The id of the <code>RegionAttributes</code> to be used
+   */
+  public void setRegionAttributesId(String regionAttributesId) {
+    this.regionAttributesId = regionAttributesId;
+  }
+
+  /**
+   * Returns the id of the <code>RegionAttributes</code> to be used
+   *
+   * @return the id of the <code>RegionAttributes</code> to be used
+   */
+  public String getRegionAttributesId() {
+    return this.regionAttributesId;
+  }
+
+  /**
+   * Sets the maximum time interval in seconds before entries are expired
+   *
+   * @param maxInactiveInterval The maximum time interval in seconds before entries are expired
+   */
+  public void setMaxInactiveInterval(int maxInactiveInterval) {
+    this.maxInactiveInterval = maxInactiveInterval;
+  }
+
+  /**
+   * Returns the maximum time interval in seconds entries are expired
+   *
+   * @return the maximum time interval in seconds before entries are expired
+   */
+  public int getMaxInactiveInterval() {
+    return this.maxInactiveInterval;
+  }
+
+  /**
+   * Sets the <code>CustomExpiry</code> to be used
+   *
+   * @param customExpiry The <code>CustomExpiry</code> to be used
+   */
+  public void setCustomExpiry(CustomExpiry customExpiry) {
+    this.customExpiry = customExpiry;
+  }
+
+  /**
+   * Returns the <code>CustomExpiry</code> to be used
+   *
+   * @return the <code>CustomExpiry</code> to be used
+   */
+  public CustomExpiry getCustomExpiry() {
+    return this.customExpiry;
+  }
+
+  /**
+   * Enables/disables delta replication across a <code>Gateway</code>.
+   *
+   * @param enableGatewayDeltaReplication true to enable, false to disable gateway delta replication.
+   */
+  public void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication) {
+    this.enableGatewayDeltaReplication = enableGatewayDeltaReplication;
+  }
+
+  /**
+   * Returns whether delta replication across a <code>Gateway</code> is enabled.
+   *
+   * @return whether delta replication across a <code>Gateway</code> is enabled
+   */
+  public boolean getEnableGatewayDeltaReplication() {
+    return this.enableGatewayDeltaReplication;
+  }
+
+  /**
+   * Enables/disables replication across a <code>Gateway</code>.
+   *
+   * @param enableGatewayReplication true to enable, false to disable gateway replication.
+   */
+  public void setEnableGatewayReplication(boolean enableGatewayReplication) {
+    this.enableGatewayReplication = enableGatewayReplication;
+  }
+
+  /**
+   * Returns whether replication across a <code>Gateway</code> is enabled.
+   *
+   * @return whether replication across a <code>Gateway</code> is enabled
+   */
+  public boolean getEnableGatewayReplication() {
+    return this.enableGatewayReplication;
+  }
+
+  /**
+   * Enables/disables a debug <code>CacheListener</code>.
+   *
+   * @param enableDebugListener true to enable, false to disable debug <code>CacheListener</code>.
+   */
+  public void setEnableDebugListener(boolean enableDebugListener) {
+    this.enableDebugListener = enableDebugListener;
+  }
+
+  /**
+   * Returns whether a debug <code>CacheListener</code> is enabled.
+   *
+   * @return whether a debug <code>CacheListener</code> is enabled
+   */
+  public boolean getEnableDebugListener() {
+    return this.enableDebugListener;
+  }
+
+  public void setSessionExpirationCacheListener(boolean enableSessionExpirationCacheListener) {
+    this.enableSessionExpirationCacheListener = enableSessionExpirationCacheListener;
+  }
+
+  public boolean getSessionExpirationCacheListener() {
+    return this.enableSessionExpirationCacheListener;
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(this.regionName, out);
+    DataSerializer.writeString(this.regionAttributesId, out);
+    DataSerializer.writePrimitiveInt(this.maxInactiveInterval, out);
+    DataSerializer.writeObject(this.customExpiry, out);
+    DataSerializer.writeBoolean(this.enableGatewayDeltaReplication, out);
+    DataSerializer.writeBoolean(this.enableGatewayReplication, out);
+    DataSerializer.writeBoolean(this.enableDebugListener, out);
+    DataSerializer.writeString(this.cacheWriterName, out);
+    DataSerializer.writeBoolean(this.enableSessionExpirationCacheListener, out);
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.regionName = DataSerializer.readString(in);
+    this.regionAttributesId = DataSerializer.readString(in);
+    this.maxInactiveInterval = DataSerializer.readPrimitiveInt(in);
+    this.customExpiry = DataSerializer.readObject(in);
+    this.enableGatewayDeltaReplication = DataSerializer.readBoolean(in);
+    this.enableGatewayReplication = DataSerializer.readBoolean(in);
+    this.enableDebugListener = DataSerializer.readBoolean(in);
+    this.cacheWriterName = DataSerializer.readString(in);
+
+    // This allows for backwards compatibility with 2.1 clients
+    if (((InputStream) in).available() > 0) {
+      this.enableSessionExpirationCacheListener = DataSerializer.readBoolean(in);
+    } else {
+      this.enableSessionExpirationCacheListener = false;
+    }
+  }
+
+  /**
+   * Registers an <code>Instantiator</code> for the <code>SessionConfiguration</code> class
+   */
+  public static void registerInstantiator(int id) {
+    Instantiator.register(new Instantiator(RegionConfiguration.class, id) {
+      public DataSerializable newInstance() {
+        return new RegionConfiguration();
+      }
+    });
+  }
+
+  public String toString() {
+    return new StringBuilder().append("RegionConfiguration[")
+        .append("regionName=")
+        .append(this.regionName)
+        .append("; regionAttributesId=")
+        .append(this.regionAttributesId)
+        .append("; maxInactiveInterval=")
+        .append(this.maxInactiveInterval)
+        .append("; enableGatewayDeltaReplication=")
+        .append(this.enableGatewayDeltaReplication)
+        .append("; enableGatewayReplication=")
+        .append(this.enableGatewayReplication)
+        .append("; enableDebugListener=")
+        .append(this.enableDebugListener)
+        .append("; enableSessionExpirationCacheListener=")
+        .append(this.enableSessionExpirationCacheListener)
+        .append("; cacheWriter=")
+        .append(this.cacheWriterName)
+        .append("]")
+        .toString();
+  }
+
+  /**
+   * set the fully qualified name of the {@link CacheWriter} to be created on the server. The cacheWriter must have a
+   * zero arg constructor, and must be present on the classpath on the server.
+   *
+   * @param cacheWriterName fully qualified class name of the cacheWriter
+   */
+  public void setCacheWriterName(String cacheWriterName) {
+    this.cacheWriterName = cacheWriterName;
+  }
+
+  public String getCacheWriterName() {
+    return cacheWriterName;
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfigurationCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfigurationCacheListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfigurationCacheListener.java
new file mode 100644
index 0000000..c25082b
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionConfigurationCacheListener.java
@@ -0,0 +1,114 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionEvent;
+import com.gemstone.gemfire.cache.RegionExistsException;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+
+import java.util.Properties;
+
+public class RegionConfigurationCacheListener extends CacheListenerAdapter<String, RegionConfiguration> implements Declarable {
+
+  private Cache cache;
+
+  public RegionConfigurationCacheListener() {
+    this.cache = CacheFactory.getAnyInstance();
+  }
+
+  public void afterCreate(EntryEvent<String, RegionConfiguration> event) {
+    RegionConfiguration configuration = event.getNewValue();
+    if (this.cache.getLogger().fineEnabled()) {
+      this.cache.getLogger().fine("RegionConfigurationCacheListener received afterCreate for region " + event.getKey());
+    }
+    // Create region
+    // this is a replicate region, and many VMs can be doing create region
+    // simultaneously, so ignore the RegionExistsException
+    try {
+      Region region = RegionHelper.createRegion(this.cache, configuration);
+      if (this.cache.getLogger().fineEnabled()) {
+        this.cache.getLogger().fine("RegionConfigurationCacheListener created region: " + region);
+      }
+    } catch (RegionExistsException exists) {
+      // ignore
+      this.cache.getLogger().fine("Region with configuration " + configuration + " existed");
+    }
+  }
+
+  @Override
+  public void afterUpdate(EntryEvent<String, RegionConfiguration> event) {
+    // a region could have been destroyed and then
+    // re-created, we want to create region again
+    // on remote nodes
+    afterCreate(event);
+  }
+
+  public void afterRegionCreate(RegionEvent<String, RegionConfiguration> event) {
+    StringBuilder builder1 = null, builder2 = null;
+    Region<String, RegionConfiguration> region = event.getRegion();
+    if (this.cache.getLogger().fineEnabled()) {
+      builder1 = new StringBuilder();
+      int regionSize = region.size();
+      if (regionSize > 0) {
+        builder1.append("RegionConfigurationCacheListener region ")
+            .append(region.getName())
+            .append(" has been initialized with the following ")
+            .append(regionSize)
+            .append(" region configurations:\n");
+        builder2 = new StringBuilder();
+        builder2.append("RegionConfigurationCacheListener created the following ")
+            .append(regionSize)
+            .append(" regions:\n");
+      } else {
+        builder1.append("RegionConfigurationCacheListener region ")
+            .append(region.getName())
+            .append(" has been initialized with no region configurations");
+      }
+    }
+    for (RegionConfiguration configuration : region.values()) {
+      if (this.cache.getLogger().fineEnabled()) {
+        builder1.append("\t").append(configuration);
+      }
+      try {
+        Region createRegion = RegionHelper.createRegion(this.cache, configuration);
+        if (this.cache.getLogger().fineEnabled()) {
+          builder2.append("\t").append(createRegion);
+        }
+      } catch (RegionExistsException exists) {
+        // could have been concurrently created by another function
+        if (this.cache.getLogger().fineEnabled()) {
+          builder2.append("\t").append(" region existed");
+        }
+      }
+
+    }
+    if (this.cache.getLogger().fineEnabled()) {
+      this.cache.getLogger().fine(builder1.toString());
+      if (builder2 != null) {
+        this.cache.getLogger().fine(builder2.toString());
+      }
+    }
+  }
+
+  public void init(Properties p) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionHelper.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionHelper.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionHelper.java
new file mode 100644
index 0000000..78e4423
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionHelper.java
@@ -0,0 +1,241 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheWriter;
+import com.gemstone.gemfire.cache.ExpirationAction;
+import com.gemstone.gemfire.cache.ExpirationAttributes;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.control.RebalanceFactory;
+import com.gemstone.gemfire.cache.control.RebalanceOperation;
+import com.gemstone.gemfire.cache.control.RebalanceResults;
+import com.gemstone.gemfire.cache.control.ResourceManager;
+import com.gemstone.gemfire.cache.partition.PartitionMemberInfo;
+import com.gemstone.gemfire.cache.partition.PartitionRebalanceInfo;
+import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
+import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
+import com.gemstone.gemfire.modules.gatewaydelta.GatewayDeltaForwarderCacheListener;
+import com.gemstone.gemfire.modules.session.catalina.callback.SessionExpirationCacheListener;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.CancellationException;
+
+@SuppressWarnings({"deprecation", "unchecked"})
+public class RegionHelper {
+
+  public static final String NAME = "gemfire_modules";
+
+  public static Region createRegion(Cache cache, RegionConfiguration configuration) {
+    // Use the createRegion method so that the RegionAttributes creation can be reused by validate.
+    RegionAttributes requestedRegionAttributes = getRegionAttributes(cache, configuration);
+    Region region = cache.createRegion(configuration.getRegionName(), requestedRegionAttributes);
+
+    // Log the cache xml if debugging is enabled. I'd like to be able to just
+    // log the region, but that API is not available.
+    if (configuration.getEnableDebugListener()) {
+      cache.getLogger().info("Created new session region: " + region);
+      cache.getLogger().info(generateCacheXml(cache));
+    }
+    return region;
+  }
+
+  public static void validateRegion(Cache cache, RegionConfiguration configuration, Region region) {
+    // Get the attributes of the existing region
+    RegionAttributes existingAttributes = region.getAttributes();
+
+    // Create region attributes creation on existing region attributes.
+    // The RAC is created to execute the sameAs method.
+    RegionAttributesCreation existingRACreation = new RegionAttributesCreation(existingAttributes, false);
+
+    // Create requested region attributes
+    RegionAttributes requestedRegionAttributes = getRegionAttributes(cache, configuration);
+
+    // Compare the two region attributes. This method either returns true or throws a RuntimeException.
+    existingRACreation.sameAs(requestedRegionAttributes);
+  }
+
+  public static RebalanceResults rebalanceRegion(Region region) throws CancellationException, InterruptedException {
+    String regionName = region.getName(); // FilterByName only looks at name and not full path
+    if (!PartitionRegionHelper.isPartitionedRegion(region)) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Region ")
+          .append(regionName)
+          .append(" is not partitioned. Instead, it is ")
+          .append(region.getAttributes().getDataPolicy())
+          .append(". It can't be rebalanced.");
+      throw new IllegalArgumentException(builder.toString());
+    }
+
+    // Rebalance the region
+    ResourceManager resourceManager = region.getCache().getResourceManager();
+    RebalanceFactory rebalanceFactory = resourceManager.createRebalanceFactory();
+    Set<String> regionsToRebalance = new HashSet<String>();
+    regionsToRebalance.add(regionName);
+    rebalanceFactory.includeRegions(regionsToRebalance);
+    RebalanceOperation rebalanceOperation = rebalanceFactory.start();
+
+    // Return the results
+    return rebalanceOperation.getResults();
+  }
+
+  public static RebalanceResults rebalanceCache(GemFireCache cache) throws CancellationException, InterruptedException {
+    ResourceManager resourceManager = cache.getResourceManager();
+    RebalanceFactory rebalanceFactory = resourceManager.createRebalanceFactory();
+    RebalanceOperation rebalanceOperation = rebalanceFactory.start();
+    return rebalanceOperation.getResults();
+  }
+
+  public static String generateCacheXml(Cache cache) {
+    try {
+      StringWriter sw = new StringWriter();
+      PrintWriter pw = new PrintWriter(sw, true);
+      CacheXmlGenerator.generate(cache, pw);
+      pw.close();
+      return sw.toString();
+    } catch (Exception ex) {
+      return "";
+    }
+  }
+
+  private static RegionAttributes getRegionAttributes(Cache cache, RegionConfiguration configuration) {
+    // Create the requested attributes
+    RegionAttributes baseRequestedAttributes = cache.getRegionAttributes(configuration.getRegionAttributesId());
+    if (baseRequestedAttributes == null) {
+      throw new IllegalArgumentException(
+          "No region attributes named " + configuration.getRegionAttributesId() + " are defined.");
+    }
+    AttributesFactory requestedFactory = new AttributesFactory(baseRequestedAttributes);
+
+    // Set the expiration time and action if necessary
+    int maxInactiveInterval = configuration.getMaxInactiveInterval();
+    if (maxInactiveInterval != RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL) {
+      requestedFactory.setStatisticsEnabled(true);
+      if (configuration.getCustomExpiry() == null) {
+        requestedFactory.setEntryIdleTimeout(new ExpirationAttributes(maxInactiveInterval, ExpirationAction.DESTROY));
+      } else {
+        requestedFactory.setCustomEntryIdleTimeout(configuration.getCustomExpiry());
+      }
+    }
+
+    // Add the gateway delta region cache listener if necessary
+    if (configuration.getEnableGatewayDeltaReplication()) {
+      // Add the listener that forwards created/destroyed deltas to the gateway
+      requestedFactory.addCacheListener(new GatewayDeltaForwarderCacheListener(cache));
+    }
+
+    // Enable gateway replication if necessary
+    // TODO: Disabled for WAN
+//    requestedFactory.setEnableGateway(configuration.getEnableGatewayReplication());
+
+    // Add the debug cache listener if necessary
+    if (configuration.getEnableDebugListener()) {
+      requestedFactory.addCacheListener(new DebugCacheListener());
+    }
+
+    if (configuration.getSessionExpirationCacheListener()) {
+      requestedFactory.addCacheListener(new SessionExpirationCacheListener());
+    }
+
+    // Add the cacheWriter if necessary
+    if (configuration.getCacheWriterName() != null) {
+      try {
+        CacheWriter writer = (CacheWriter) Class.forName(configuration.getCacheWriterName()).newInstance();
+        requestedFactory.setCacheWriter(writer);
+      } catch (InstantiationException e) {
+        throw new RuntimeException("Could not set a cacheWriter for the region", e);
+      } catch (IllegalAccessException e) {
+        throw new RuntimeException("Could not set a cacheWriter for the region", e);
+      } catch (ClassNotFoundException e) {
+        throw new RuntimeException("Could not set a cacheWriter for the region", e);
+      }
+    }
+    return requestedFactory.create();
+  }
+
+  private RegionHelper() {
+  }
+
+  public static String getRebalanceResultsMessage(RebalanceResults results) {
+    StringBuilder builder = new StringBuilder();
+    for (PartitionRebalanceInfo rebalanceInfo : results.getPartitionRebalanceDetails()) {
+      // Log the overall results
+      fillInRebalanceResultsSummary(builder, rebalanceInfo);
+
+      // Log the 'Before' results
+      fillInRebalanceResultsMemberDetails(builder, rebalanceInfo.getPartitionMemberDetailsBefore(), "Before");
+
+      // Log the 'After' results
+      fillInRebalanceResultsMemberDetails(builder, rebalanceInfo.getPartitionMemberDetailsAfter(), "After");
+    }
+    return builder.toString();
+  }
+
+  private static void fillInRebalanceResultsSummary(StringBuilder builder, PartitionRebalanceInfo rebalanceInfo) {
+    builder.append("\nRebalanced region ")
+        .append(rebalanceInfo.getRegionPath())
+        .append(" in ")
+        .append(rebalanceInfo.getTime())
+        .append(" ms")
+
+        .append("\nCreated ")
+        .append(rebalanceInfo.getBucketCreatesCompleted())
+        .append(" buckets containing ")
+        .append(rebalanceInfo.getBucketCreateBytes())
+        .append(" bytes in ")
+        .append(rebalanceInfo.getBucketCreateTime())
+        .append(" ms")
+
+        .append("\nTransferred ")
+        .append(rebalanceInfo.getBucketTransfersCompleted())
+        .append(" buckets containing ")
+        .append(rebalanceInfo.getBucketTransferBytes())
+        .append(" bytes in ")
+        .append(rebalanceInfo.getBucketTransferTime())
+        .append(" ms")
+
+        .append("\nTransferred ")
+        .append(rebalanceInfo.getPrimaryTransfersCompleted())
+        .append(" primary buckets in ")
+        .append(rebalanceInfo.getPrimaryTransferTime())
+        .append(" ms");
+  }
+
+  private static void fillInRebalanceResultsMemberDetails(StringBuilder builder, Set<PartitionMemberInfo> memberInfoSet,
+      String when) {
+    builder.append("\nMember Info ").append(when).append(" Rebalance:\n");
+    for (PartitionMemberInfo info : memberInfoSet) {
+      builder.append("\tdistributedMember=")
+          .append(info.getDistributedMember())
+          .append(", configuredMaxMemory=")
+          .append(info.getConfiguredMaxMemory())
+          .append(", size=")
+          .append(info.getSize())
+          .append(", bucketCount=")
+          .append(info.getBucketCount())
+          .append(", primaryCount=")
+          .append(info.getPrimaryCount());
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionSizeFunction.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionSizeFunction.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionSizeFunction.java
new file mode 100644
index 0000000..13791a3
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionSizeFunction.java
@@ -0,0 +1,56 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
+
+import java.util.Properties;
+
+public class RegionSizeFunction implements Function, Declarable {
+
+  private static final long serialVersionUID = -2791590491585777990L;
+
+  public static final String ID = "region-size-function";
+
+  public void execute(FunctionContext context) {
+    RegionFunctionContext rfc = (RegionFunctionContext) context;
+    context.getResultSender().lastResult(rfc.getDataSet().size());
+  }
+
+  public String getId() {
+    return ID;
+  }
+
+  public boolean hasResult() {
+    return true;
+  }
+
+  public boolean optimizeForWrite() {
+    return true;
+  }
+
+  public boolean isHA() {
+    return true;
+  }
+
+  @Override
+  public void init(Properties arg0) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionStatus.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionStatus.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionStatus.java
new file mode 100644
index 0000000..fec1fc1
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/RegionStatus.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.modules.util;
+
+public enum RegionStatus {
+  VALID, INVALID
+}


[13/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ResourceManagerValidator.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ResourceManagerValidator.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ResourceManagerValidator.java
new file mode 100644
index 0000000..c5edeea
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ResourceManagerValidator.java
@@ -0,0 +1,166 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.control.ResourceManager;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class ResourceManagerValidator {
+
+  private static final Pattern DIGIT_PATTERN = Pattern.compile("(\\d+|[^\\d]+)");
+
+  public static void validateJavaStartupParameters(GemFireCache cache) {
+    // Get the input arguments
+    ResourceManager rm = cache.getResourceManager();
+    RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
+    List<String> inputArguments = runtimeBean.getInputArguments();
+    if (cache.getLogger().fineEnabled()) {
+      cache.getLogger().fine("Full input java arguments: " + inputArguments);
+    }
+
+    // Validate the arguments based on VM vendor
+    String vmVendor = runtimeBean.getVmVendor();
+    if (vmVendor.startsWith("Sun") || vmVendor.startsWith("Apple")) {
+      // java.vm.vendor = Sun Microsystems Inc. || java.vm.vendor = Apple Inc.
+      validateSunArguments(cache, rm, inputArguments);
+    } else if (vmVendor.startsWith("IBM")) {
+      // java.vm.vendor = IBM Corporation
+      // TODO validate IBM input arguments
+    } else if (vmVendor.startsWith("BEA")) {
+      // java.vm.vendor = BEA Systems, Inc.
+      // TODO validate JRockit input arguments
+    }
+  }
+
+  private static void validateSunArguments(GemFireCache cache, ResourceManager rm, List<String> inputArguments) {
+    // Retrieve the -Xms, -Xmx, UseConcMarkSweepGC and CMSInitiatingOccupancyFraction arguments
+    String dashXms = null, dashXmx = null, useCMS = null, cmsIOF = null;
+    for (String argument : inputArguments) {
+      if (argument.startsWith("-Xms")) {
+        dashXms = argument;
+      } else if (argument.startsWith("-Xmx")) {
+        dashXmx = argument;
+      } else if (argument.equals("-XX:+UseConcMarkSweepGC")) {
+        useCMS = argument;
+      } else if (argument.startsWith("-XX:CMSInitiatingOccupancyFraction")) {
+        cmsIOF = argument;
+      }
+    }
+    if (cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Relevant input java arguments: ")
+          .append("dashXms=")
+          .append(dashXms)
+          .append("; dashXmx=")
+          .append(dashXmx)
+          .append("; useCMS=")
+          .append(useCMS)
+          .append("; cmsIOF=")
+          .append(cmsIOF);
+      cache.getLogger().fine(builder.toString());
+    }
+
+    // Validate the heap parameters
+    validateJavaHeapParameters(cache, dashXms, dashXmx);
+
+    // Verify CMS is specified
+    verifyCMSGC(cache, useCMS);
+
+    // Verify CMSInitiatingOccupancyFraction is specified
+    verifyCMSInitiatingOccupancyFraction(cache, rm, cmsIOF);
+  }
+
+  private static void validateJavaHeapParameters(GemFireCache cache, String dashXms, String dashXmx) {
+    if (dashXms == null) {
+      cache.getLogger()
+          .warning(
+              "Setting the initial size of the heap (configured using -Xms) is recommended so that GemFire cache eviction is optimal");
+    } else if (dashXmx == null) {
+      cache.getLogger()
+          .warning(
+              "Setting the maximum size of the heap (configured using -Xmx) is recommended so that GemFire cache eviction is optimal");
+    } else {
+      // Neither heap parameter is null. Parse them and verify they are the same.
+      List<String> dashXmsList = splitAtDigits(dashXms);
+      String dashXmsStr = dashXmsList.get(1);
+      List<String> dashXmxList = splitAtDigits(dashXmx);
+      String dashXmxStr = dashXmxList.get(1);
+      if (!dashXmsStr.equals(dashXmxStr)) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("Setting the initial (")
+            .append(dashXmsStr)
+            .append(dashXmsList.get(2))
+            .append(") and maximum (")
+            .append(dashXmxStr)
+            .append(dashXmxList.get(2))
+            .append(") sizes of the heap the same is recommended so that GemFire cache eviction is optimal");
+        cache.getLogger().warning(builder.toString());
+      }
+    }
+  }
+
+  private static void verifyCMSGC(GemFireCache cache, String useCMS) {
+    if (useCMS == null) {
+      cache.getLogger()
+          .warning(
+              "Using the concurrent garbage collector (configured using -XX:+UseConcMarkSweepGC) is recommended so that GemFire cache eviction is optimal");
+    }
+  }
+
+  private static void verifyCMSInitiatingOccupancyFraction(GemFireCache cache, ResourceManager rm, String cmsIOF) {
+    if (cmsIOF == null) {
+      cache.getLogger()
+          .warning(
+              "Setting the CMS initiating occupancy fraction (configured using -XX:CMSInitiatingOccupancyFraction=N) is recommended so that GemFire cache eviction is optimal");
+    } else {
+      // Parse the CMSInitiatingOccupancyFraction. Verify it is less than both eviction and critical thresholds.
+      int cmsIOFVal = Integer.parseInt(cmsIOF.split("=")[1]);
+      float currentEvictionHeapPercentage = rm.getEvictionHeapPercentage();
+      if (currentEvictionHeapPercentage != 0 && currentEvictionHeapPercentage < cmsIOFVal) {
+        cache.getLogger()
+            .warning(
+                "Setting the CMS initiating occupancy fraction (" + cmsIOFVal + ") less than the eviction heap percentage (" + currentEvictionHeapPercentage + ") is recommended so that GemFire cache eviction is optimal");
+      }
+      float currentCriticalHeapPercentage = rm.getCriticalHeapPercentage();
+      if (currentCriticalHeapPercentage != 0 && currentCriticalHeapPercentage < cmsIOFVal) {
+        cache.getLogger()
+            .warning(
+                "Setting the CMS initiating occupancy fraction (" + cmsIOFVal + ") less than the critical heap percentage (" + currentCriticalHeapPercentage + ") is recommended so that GemFire cache eviction is optimal");
+      }
+    }
+  }
+
+  private static List<String> splitAtDigits(String input) {
+    Matcher matcher = DIGIT_PATTERN.matcher(input);
+    List<String> result = new ArrayList<String>();
+    while (matcher.find()) {
+      result.add(matcher.group());
+    }
+    return result;
+  }
+
+  private ResourceManagerValidator() {
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/SessionCustomExpiry.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/SessionCustomExpiry.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/SessionCustomExpiry.java
new file mode 100644
index 0000000..25ee3b1
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/SessionCustomExpiry.java
@@ -0,0 +1,64 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.CustomExpiry;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.ExpirationAction;
+import com.gemstone.gemfire.cache.ExpirationAttributes;
+import com.gemstone.gemfire.cache.Region;
+
+import javax.servlet.http.HttpSession;
+import java.io.Serializable;
+import java.util.Properties;
+
+@SuppressWarnings("serial")
+public class SessionCustomExpiry implements CustomExpiry<String, HttpSession>, Serializable, Declarable {
+
+  private static final long serialVersionUID = 182735509690640051L;
+
+  private static final ExpirationAttributes EXPIRE_NOW = new ExpirationAttributes(1, ExpirationAction.DESTROY);
+
+  public ExpirationAttributes getExpiry(Region.Entry<String, HttpSession> entry) {
+    HttpSession session = entry.getValue();
+    if (session != null) {
+      return new ExpirationAttributes(entry.getValue().getMaxInactiveInterval(), ExpirationAction.DESTROY);
+    } else {
+      return EXPIRE_NOW;
+    }
+  }
+
+  public void close() {
+  }
+
+  public void init(Properties props) {
+  }
+
+  public boolean equals(Object obj) {
+    // This method is only implemented so that RegionCreator.validateRegion works properly.
+    // The EntryIdleTimeout comparison fails because two of these instances are not equal.
+    if (this == obj) {
+      return true;
+    }
+
+    if (obj == null || !(obj instanceof SessionCustomExpiry)) {
+      return false;
+    }
+
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchPartitionedRegionEntriesFunction.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchPartitionedRegionEntriesFunction.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchPartitionedRegionEntriesFunction.java
new file mode 100644
index 0000000..d2b74c8
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchPartitionedRegionEntriesFunction.java
@@ -0,0 +1,100 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
+import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
+
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * Touches the keys contained in the set of keys by performing a get on the partitioned region.
+ *
+ * @author Barry Oglesby
+ */
+public class TouchPartitionedRegionEntriesFunction implements Function, Declarable {
+
+  private static final long serialVersionUID = -3700389655056961153L;
+
+  private final Cache cache;
+
+  public static final String ID = "touch-partitioned-region-entries";
+
+  public TouchPartitionedRegionEntriesFunction() {
+    this(CacheFactory.getAnyInstance());
+  }
+
+  public TouchPartitionedRegionEntriesFunction(Cache cache) {
+    this.cache = cache;
+  }
+
+  @SuppressWarnings("unchecked")
+  public void execute(FunctionContext context) {
+    RegionFunctionContext rfc = (RegionFunctionContext) context;
+    Set<String> keys = (Set<String>) rfc.getFilter();
+
+    // Get local (primary) data for the context
+    Region primaryDataSet = PartitionRegionHelper.getLocalDataForContext(rfc);
+
+    if (this.cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Function ")
+          .append(ID)
+          .append(" received request to touch ")
+          .append(primaryDataSet.getFullPath())
+          .append("->")
+          .append(keys);
+      this.cache.getLogger().fine(builder.toString());
+    }
+
+    // Retrieve each value to update the lastAccessedTime.
+    // Note: getAll is not supported on LocalDataSet.
+    for (String key : keys) {
+      primaryDataSet.get(key);
+    }
+
+    // Return result to get around NPE in LocalResultCollectorImpl
+    context.getResultSender().lastResult(true);
+  }
+
+  public String getId() {
+    return ID;
+  }
+
+  public boolean optimizeForWrite() {
+    return true;
+  }
+
+  public boolean isHA() {
+    return false;
+  }
+
+  public boolean hasResult() {
+    return true;
+  }
+
+  public void init(Properties properties) {
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchReplicatedRegionEntriesFunction.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchReplicatedRegionEntriesFunction.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchReplicatedRegionEntriesFunction.java
new file mode 100644
index 0000000..735c27f
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchReplicatedRegionEntriesFunction.java
@@ -0,0 +1,97 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.util;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * Touches the keys contained in the set of keys by performing a get on the replicated region. This is a non-data-aware
+ * function invoked using onMembers or onServers.
+ *
+ * @author Barry Oglesby
+ */
+public class TouchReplicatedRegionEntriesFunction implements Function, Declarable {
+
+  private static final long serialVersionUID = -7424895036162243564L;
+
+  private final Cache cache;
+
+  public static final String ID = "touch-replicated-region-entries";
+
+  public TouchReplicatedRegionEntriesFunction() {
+    this(CacheFactory.getAnyInstance());
+  }
+
+  public TouchReplicatedRegionEntriesFunction(Cache cache) {
+    this.cache = cache;
+  }
+
+  public void execute(FunctionContext context) {
+    Object[] arguments = (Object[]) context.getArguments();
+    String regionName = (String) arguments[0];
+    Set<String> keys = (Set<String>) arguments[1];
+    if (this.cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Function ")
+          .append(ID)
+          .append(" received request to touch ")
+          .append(regionName)
+          .append("->")
+          .append(keys);
+      this.cache.getLogger().fine(builder.toString());
+    }
+
+    // Retrieve the appropriate Region and value to update the lastAccessedTime
+    Region region = this.cache.getRegion(regionName);
+    if (region != null) {
+      region.getAll(keys);
+    }
+
+    // Return result to get around NPE in LocalResultCollectorImpl
+    context.getResultSender().lastResult(true);
+  }
+
+  public String getId() {
+    return ID;
+  }
+
+  public boolean optimizeForWrite() {
+    return false;
+  }
+
+  public boolean isHA() {
+    return false;
+  }
+
+  public boolean hasResult() {
+    // Setting this to false caused the onServers method to only execute the
+    // function on one server.
+    return true;
+  }
+
+  public void init(Properties properties) {
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/resources/modules-version.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/resources/modules-version.properties b/extensions/gemfire-modules/src/main/resources/modules-version.properties
new file mode 100644
index 0000000..7a73b41
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/resources/modules-version.properties
@@ -0,0 +1 @@
+version = @VERSION@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Callback.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Callback.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Callback.java
new file mode 100644
index 0000000..12e935d
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Callback.java
@@ -0,0 +1,30 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * Interface which, when implemented, can be put into a servlet context and executed by the servlet.
+ */
+public interface Callback {
+
+  public void call(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/CommandServlet.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/CommandServlet.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/CommandServlet.java
new file mode 100644
index 0000000..32ac7d8
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/CommandServlet.java
@@ -0,0 +1,91 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ *
+ */
+public class CommandServlet extends HttpServlet {
+
+  private ServletContext context;
+
+  /**
+   * The standard servlet method overridden.
+   *
+   * @param request
+   * @param response
+   * @throws IOException
+   */
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+
+    QueryCommand cmd = QueryCommand.UNKNOWN;
+    String param = request.getParameter("param");
+    String value = request.getParameter("value");
+    PrintWriter out = response.getWriter();
+
+    String cmdStr = request.getParameter("cmd");
+    if (cmdStr != null) {
+      cmd = QueryCommand.valueOf(cmdStr);
+    }
+
+    HttpSession session;
+
+    switch (cmd) {
+      case SET:
+        session = request.getSession();
+        session.setAttribute(param, value);
+        break;
+      case GET:
+        session = request.getSession();
+        String val = (String) session.getAttribute(param);
+        if (val != null) {
+          out.write(val);
+        }
+        break;
+      case INVALIDATE:
+        session = request.getSession();
+        session.invalidate();
+        break;
+      case CALLBACK:
+        Callback c = (Callback) context.getAttribute("callback");
+        c.call(request, response);
+        break;
+    }
+  }
+
+  /**
+   * Save a reference to the ServletContext for later use.
+   *
+   * @param config
+   */
+  @Override
+  public void init(ServletConfig config) {
+    this.context = config.getServletContext();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
new file mode 100644
index 0000000..f3927a8
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
@@ -0,0 +1,62 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.gemstone.gemfire.modules.session;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import junit.framework.TestCase;
+
+/**
+ *
+ */
+public class DualCacheTest extends TestCase {
+
+  /**
+   * Check that our session persists. The values we pass in as query params are used to set attributes on the session.
+   */
+  public void testSessionFailover() throws Exception {
+    String key = "value_testSessionFailover";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req1 = new GetMethodWebRequest("http://localhost:7890/test");
+    req1.setParameter("cmd", QueryCommand.SET.name());
+    req1.setParameter("param", key);
+    req1.setParameter("value", value);
+    WebResponse response = wc.getResponse(req1);
+    String sessionId = response.getNewCookieValue("JSESSIONID");
+
+    assertNotNull("No apparent session cookie", sessionId);
+
+    WebRequest req2 = new GetMethodWebRequest("http://localhost:7891/test");
+    req2.setHeaderField("Cookie", "JSESSIONID=" + sessionId);
+    req2.setParameter("cmd", QueryCommand.GET.name());
+    req2.setParameter("param", key);
+    response = wc.getResponse(req2);
+    sessionId = response.getNewCookieValue("JSESSIONID");
+
+    assertEquals(value, response.getText());
+    assertTrue("The sessionId does not contain the correct JVM route value", sessionId.contains("JVM-2"));
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/EmbeddedTomcat.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/EmbeddedTomcat.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/EmbeddedTomcat.java
new file mode 100644
index 0000000..53a305e
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/EmbeddedTomcat.java
@@ -0,0 +1,193 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import com.gemstone.gemfire.modules.session.catalina.JvmRouteBinderValve;
+import org.apache.catalina.Context;
+import org.apache.catalina.Engine;
+import org.apache.catalina.Host;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Valve;
+import org.apache.catalina.connector.Connector;
+import org.apache.catalina.core.StandardEngine;
+import org.apache.catalina.core.StandardService;
+import org.apache.catalina.core.StandardWrapper;
+import org.apache.catalina.loader.WebappLoader;
+import org.apache.catalina.realm.MemoryRealm;
+import org.apache.catalina.startup.Embedded;
+import org.apache.catalina.valves.ValveBase;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
+import javax.servlet.ServletException;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+
+/**
+ *
+ */
+public class EmbeddedTomcat {
+
+  private String contextPath = null;
+  private Embedded container = null;
+  private Log logger = LogFactory.getLog(getClass());
+
+  /**
+   * The directory to create the Tomcat server configuration under.
+   */
+  private String catalinaHome = "tomcat";
+
+  /**
+   * The port to run the Tomcat server on.
+   */
+  private int port = 8089;
+
+  /**
+   * The classes directory for the web application being run.
+   */
+  private String classesDir = "target/classes";
+
+  private Context rootContext = null;
+
+  private Engine engine;
+
+  /**
+   * The web resources directory for the web application being run.
+   */
+  private String webappDir = "";
+
+  public EmbeddedTomcat(String contextPath, int port, String jvmRoute) throws MalformedURLException {
+    this.contextPath = contextPath;
+    this.port = port;
+
+    // create server
+    container = new Embedded();
+    container.setCatalinaHome(catalinaHome);
+    // Not really necessasry, but let's still do it...
+    container.setRealm(new MemoryRealm());
+
+    // create webapp loader
+    WebappLoader loader = new WebappLoader(this.getClass().getClassLoader());
+    if (classesDir != null) {
+      loader.addRepository(new File(classesDir).toURI().toURL().toString());
+    }
+
+    rootContext = container.createContext("", webappDir);
+    rootContext.setLoader(loader);
+    rootContext.setReloadable(true);
+    // Otherwise we get NPE when instantiating servlets
+    rootContext.setIgnoreAnnotations(true);
+
+    // create host
+    Host localHost = container.createHost("127.0.0.1", new File("").getAbsolutePath());
+    localHost.addChild(rootContext);
+
+    localHost.setDeployOnStartup(true);
+
+    // create engine
+    engine = container.createEngine();
+    engine.setName("localEngine");
+    engine.addChild(localHost);
+    engine.setDefaultHost(localHost.getName());
+    engine.setJvmRoute(jvmRoute);
+    engine.setService(new StandardService());
+    container.addEngine(engine);
+
+    // create http connector
+    Connector httpConnector = container.createConnector((InetAddress) null, port, false);
+    container.addConnector(httpConnector);
+    container.setAwait(true);
+
+    // Create the JVMRoute valve for session failover
+    ValveBase valve = new JvmRouteBinderValve();
+    ((StandardEngine) engine).addValve(valve);
+  }
+
+  /**
+   * Starts the embedded Tomcat server.
+   */
+  public void startContainer() throws LifecycleException {
+    // start server
+    container.start();
+
+    // add shutdown hook to stop server
+    Runtime.getRuntime().addShutdownHook(new Thread() {
+      @Override
+      public void run() {
+        stopContainer();
+      }
+    });
+  }
+
+  /**
+   * Stops the embedded Tomcat server.
+   */
+  public void stopContainer() {
+    try {
+      if (container != null) {
+        container.stop();
+        logger.info("Stopped container");
+      }
+    } catch (LifecycleException exception) {
+      logger.warn("Cannot Stop Tomcat" + exception.getMessage());
+    }
+  }
+
+  public StandardWrapper addServlet(String path, String name, String clazz) throws ServletException {
+    StandardWrapper servlet = (StandardWrapper) rootContext.createWrapper();
+    servlet.setName(name);
+    servlet.setServletClass(clazz);
+    servlet.setLoadOnStartup(1);
+
+    rootContext.addChild(servlet);
+    rootContext.addServletMapping(path, name);
+
+    servlet.setParent(rootContext);
+//        servlet.load();
+
+    return servlet;
+  }
+
+  public Embedded getEmbedded() {
+    return container;
+  }
+
+  public Context getRootContext() {
+    return rootContext;
+  }
+
+  public String getPath() {
+    return contextPath;
+  }
+
+  public void setPath(String path) {
+    this.contextPath = path;
+  }
+
+  public int getPort() {
+    return port;
+  }
+
+  public void addValve(Valve valve) {
+    ((StandardEngine) engine).addValve(valve);
+  }
+
+  public void removeValve(Valve valve) {
+    ((StandardEngine) engine).removeValve(valve);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/QueryCommand.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/QueryCommand.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/QueryCommand.java
new file mode 100644
index 0000000..a891c5a
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/QueryCommand.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.modules.session;
+
+/**
+ * Basic commands to pass to our test servlet
+ */
+public enum QueryCommand {
+
+  SET,
+
+  GET,
+
+  INVALIDATE,
+
+  CALLBACK,
+
+  UNKNOWN;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
new file mode 100644
index 0000000..4b7ab87
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
@@ -0,0 +1,489 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
+import com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener;
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import org.apache.catalina.core.StandardWrapper;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.beans.PropertyChangeEvent;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import static junit.framework.Assert.*;
+
+/**
+ *
+ */
+public abstract class TestSessionsBase {
+  private static EmbeddedTomcat server;
+
+  private static Region<String, HttpSession> region;
+
+  private static StandardWrapper servlet;
+
+  private static DeltaSessionManager sessionManager;
+
+  // Set up the servers we need
+  public static void setupServer(DeltaSessionManager manager) throws Exception {
+    server = new EmbeddedTomcat("/test", 7890, "JVM-1");
+
+    PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
+    p2pListener.setProperty("mcast-port", "0");
+    p2pListener.setProperty("log-level", "config");
+    server.getEmbedded().addLifecycleListener(p2pListener);
+    sessionManager = manager;
+    sessionManager.setEnableCommitValve(true);
+    server.getRootContext().setManager(sessionManager);
+
+    servlet = server.addServlet("/test/*", "default", CommandServlet.class.getName());
+    server.startContainer();
+
+    /**
+     * Can only retrieve the region once the container has started up
+     * (and the cache has started too).
+     */
+    region = sessionManager.getSessionCache().getSessionRegion();
+  }
+
+  @AfterClass
+  public static void teardownClass() throws Exception {
+    server.stopContainer();
+  }
+
+  /**
+   * Reset some data
+   */
+  @Before
+  public void setup() throws Exception {
+    sessionManager.setMaxInactiveInterval(30);
+    region.clear();
+  }
+
+  /**
+   * Check that the basics are working
+   */
+  @Test
+  public void testSanity() throws Exception {
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    req.setParameter("cmd", QueryCommand.GET.name());
+    req.setParameter("param", "null");
+    WebResponse response = wc.getResponse(req);
+
+    assertEquals("JSESSIONID", response.getNewCookieNames()[0]);
+  }
+
+  /**
+   * Test callback functionality. This is here really just as an example. Callbacks are useful to implement per test
+   * actions which can be defined within the actual test method instead of in a separate servlet class.
+   */
+  @Test
+  public void testCallback() throws Exception {
+    final String helloWorld = "Hello World";
+    Callback c = new Callback() {
+
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        PrintWriter out = response.getWriter();
+        out.write(helloWorld);
+      }
+    };
+    servlet.getServletContext().setAttribute("callback", c);
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    req.setParameter("cmd", QueryCommand.CALLBACK.name());
+    req.setParameter("param", "callback");
+    WebResponse response = wc.getResponse(req);
+
+    assertEquals(helloWorld, response.getText());
+  }
+
+  /**
+   * Test that calling session.isNew() works for the initial as well as subsequent requests.
+   */
+  @Test
+  public void testIsNew() throws Exception {
+    Callback c = new Callback() {
+
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        response.getWriter().write(Boolean.toString(session.isNew()));
+      }
+    };
+    servlet.getServletContext().setAttribute("callback", c);
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    req.setParameter("cmd", QueryCommand.CALLBACK.name());
+    req.setParameter("param", "callback");
+    WebResponse response = wc.getResponse(req);
+
+    assertEquals("true", response.getText());
+    response = wc.getResponse(req);
+
+    assertEquals("false", response.getText());
+  }
+
+  /**
+   * Check that our session persists. The values we pass in as query params are used to set attributes on the session.
+   */
+  @Test
+  public void testSessionPersists1() throws Exception {
+    String key = "value_testSessionPersists1";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    req.setParameter("cmd", QueryCommand.SET.name());
+    req.setParameter("param", key);
+    req.setParameter("value", value);
+    WebResponse response = wc.getResponse(req);
+    String sessionId = response.getNewCookieValue("JSESSIONID");
+
+    assertNotNull("No apparent session cookie", sessionId);
+
+    // The request retains the cookie from the prior response...
+    req.setParameter("cmd", QueryCommand.GET.name());
+    req.setParameter("param", key);
+    req.removeParameter("value");
+    response = wc.getResponse(req);
+
+    assertEquals(value, response.getText());
+  }
+
+  /**
+   * Check that our session persists beyond the container restarting.
+   */
+//    public void testSessionPersists2() throws Exception {
+//        String key = "value_testSessionPersists2";
+//        String value = "Foo";
+//
+//        WebConversation wc = new WebConversation();
+//        WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+//        req.setParameter("cmd", QueryCommand.SET.name());
+//        req.setParameter("param", key);
+//        req.setParameter("value", value);
+//        WebResponse response = wc.getResponse(req);
+//        String sessionId = response.getNewCookieValue("JSESSIONID");
+//
+//        assertNotNull("No apparent session cookie", sessionId);
+//
+//        // Restart the container
+//        AllTests.teardownClass();
+//        AllTests.setupClass();
+//
+//        // The request retains the cookie from the prior response...
+//        req.setParameter("cmd", QueryCommand.GET.name());
+//        req.setParameter("param", key);
+//        req.removeParameter("value");
+//        response = wc.getResponse(req);
+//
+//        assertEquals(value, response.getText());
+//    }
+
+  /**
+   * Test that invalidating a session makes it's attributes inaccessible.
+   */
+  @Test
+  public void testInvalidate() throws Exception {
+    String key = "value_testInvalidate";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Set an attribute
+    req.setParameter("cmd", QueryCommand.SET.name());
+    req.setParameter("param", key);
+    req.setParameter("value", value);
+    WebResponse response = wc.getResponse(req);
+
+    // Invalidate the session
+    req.removeParameter("param");
+    req.removeParameter("value");
+    req.setParameter("cmd", QueryCommand.INVALIDATE.name());
+    wc.getResponse(req);
+
+    // The attribute should not be accessible now...
+    req.setParameter("cmd", QueryCommand.GET.name());
+    req.setParameter("param", key);
+    response = wc.getResponse(req);
+
+    assertEquals("", response.getText());
+  }
+
+  /**
+   * Test setting the session expiration
+   */
+  @Test
+  public void testSessionExpiration1() throws Exception {
+    // TestSessions only live for a second
+    sessionManager.setMaxInactiveInterval(1);
+
+    String key = "value_testSessionExpiration1";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Set an attribute
+    req.setParameter("cmd", QueryCommand.SET.name());
+    req.setParameter("param", key);
+    req.setParameter("value", value);
+    WebResponse response = wc.getResponse(req);
+
+    // Sleep a while
+    Thread.sleep(2000);
+
+    // The attribute should not be accessible now...
+    req.setParameter("cmd", QueryCommand.GET.name());
+    req.setParameter("param", key);
+    response = wc.getResponse(req);
+
+    assertEquals("", response.getText());
+  }
+
+  /**
+   * Test setting the session expiration via a property change as would happen under normal deployment conditions.
+   */
+  @Test
+  public void testSessionExpiration2() throws Exception {
+    // TestSessions only live for a minute
+    sessionManager.propertyChange(
+        new PropertyChangeEvent(server.getRootContext(), "sessionTimeout", new Integer(30), new Integer(1)));
+
+    // Check that the value has been set to 60 seconds
+    assertEquals(60, sessionManager.getMaxInactiveInterval());
+  }
+
+  /**
+   * Test that removing a session attribute also removes it from the region
+   */
+  @Test
+  public void testRemoveAttribute() throws Exception {
+    String key = "value_testRemoveAttribute";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Set an attribute
+    req.setParameter("cmd", QueryCommand.SET.name());
+    req.setParameter("param", key);
+    req.setParameter("value", value);
+    WebResponse response = wc.getResponse(req);
+    String sessionId = response.getNewCookieValue("JSESSIONID");
+
+    // Implicitly remove the attribute
+    req.removeParameter("value");
+    wc.getResponse(req);
+
+    // The attribute should not be accessible now...
+    req.setParameter("cmd", QueryCommand.GET.name());
+    req.setParameter("param", key);
+    response = wc.getResponse(req);
+
+    assertEquals("", response.getText());
+    assertNull(region.get(sessionId).getAttribute(key));
+  }
+
+  /**
+   * Test that a session attribute gets set into the region too.
+   */
+  @Test
+  public void testBasicRegion() throws Exception {
+    String key = "value_testBasicRegion";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Set an attribute
+    req.setParameter("cmd", QueryCommand.SET.name());
+    req.setParameter("param", key);
+    req.setParameter("value", value);
+    WebResponse response = wc.getResponse(req);
+    String sessionId = response.getNewCookieValue("JSESSIONID");
+
+    assertEquals(value, region.get(sessionId).getAttribute(key));
+  }
+
+  /**
+   * Test that a session attribute gets removed from the region when the session is invalidated.
+   */
+  @Test
+  public void testRegionInvalidate() throws Exception {
+    String key = "value_testRegionInvalidate";
+    String value = "Foo";
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Set an attribute
+    req.setParameter("cmd", QueryCommand.SET.name());
+    req.setParameter("param", key);
+    req.setParameter("value", value);
+    WebResponse response = wc.getResponse(req);
+    String sessionId = response.getNewCookieValue("JSESSIONID");
+
+    // Invalidate the session
+    req.removeParameter("param");
+    req.removeParameter("value");
+    req.setParameter("cmd", QueryCommand.INVALIDATE.name());
+    wc.getResponse(req);
+
+    assertNull("The region should not have an entry for this session", region.get(sessionId));
+  }
+
+  /**
+   * Test that multiple attribute updates, within the same request result in only the latest one being effective.
+   */
+  @Test
+  public void testMultipleAttributeUpdates() throws Exception {
+    final String key = "value_testMultipleAttributeUpdates";
+    Callback c = new Callback() {
+
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        for (int i = 0; i < 1000; i++) {
+          session.setAttribute(key, Integer.toString(i));
+        }
+      }
+    };
+    servlet.getServletContext().setAttribute("callback", c);
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Execute the callback
+    req.setParameter("cmd", QueryCommand.CALLBACK.name());
+    req.setParameter("param", "callback");
+    WebResponse response = wc.getResponse(req);
+
+    String sessionId = response.getNewCookieValue("JSESSIONID");
+
+    assertEquals("999", region.get(sessionId).getAttribute(key));
+  }
+
+  /*
+   * Test for issue #38 CommitSessionValve throws exception on invalidated sessions
+   */
+  @Test
+  public void testCommitSessionValveInvalidSession() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        session.invalidate();
+        response.getWriter().write("done");
+      }
+    };
+    servlet.getServletContext().setAttribute("callback", c);
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Execute the callback
+    req.setParameter("cmd", QueryCommand.CALLBACK.name());
+    req.setParameter("param", "callback");
+    WebResponse response = wc.getResponse(req);
+
+    assertEquals("done", response.getText());
+  }
+
+  /**
+   * Test for issue #45 Sessions are being created for every request
+   */
+  @Test
+  public void testExtraSessionsNotCreated() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        // Do nothing with sessions
+        response.getWriter().write("done");
+      }
+    };
+    servlet.getServletContext().setAttribute("callback", c);
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Execute the callback
+    req.setParameter("cmd", QueryCommand.CALLBACK.name());
+    req.setParameter("param", "callback");
+    WebResponse response = wc.getResponse(req);
+
+    assertEquals("done", response.getText());
+    assertEquals("The region should be empty", 0, region.size());
+  }
+
+  /**
+   * Test for issue #46 lastAccessedTime is not updated at the start of the request, but only at the end.
+   */
+  @Test
+  public void testLastAccessedTime() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        // Hack to expose the session to our test context
+        session.getServletContext().setAttribute("session", session);
+        session.setAttribute("lastAccessTime", session.getLastAccessedTime());
+        try {
+          Thread.sleep(100);
+        } catch (InterruptedException ex) {
+        }
+        session.setAttribute("somethingElse", 1);
+        request.getSession();
+        response.getWriter().write("done");
+      }
+    };
+    servlet.getServletContext().setAttribute("callback", c);
+
+    WebConversation wc = new WebConversation();
+    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+
+    // Execute the callback
+    req.setParameter("cmd", QueryCommand.CALLBACK.name());
+    req.setParameter("param", "callback");
+    WebResponse response = wc.getResponse(req);
+
+    HttpSession session = (HttpSession) servlet.getServletContext().getAttribute("session");
+    Long lastAccess = (Long) session.getAttribute("lastAccessTime");
+
+    assertTrue(
+        "Last access time not set correctly: " + lastAccess.longValue() + " not <= " + session.getLastAccessedTime(),
+        lastAccess.longValue() <= session.getLastAccessedTime());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
new file mode 100644
index 0000000..0ce73ae
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
@@ -0,0 +1,35 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+/**
+ * @author Jens Deppe
+ */
+@Category(UnitTest.class)
+public class Tomcat6SessionsJUnitTest extends TestSessionsBase {
+
+  // Set up the session manager we need
+  @BeforeClass
+  public static void setupClass() throws Exception {
+    setupServer(new Tomcat6DeltaSessionManager());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml b/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
new file mode 100644
index 0000000..17faf29
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="com.gemstone.gemfire.modules">
+	<class name="Event" table="EVENTS">
+		<cache usage="read-write"/>
+		<id name="id" column="EVENT_ID">
+			<generator class="native"/>
+		</id>
+		<version name="version"/>
+		<property name="date" type="timestamp" column="EVENT_DATE"/>
+        <property name="title"/>
+	</class>
+</hibernate-mapping>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml b/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
new file mode 100644
index 0000000..c6380e7
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="com.gemstone.gemfire.modules">
+    <class name="Person" table="PERSON">
+        <cache usage="read-write"/>
+        <id name="id" column="PERSON_ID">
+            <generator class="native"/>
+        </id>
+        <property name="age"/>
+        <property name="firstname"/>
+        <property name="lastname"/>
+        <set name="e" table="PERSON_EVENT">
+          <cache usage="read-write"/>
+          <key column="PERSON_ID"/>
+          <many-to-many column="EVENT_ID" class="Event"/>
+        </set>
+    </class>
+</hibernate-mapping>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/resources/log4j.properties b/extensions/gemfire-modules/src/test/resources/log4j.properties
new file mode 100644
index 0000000..c136990
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/resources/log4j.properties
@@ -0,0 +1,16 @@
+# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
+# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
+#log4j.rootLogger=DEBUG, stdout, logfile
+log4j.rootLogger=DEBUG, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
+
+#log4j.appender.logfile=org.apache.log4j.RollingFileAppender
+#log4j.appender.logfile.MaxFileSize=512KB
+## Keep three backup files.
+#log4j.appender.logfile.MaxBackupIndex=3
+## Pattern to output: date priority [category] - message
+#log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
+#log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/resources/tomcat/conf/tomcat-users.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/resources/tomcat/conf/tomcat-users.xml b/extensions/gemfire-modules/src/test/resources/tomcat/conf/tomcat-users.xml
new file mode 100644
index 0000000..6c9f217
--- /dev/null
+++ b/extensions/gemfire-modules/src/test/resources/tomcat/conf/tomcat-users.xml
@@ -0,0 +1,3 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+</tomcat-users>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/resources/tomcat/logs/.gitkeep
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/resources/tomcat/logs/.gitkeep b/extensions/gemfire-modules/src/test/resources/tomcat/logs/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/test/resources/tomcat/temp/.gitkeep
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/resources/tomcat/temp/.gitkeep b/extensions/gemfire-modules/src/test/resources/tomcat/temp/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 6ca47f2..f4616be 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -39,6 +39,7 @@ guava.version = 15.0
 hadoop.version = 2.4.1
 hamcrest-all.version = 1.3
 hbase.version = 0.94.27
+httpunit.version = 1.7.2
 jackson.version = 2.2.0
 jackson-module-scala_2.10.version = 2.1.5
 jansi.version = 1.8
@@ -80,3 +81,5 @@ swagger.version = 1.3.2
 swagger-springmvc.version = 0.8.2
 system-rules.version = 1.15.0
 tempus-fugit.version = 1.1
+tomcat6.version = 6.0.37
+tomcat7.version = 7.0.30

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/gradle/rat.gradle
----------------------------------------------------------------------
diff --git a/gradle/rat.gradle b/gradle/rat.gradle
index d66f9bb..f782665 100644
--- a/gradle/rat.gradle
+++ b/gradle/rat.gradle
@@ -25,6 +25,7 @@ rat {
     // git
     '.git/**',
     '**/.gitignore',
+    '**/.gitkeep',
 
     // gradle
     '**/.gradle/**',
@@ -45,6 +46,8 @@ rat {
     '**/.settings/**',
     '**/build-eclipse/**',
     '**/*.iml',
+    '**/*.ipr',
+    '**/*.iws',
     '.idea/**',
     '**/tags',
 
@@ -79,7 +82,17 @@ rat {
     // other text files
     'gemfire-spark-connector/project/plugins.sbt',
     'gemfire-spark-connector/project/build.properties',
-    '**/log4j2*.xml',
+    '**/log4j*.xml',
+
+    // modules
+    'extensions/**/log4j.properties',
+    'extensions/**/tomcat-users.xml',
+    'extensions/gemfire-modules-assembly/release/tcserver/**',
+    'extensions/gemfire-modules-assembly/release/**/setenv.properties',
+    'extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/LocalStrings.properties',
+    'extensions/gemfire-modules/src/main/resources/modules-version.properties',
+    'extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml',
+    'extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml',
 
     // these are test files that don't expect the first element to be a comment
     'gemfire-core/src/test/resources/com/gemstone/gemfire/management/internal/configuration/domain/CacheElementJUnitTest.xml',

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 0e03868..8962b45 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -29,6 +29,11 @@ include 'gemfire-rebalancer'
 include 'gemfire-lucene'
 include 'gemfire-wan'
 include 'gemfire-cq'
+include 'extensions/gemfire-modules'
+include 'extensions/gemfire-modules-tomcat7'
+include 'extensions/gemfire-modules-hibernate'
+include 'extensions/gemfire-modules-session'
+include 'extensions/gemfire-modules-assembly'
 
 def minimumGradleVersion = '2.3'
 if (GradleVersion.current() < GradleVersion.version(minimumGradleVersion)) {


[12/50] [abbrv] incubator-geode git commit: Fix version whitespace

Posted by kl...@apache.org.
Fix version whitespace


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c8251f82
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c8251f82
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c8251f82

Branch: refs/heads/feature/GEODE-268
Commit: c8251f823cc651ac8935f2b1bc4e6f2eb8add9c9
Parents: 98e29ee
Author: Anthony Baker <ab...@apache.org>
Authored: Sat Feb 6 21:54:01 2016 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Sat Feb 6 21:54:01 2016 -0800

----------------------------------------------------------------------
 gradle.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8251f82/gradle.properties
----------------------------------------------------------------------
diff --git a/gradle.properties b/gradle.properties
index 13d4839..6741627 100755
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,7 +18,7 @@
 # RC? - Release candidate
 # RELEASE - Final build
 versionNumber = 1.0.0-incubating
-releaseType = SNAPSHOT 
+releaseType = SNAPSHOT
 
 org.gradle.daemon = true
 org.gradle.jvmargs = -Xmx2048m


[22/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
new file mode 100644
index 0000000..f109d82
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
@@ -0,0 +1,21 @@
+cache.configuration.file=Please enter the name of the GemFire cache configuration file. Default '${default}':
+critical.heap.percentage=Please enter the percentage of heap at which updates to the cache are refused. 0.0 means disabled. Default '${default}':
+enable.debug.listener=Please specify whether to enable a GemFire listener that logs session create, update, destroy and expiration events. Default '${default}':
+enable.gateway.replication=Please specify whether session modifications should be replicated across the WAN. Default '${default}':
+enable.local.cache=Please specify whether to maintain a local GemFire cache. Default '${default}':
+enable.commit.valve=Please specify whether to commit sessions once per request. Default '${default}':
+prefer.deserialized.form=Please specify whether to prefer keeping attributes in deserialized form. Default '${default}':
+eviction.heap.percentage=Please enter the percentage of heap at which sessions will be evicted from the local cache. Default '${default}':
+locators=Please enter the list of locators used by GemFire members to discover each other. The format is a comma-separated list of host[port]. Default '${default}':
+log.file=Please enter the name of the file used to log GemFire messages. Default '${default}':
+multicast.discovery.port=Please enter the port used by GemFire members to discover each other using multicast networking. Default '${default}':
+multicast.discovery.address=Please enter the address used by GemFire members to discover each other using multicast networking. Default '${default}':
+rebalance=Please specify whether to rebalance the GemFire cache at startup. Default '${default}':
+region.attributes.id=Please enter the id of the attributes of the GemFire region used to cache sessions. Default '${default}':
+region.name=Please enter the name of the GemFire region used to cache sessions. Default '${default}':
+statistic.archive.file=Please enter the name of the file used to store GemFire statistics. Default '${default}':
+statistic.sampling.enabled=Please specify whether GemFire statistic sampling should be enabled. Default '${default}':
+initial.vm.heap.size.mb=Please specify the initial VM heap size in MB (-Xms). Default '${default}':
+maximum.vm.heap.size.mb=Please specify the maximum VM heap size in MB (-Xmx). Default '${default}':
+cms.initiating.heap.percentage=Please specify the percentage of VM heap utilization before a concurrent collection is initiated (--XX:CMSInitiatingOccupancyFraction [Hotspot-only]). Default '${default}':
+tomcat.version=Please enter the major version of Tomcat you will be using (6, 7 or 8). Default '${default}':

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/context-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/context-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/context-fragment.xml
new file mode 100644
index 0000000..2b3d25c
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/context-fragment.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+
+    <add:Manager className="com.gemstone.gemfire.modules.session.catalina.Tomcat6DeltaSessionManager"
+      enableDebugListener="${enable.debug.listener:false}"
+      enableGatewayReplication="${enable.gateway.replication:false}"
+      enableLocalCache="${enable.local.cache:false}"
+      enableCommitValve="${enable.commit.valve:true}"
+      preferDeserializedForm="${prefer.deserialized.form:true}"
+      regionAttributesId="${region.attributes.id:REPLICATE}"
+      regionName="${region.name:gemfire_modules_sessions}"/>
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/modules.env
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/modules.env b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/modules.env
new file mode 100644
index 0000000..9c4c00a
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/modules.env
@@ -0,0 +1 @@
+TOMCAT_MAJOR_VER=6

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
new file mode 100644
index 0000000..d1983c0
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='utf-8'?>
+<Server>
+
+    <add:Listener className="com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener"
+      cache-xml-file="${cache.configuration.file:cache-peer.xml}"
+      criticalHeapPercentage="${critical.heap.percentage:0.0}"
+      evictionHeapPercentage="${eviction.heap.percentage:80.0}"
+      locators="${locators: }"
+      log-file="${log.file:gemfire_modules.log}"
+      mcast-port="${multicast.discovery.port:10334}"
+      mcast-address="${multicast.discovery.address:239.192.81.1}"
+      rebalance="${rebalance:false}"
+      statistic-archive-file="${statistic.archive.file:gemfire_modules.gfs}"
+      statistic-sampling-enabled="${statistic.sampling.enabled:false}"/>
+
+</Server>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/tomcat/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tomcat/readme.txt b/extensions/gemfire-modules-assembly/release/tomcat/readme.txt
new file mode 100644
index 0000000..4830780
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/tomcat/readme.txt
@@ -0,0 +1,14 @@
+Pivotal(TM) GemFire(R) HTTP Session Management Module @VERSION@ for Tomcat
+
+This module provides fast, scalable, and reliable HTTP session replication for Apache Tomcat.
+
+Access all Pivotal GemFire Documentation at:
+http://gemfire.docs.pivotal.io
+
+Pivotal Support Services can be accessed from the Pivotal or VMware website.
+Access varies by license type, support offering (contract or per-incident) and 
+product. Please see the Pivotal page at http://www.pivotal.io/support or to 
+file a VMware Support Request, please see the VMware page at 
+https://www.vmware.com/support/policies/howto.html for information on "How to 
+File a Support Request."
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/build.gradle b/extensions/gemfire-modules-hibernate/build.gradle
new file mode 100644
index 0000000..928e8bf
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/build.gradle
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+jar {
+  baseName = 'gemfire-modules-hibernate'
+}
+
+dependencies {
+  compile project(':extensions/gemfire-modules')
+  compile 'org.hibernate:hibernate-core:3.5.0-Final'
+  compile 'org.hibernate:hibernate-annotations:3.5.5-Final'
+  compile 'javax.persistence:persistence-api:1.0.2'
+
+  runtime 'dom4j:dom4j:1.6.1'
+
+  testRuntime 'org.hibernate:hibernate-annotations:3.5.5-Final'
+  testRuntime 'org.slf4j:slf4j-jdk14:1.7.7'
+  testRuntime 'org.hsqldb:hsqldb:2.0.0'
+  testRuntime 'org.javassist:javassist:3.13.0-GA'
+
+  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java
new file mode 100644
index 0000000..55b824c
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java
@@ -0,0 +1,58 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate;
+
+import java.io.Serializable;
+
+import org.hibernate.HibernateException;
+
+/**
+ * Extends {@link org.hibernate.type.EnumType} so as to
+ * override methods responsible for cached representation
+ * of enums in hibernate.
+ * This class must be used in place of {@link org.hibernate.type.EnumType}
+ * in client-server topology when the application classes are
+ * not available on the server.
+ * e.g. a typical enum configuration should look like this:
+ * <pre>
+ * &lt;property name="myEnum"&gt;
+ *   &lt;type name="<b>com.gemstone.gemfire.modules.hibernate.EnumType</b>"&gt;
+ *     &lt;param name="enumClass"&gt;com.mycompany.MyEntity$MyEnum&lt;/param&gt;
+ *     &lt;param name="type"&gt;12&lt;/param&gt;
+ *   &lt;/type&gt;
+ * &lt;/property&gt;
+ * </pre>
+ * @author sbawaska
+ */
+public class EnumType extends org.hibernate.type.EnumType {
+
+  private static final long serialVersionUID = 3414902482639744676L;
+  
+  @Override
+  public Object assemble(Serializable cached, Object owner)
+      throws HibernateException {
+    String name = (String) cached;
+    Class<? extends Enum> clazz = returnedClass();
+    return Enum.valueOf(clazz, name);
+  }
+  
+  @Override
+  public Serializable disassemble(Object value) throws HibernateException {
+    return ((Enum)value).name();
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java
new file mode 100644
index 0000000..7548061
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java
@@ -0,0 +1,238 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate;
+
+import java.util.Map;
+
+import org.hibernate.cache.Cache;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.Timestamper;
+
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.distributed.DistributedLockService;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+
+public class GemFireCache implements Cache {
+  private Region region;
+
+  private boolean clientRegion = false;
+
+  private final DistributedLockService distributedLockService;
+
+  public GemFireCache(Region region, DistributedLockService lockService) {
+    this.region = region;
+    this.distributedLockService = lockService;
+    this.clientRegion = isClient(region);
+  }
+
+  private boolean isClient(Region region) {
+    return region.getAttributes().getPoolName() != null;
+  }
+
+  /**
+   * Clear the cache
+   */
+  public void clear() throws CacheException {
+    GemFireCacheProvider.getLogger().info("GemFireCache: clear called");
+    region.clear();
+  }
+
+  /**
+   * Clean up
+   */
+  public void destroy() throws CacheException {
+    GemFireCacheProvider.getLogger().info("GemFireCache: destroy called");
+    region.localDestroyRegion();
+  }
+
+  /**
+   * Get an item from the cache
+   * 
+   * @param key
+   * @return the cached object or <tt>null</tt>
+   * @throws CacheException
+   */
+  public Object get(Object key) throws CacheException {
+    GemFireCacheProvider.getLogger().debug(
+        "GemFireCache: get called for: " + key);
+    try {
+      Object value = region.get(key);
+      GemFireCacheProvider.getLogger().debug(
+          "GemFireCache: retrieved: " + key + "-->" + value);
+      return value;
+    }
+    catch (com.gemstone.gemfire.cache.CacheException e) {
+      throw new CacheException(e);
+    }
+  }
+
+  /**
+   * The count of entries currently contained in the regions in-memory store.
+   * 
+   * @return The count of entries in memory; -1 if unknown or unsupported.
+   */
+  public long getElementCountInMemory() {
+    return ((LocalRegion)region).entryCount();
+  }
+
+  /**
+   * The count of entries currently contained in the regions disk store.
+   * 
+   * @return The count of entries on disk; -1 if unknown or unsupported.
+   */
+  public long getElementCountOnDisk() {
+    return -1;
+  }
+
+  /**
+   * Get the name of the cache region
+   */
+  public String getRegionName() {
+    return region.getName();
+  }
+
+  /**
+   * The number of bytes is this cache region currently consuming in memory.
+   * 
+   * @return The number of bytes consumed by this region; -1 if unknown or
+   *         unsupported.
+   */
+  public long getSizeInMemory() {
+    return -1;
+  }
+
+  /**
+   * Return the lock timeout for this cache.
+   */
+  public int getTimeout() {
+    GemFireCacheProvider.getLogger().debug("GemFireCache: getTimeout");
+    return Timestamper.ONE_MS * 60000;
+  }
+
+  /**
+   * If this is a clustered cache, lock the item
+   */
+  public void lock(Object key) throws CacheException {
+    GemFireCacheProvider.getLogger().info(
+        "GemFireCache: lock called for: " + key);
+
+    if (!clientRegion) {
+      // If we're using GLOBAL scope, we don't have to worry about
+      // locking.
+      if (!Scope.GLOBAL.equals(region.getAttributes().getScope())) {
+        this.distributedLockService.lock(key, -1, -1);
+      }
+    }
+    else {
+      // We assume the server region is GLOBAL for now. Else, use command
+      // pattern to acquire lock on the server
+      GemFireCacheProvider.getLogger().info(
+          "GemFireCache: client region, ignoring lock : " + key);
+    }
+  }
+
+  /**
+   * Generate the next timestamp
+   */
+  public long nextTimestamp() {
+    GemFireCacheProvider.getLogger().debug("GemFireCache: nextTimestamp called");
+    // TODO : Need a counter, cache-wide
+    return Timestamper.next();
+  }
+
+  /**
+   * Add an item to the cache
+   * 
+   * @param key
+   * @param value
+   * @throws CacheException
+   */
+  public void put(Object key, Object value) throws CacheException {
+    GemFireCacheProvider.getLogger().debug(
+        "GemFireCache: put called for key: " + key + "value: " + value);
+    try {
+      region.put(key, value);
+      GemFireCacheProvider.getLogger().debug(
+          "GemFireCache: put " + key + "-->" + value);
+    }
+    catch (com.gemstone.gemfire.cache.CacheException e) {
+      throw new CacheException(e);
+    }
+  }
+
+  public Object read(Object key) throws CacheException {
+    GemFireCacheProvider.getLogger().info(
+        "GemFireCache: read called for: " + key);
+    return region.get(key);
+  }
+
+  /**
+   * Remove an item from the cache
+   */
+  public void remove(Object key) throws CacheException {
+    GemFireCacheProvider.getLogger().debug(
+        "GemFireCache: remove called for: " + key);
+    try {
+      region.destroy(key);
+      GemFireCacheProvider.getLogger().debug("GemFireCache: removed: " + key);
+    }
+    catch (EntryNotFoundException e) {
+      // We can silently ignore this
+    }
+    catch (com.gemstone.gemfire.cache.CacheException e) {
+      throw new CacheException(e);
+    }
+  }
+
+  public String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append("Hibernate cache on GemFire region: ");
+    buffer.append(region);
+    return buffer.toString();
+  }
+
+  /**
+   * If this is a clustered cache, unlock the item
+   */
+  public void unlock(Object key) throws CacheException {
+    GemFireCacheProvider.getLogger().info(
+        "GemFireCache: unlock called for: " + key);
+
+    if (!clientRegion) {
+      // If we're using GLOBAL scope, we don't have to worry about locking.
+      if (!Scope.GLOBAL.equals(region.getAttributes().getScope())) {
+        this.distributedLockService.unlock(key);
+      }
+    }
+    else {
+      GemFireCacheProvider.getLogger().info(
+          "GemFireCache: client region, ignoring lock : " + key);
+    }
+  }
+
+  public void update(Object key, Object value) throws CacheException {
+    GemFireCacheProvider.getLogger().info(
+        "GemFireCache: update called for: " + key);
+    this.region.put(key, value);
+  }
+
+  public Map<?, ?> toMap() {
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java
new file mode 100644
index 0000000..e684c7d
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java
@@ -0,0 +1,54 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate;
+
+import java.util.Properties;
+
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+
+public class GemFireCacheListener extends CacheListenerAdapter implements
+    Declarable {
+
+  @Override
+  public void afterCreate(EntryEvent event) {
+    System.out.println("Create : " + event.getKey() + " / "
+        + event.getNewValue());
+  }
+
+  @Override
+  public void afterDestroy(EntryEvent event) {
+    System.out.println("Destroy : " + event.getKey());
+  }
+
+  @Override
+  public void afterInvalidate(EntryEvent event) {
+    System.out.println("Invalidate : " + event.getKey());
+  }
+
+  @Override
+  public void afterUpdate(EntryEvent event) {
+    System.out.println("Update : " + event.getKey() + " / "
+        + event.getNewValue());
+  }
+
+  public void init(Properties props) {
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
new file mode 100644
index 0000000..9cd6c88
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
@@ -0,0 +1,200 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate;
+
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.distributed.DistributedLockService;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.modules.util.CreateRegionFunction;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import org.apache.logging.log4j.Logger;
+import org.hibernate.cache.Cache;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.CacheProvider;
+import org.hibernate.cache.Timestamper;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+@SuppressWarnings("deprecation")
+public class GemFireCacheProvider implements CacheProvider {
+
+  private static final Logger logger = LogService.getLogger();
+
+  protected com.gemstone.gemfire.cache.Cache _cache;
+
+  private DistributedLockService distributedLockService;
+
+  private Properties regionAttributes = new Properties();
+
+  private final String DEFAULT_REGION_TYPE = RegionShortcut.REPLICATE_HEAP_LRU
+      .name();
+
+  private final String HIBERNATE_DLOCK_SERVICE_NAME = "hibernate-cache-lock-service";
+  /**
+   * Configure the cache
+   * 
+   * @param regionName
+   *          the name of the cache region
+   * @param properties
+   *          configuration settings
+   * @throws CacheException
+   */
+  public Cache buildCache(String regionName, Properties properties)
+      throws CacheException {
+    logger.info("GemFireCacheProvider: Creating cache: " + regionName);
+    Region region = retrieveOrCreateRegion(regionName);
+    Cache cache = null;
+    if (region == null) {
+      // Doh, blow up
+      throw new RuntimeException("Couldn't find cache region : " + regionName);
+    }
+    else {
+      cache = new GemFireCache(region, this.distributedLockService);
+    }
+    logger.info("GemFireCacheProvider: Created cache: " + regionName + "->" + cache);
+    return cache;
+  }
+
+  public boolean isMinimalPutsEnabledByDefault() {
+    return false;
+  }
+
+  /**
+   * Generate a timestamp
+   */
+  public long nextTimestamp() {
+    return Timestamper.next();
+  }
+
+  /**
+   * Returns the region if already created, otherwise first tries to create it
+   * from cache.xml, if not specified in cache.xml, create the region from the
+   * properties specified in hibernate.cfg.xml. Two types of properties can be
+   * specified in hibernate.cfg.xml
+   * <ol>
+   * <li>gemfire.default-region-attributes-id: the default region type to
+   * create. (default value for this is REPLICATE)
+   * <li>gemfire.region-attributes-for:fullyQualifiedRegionName when a region
+   * wants to override the default region type
+   * </ol>
+   * 
+   * @param regionName
+   * @return the region
+   */
+  protected Region retrieveOrCreateRegion(String regionName) {
+    // TODO client regions
+    Region r = _cache.getRegion(regionName);
+    if (r == null) {
+      String regionType = getRegionType(regionName);
+      r = _cache.createRegionFactory(RegionShortcut.valueOf(regionType))
+          .create(regionName);
+      RegionConfiguration regionConfig = new RegionConfiguration();
+      regionConfig.setRegionName(regionName);
+      regionConfig.setRegionAttributesId(regionType);
+      FunctionService.onMembers(_cache.getDistributedSystem())
+          .withArgs(regionConfig).execute(CreateRegionFunction.ID).getResult();
+    }
+    return r;
+  }
+
+  /**
+   * returns the type of region to create by consulting the properties specified
+   * in hibernate.cfg.xml
+   * 
+   * @see #retrieveOrCreateRegion(String)
+   * @param regionName
+   * @return string representation of {@link RegionShortcut}
+   */
+  private String getRegionType(String regionName) {
+    String rType = regionAttributes
+        .getProperty("gemfire.default-region-attributes-id");
+    if (rType == null) {
+      rType = DEFAULT_REGION_TYPE;
+    }
+    // iterate to find overridden property for a region
+    Iterator<Object> it = regionAttributes.keySet().iterator();
+    while (it.hasNext()) {
+      String current = (String)it.next();
+      if (current.contains(regionName)) {
+        rType = regionAttributes.getProperty(current);
+        break;
+      }
+    }
+    return rType.toUpperCase();
+  }
+
+  /**
+   * Callback to perform any necessary initialization of the underlying cache
+   * implementation during SessionFactory construction.
+   * 
+   * @param properties
+   *          current configuration settings.
+   */
+  public void start(Properties properties) throws CacheException {
+    logger.info("GemFireCacheProvider: Creating cache provider");
+
+    // We have to strip out any unknown properties, do so here
+    Properties gemfireOnlyProperties = new Properties();
+    for (Object keyObj : properties.keySet()) {
+      String key = (String)keyObj;
+      if (key.contains("region-attributes")) {
+        regionAttributes.put(key, properties.get(key));
+      }
+      else if (key.startsWith("gemfire.")) {
+        gemfireOnlyProperties.setProperty(key.replace("gemfire.", ""),
+            properties.getProperty(key));
+      }
+    }
+
+    // Create cache and d-lock service
+    try {
+      _cache = new CacheFactory(gemfireOnlyProperties).create();
+      DistributedLockService existing = DistributedLockService.getServiceNamed(HIBERNATE_DLOCK_SERVICE_NAME);
+      if (existing == null) {
+        this.distributedLockService = DistributedLockService.create(
+            HIBERNATE_DLOCK_SERVICE_NAME, _cache.getDistributedSystem());
+      } else {
+        this.distributedLockService = existing;
+      }
+    } 
+    catch (com.gemstone.gemfire.cache.CacheException e) {
+      throw new CacheException(e);
+    }
+
+    FunctionService.registerFunction(new CreateRegionFunction());
+
+    logger.info("GemFireCacheProvider: Done creating cache provider");
+  }
+
+  /**
+   * Callback to perform any necessary cleanup of the underlying cache
+   * implementation during SessionFactory.close().
+   */
+  public void stop() {
+    logger.info("GemFireCacheProvider: Stopping");
+    _cache.close();
+    logger.info("GemFireCacheProvider: Stopped");
+  }
+
+  public static Logger getLogger() {
+    return logger;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java
new file mode 100644
index 0000000..c019436
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java
@@ -0,0 +1,39 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate;
+
+import java.util.Properties;
+
+import org.hibernate.HibernateException;
+import org.hibernate.cache.QueryCache;
+import org.hibernate.cache.QueryCacheFactory;
+import org.hibernate.cache.UpdateTimestampsCache;
+import org.hibernate.cfg.Settings;
+
+/**
+ * Defines a factory for query cache instances. These factories are responsible
+ * for creating individual QueryCache instances.
+ * 
+ */
+public class GemFireQueryCacheFactory implements QueryCacheFactory {
+  public QueryCache getQueryCache(String regionName,
+      UpdateTimestampsCache updateTimestampsCache, Settings settings,
+      Properties props) throws HibernateException {
+    return new org.hibernate.cache.StandardQueryCache(settings, props,
+        updateTimestampsCache, regionName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
new file mode 100644
index 0000000..97e5fdf
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
@@ -0,0 +1,237 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate;
+
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import org.hibernate.cache.CacheDataDescription;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.CollectionRegion;
+import org.hibernate.cache.EntityRegion;
+import org.hibernate.cache.QueryResultsRegion;
+import org.hibernate.cache.RegionFactory;
+import org.hibernate.cache.Timestamper;
+import org.hibernate.cache.TimestampsRegion;
+import org.hibernate.cache.access.AccessType;
+import org.hibernate.cfg.Settings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.modules.hibernate.internal.ClientServerRegionFactoryDelegate;
+import com.gemstone.gemfire.modules.hibernate.internal.EntityWrapper;
+import com.gemstone.gemfire.modules.hibernate.internal.GemFireCollectionRegion;
+import com.gemstone.gemfire.modules.hibernate.internal.GemFireEntityRegion;
+import com.gemstone.gemfire.modules.hibernate.internal.GemFireQueryResultsRegion;
+import com.gemstone.gemfire.modules.hibernate.internal.RegionFactoryDelegate;
+import com.gemstone.gemfire.modules.util.Banner;
+
+public class GemFireRegionFactory implements RegionFactory {
+
+    
+  private static final String GEMFIRE_QUERY_RESULTS_REGION_NAME = "gemfire.hibernateQueryResults";
+
+  private static final String GEMFIRE_TIMESTAMPS_REGION_NAME = "gemfire.hibernateTimestamps";
+
+  private GemFireCache _cache;
+
+  private RegionFactoryDelegate delegate;
+
+  // TODO get rid of this
+  private boolean isClient;
+  
+  private final Logger log = LoggerFactory.getLogger(getClass());
+
+  private final ExecutorService executorService = Executors.newSingleThreadExecutor();
+
+  private Set<String> gemfireAttributes;
+  
+  /**
+   * maps the entity to the region that stores it.
+   */
+  private ConcurrentMap<String, GemFireEntityRegion> entityRegionMap = new ConcurrentHashMap<String, GemFireEntityRegion>();
+  
+  public GemFireRegionFactory(Properties props) {
+    log.debug("props:" + props);
+  }
+
+  public ExecutorService getExecutorService() {
+    return this.executorService;
+  }
+  
+  @Override
+  public void start(Settings settings, Properties properties)
+      throws CacheException {
+    log.info("Initializing " + Banner.getString());
+    extractGemFireProperties(properties);
+    _cache = delegate.startCache();
+  }
+
+  private void extractGemFireProperties(Properties properties) {
+    // We have to strip out any unknown properties, do so here
+    Properties gemfireProperties = new Properties();
+    Properties regionProperties = new Properties();
+    for (Object keyObj : properties.keySet()) {
+      String key = (String)keyObj;
+      if (key.contains("region-attributes")) {
+        regionProperties.put(key, properties.get(key));
+      }
+      else if (key.equals("gemfire.cache-topology")) {
+        if (properties.getProperty(key).trim()
+            .equalsIgnoreCase("client-server")) {
+          isClient = true;
+        }
+      }
+      else if (key.startsWith("gemfire.") && isGemFireAttribute(key)) {
+        gemfireProperties.setProperty(key.replace("gemfire.", ""),
+            properties.getProperty(key));
+      }
+    }
+    if (isClient) {
+      delegate = new ClientServerRegionFactoryDelegate(gemfireProperties, regionProperties);
+    } else {
+      delegate = new RegionFactoryDelegate(gemfireProperties, regionProperties);
+    }
+  }
+
+  private boolean isGemFireAttribute(String key) {
+    String gfKey = key.replace("gemfire.", "");
+    Set<String> gemfireAttributes = getGemFireAttributesNames();
+    return gemfireAttributes.contains(gfKey);
+  }
+
+  private Set<String> getGemFireAttributesNames() {
+    if (this.gemfireAttributes == null) {
+      //used only to get the list of all gemfire properties
+      DistributionConfig dConfig = new DistributionConfigImpl(new Properties());
+      String[] gemfireAttributeNames = dConfig.getAttributeNames();
+      gemfireAttributes = new HashSet<String>();
+      for (String attrName : gemfireAttributeNames) {
+        gemfireAttributes.add(attrName);
+      }
+    }
+    return gemfireAttributes;
+  }
+  
+  @Override
+  public void stop() {
+    // we do not want to close the cache, as there may be other
+    // applications/webapps
+    // using this cache. TODO do we want to close the regions that are created
+    // by this application?
+  }
+
+  @Override
+  public boolean isMinimalPutsEnabledByDefault() {
+    // minimal puts is better for clustered cache
+    return true;
+  }
+
+  @Override
+  public AccessType getDefaultAccessType() {
+    return AccessType.NONSTRICT_READ_WRITE;
+  }
+
+  @Override
+  public long nextTimestamp() {
+    log.debug("nextTimestamp called");
+    // TODO use gemfire cache time here. (which tries to minimize clock skews)
+    return Timestamper.next();
+  }
+
+  @Override
+  public EntityRegion buildEntityRegion(String regionName,
+      Properties properties, CacheDataDescription metadata)
+      throws CacheException {
+    // create the backing region
+    log.debug("creating Entity region {} ", regionName);
+    Region<Object, EntityWrapper> region = delegate.createRegion(regionName);
+    GemFireEntityRegion r = new GemFireEntityRegion(region, isClient, metadata, this);
+    this.entityRegionMap.put(regionName, r);
+    return r;
+  }
+
+  @Override
+  public CollectionRegion buildCollectionRegion(String regionName,
+      Properties properties, CacheDataDescription metadata)
+      throws CacheException {
+    log.debug("creating collection region {}",regionName);
+    Region<Object, EntityWrapper> region = delegate.createRegion(regionName);
+    return new GemFireCollectionRegion(region, isClient, metadata, this);
+  }
+
+  @Override
+  public QueryResultsRegion buildQueryResultsRegion(String regionName,
+      Properties properties) throws CacheException {
+    log.debug("Creating a query results region");
+    Region region = getLocalRegionForQueryCache();
+    return new GemFireQueryResultsRegion(region);
+  }
+
+  private Region getLocalRegionForQueryCache() {
+    return getLocalRegion(GEMFIRE_QUERY_RESULTS_REGION_NAME);
+  }
+  
+  private Region getLocalRegionForTimestampsCache() {
+    return getLocalRegion(GEMFIRE_TIMESTAMPS_REGION_NAME);
+  }
+  
+  private Region getLocalRegion(String regionName) {
+    Region region = _cache.getRegion(regionName);
+    if (region != null) {
+      return region;
+    }
+    if (isClient) {
+      ClientCache cc = (ClientCache)_cache;
+      region = cc.createClientRegionFactory(ClientRegionShortcut.LOCAL_HEAP_LRU).create(regionName);
+    } else {
+      Cache c = (Cache)_cache;
+      region = c.createRegionFactory(RegionShortcut.LOCAL_HEAP_LRU).create(regionName);
+    }
+    return region;
+  }
+  
+  @Override
+  public TimestampsRegion buildTimestampsRegion(String regionName,
+      Properties properties) throws CacheException {
+    Region region = getLocalRegionForTimestampsCache();
+    return new GemFireQueryResultsRegion(region);
+  }
+
+  /**
+   * Given an entity name, gets the region used to store
+   * that entity.
+   * @param name name of the entity
+   * @return the entity region for the given entity name
+   */
+  public GemFireEntityRegion getEntityRegion(String name) {
+    return this.entityRegionMap.get(name);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java
new file mode 100644
index 0000000..86c6786
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java
@@ -0,0 +1,257 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import com.gemstone.gemfire.cache.CacheWriterException;
+import com.gemstone.gemfire.cache.EntryExistsException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.client.ServerOperationException;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.EntityRegion;
+import org.hibernate.cache.access.EntityRegionAccessStrategy;
+import org.hibernate.cache.access.SoftLock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public abstract class Access implements EntityRegionAccessStrategy {
+
+  private final GemFireEntityRegion region;
+
+  /**Thread local to remember the status of insert, which can be returned in afterInsert*/
+  private ThreadLocal<Map<Object, Boolean>> createStatus = new ThreadLocal<Map<Object, Boolean>>() {
+    @Override
+    protected Map<Object, Boolean> initialValue() {
+      return new HashMap<Object, Boolean>();
+    }
+  };
+
+  private Logger log = LoggerFactory.getLogger(getClass());
+
+  public Access(GemFireEntityRegion region) {
+    this.region = region;
+  }
+
+  @Override
+  public EntityRegion getRegion() {
+    return this.region;
+  }
+
+  @Override
+  public Object get(Object key, long txTimestamp) throws CacheException {
+    KeyWrapper wKey = getWrappedKey(key);
+    if (this.region.isRegisterInterestRequired()) {
+      this.region.registerInterest(wKey);
+    }
+    // first check to see if we have pre-fetched this entity
+    EntityWrapper wrapper = this.region.get(wKey);
+    if (wrapper == null) {
+      wrapper = this.region.getGemFireRegion().get(wKey);
+    }
+    if (wrapper == null) {
+      this.region.getStats().incCacheMiss();
+      log.debug("Cache miss for {} count: {}",wKey, this.region.getStats().getCacheMiss());
+      return null;
+    } else {
+      this.region.getStats().incCacheHit();
+      log.debug("cache hit {} count: {} ", wKey, this.region.getStats().getCacheHits());
+    }
+    return wrapper.getEntity();
+  }
+
+  @Override
+  public boolean putFromLoad(Object key, Object value, long txTimestamp,
+      Object version) throws CacheException {
+    return putFromLoad(key, value, txTimestamp, version, true);
+  }
+
+  @Override
+  public boolean putFromLoad(Object key, Object value, long txTimestamp,
+      Object version, boolean minimalPutOverride) throws CacheException {
+    return create(key, value);
+  }
+
+  private boolean create(Object key, Object value) {
+    KeyWrapper wKey = getWrappedKey(key);
+    EntityWrapper wrapper = new EntityWrapper(value, 1L);
+    log.debug("putting a new entry from load {} value: {}",wKey, wrapper);
+    boolean remove = false;
+    try {
+      this.region.getGemFireRegion().create(wKey, wrapper);
+    } catch (EntryExistsException ee) {
+      log.debug("key {} exists in the cache already, destroying", wKey);
+      remove = true;
+    } catch (CacheWriterException writerEx) {
+      this.region.getStats().incHibernateDestroyJobsScheduled();
+      log.debug("caught a CacheWriterException {} ",writerEx.getMessage());
+      remove = true;
+    } catch (ServerOperationException serverEx) {
+      if (serverEx.getCause() instanceof CacheWriterException) {
+        this.region.getStats().incHibernateDestroyJobsScheduled();
+        log.debug("caught a ServerOperationException caused by CacheWriterException {} ",serverEx.getMessage());
+      } else {
+        throw serverEx;
+      }
+      remove = true;
+    }
+    if (remove) {
+      this.region.getGemFireRegion().remove(wKey);
+      return false;
+    }
+    return true;
+  }
+
+  @Override
+  public SoftLock lockItem(Object key, Object version) throws CacheException {
+    KeyWrapper wKey = getWrappedKey(key);
+    EntityWrapper wrapper = this.region.getGemFireRegion().get(wKey);
+    Long ver = wrapper == null ? 0L : wrapper.getVersion();
+    log.debug("lockItem:key: {} entityVersion: {}", new Object[] { wKey, ver });
+    return new EntityVersionImpl(ver);
+  }
+
+  @Override
+  public SoftLock lockRegion() throws CacheException {
+    return null;
+  }
+
+  @Override
+  public void unlockItem(Object key, SoftLock lock) throws CacheException {
+    log.debug("unlockItem:key:" + key + " lock:" + lock);
+  }
+
+  @Override
+  public void unlockRegion(SoftLock lock) throws CacheException {
+  }
+
+  @Override
+  public boolean insert(Object key, Object value, Object version)
+      throws CacheException {
+    log.debug("insert:key:{} value:{} version:{}",
+        new Object[]{key, value, version});
+    boolean retVal = create(key, value);
+    createStatus.get().put(key, retVal);
+    return retVal;
+  }
+
+  @Override
+  public boolean afterInsert(Object key, Object value, Object version)
+      throws CacheException {
+    log.info("afterInsert:key:{} value:{} version:{}",
+        new Object[]{key, value, version});
+    return createStatus.get().remove(key);
+  }
+
+  @Override
+  public boolean update(Object key, Object value, Object currentVersion,
+      Object previousVersion) throws CacheException {
+    KeyWrapper wKey = getWrappedKey(key);
+    EntityWrapper oldWrapper = this.region.getGemFireRegion().get(wKey);
+    Long version = oldWrapper == null ? 1L : oldWrapper.getVersion() + 1;
+    EntityWrapper wrapper = new EntityWrapper(value, version);
+    log.debug("put:key:{} value:{} version:{}", new Object[] { wKey, value,
+        version });
+    boolean remove = false;
+    try {
+      if (oldWrapper == null) {
+        remove = this.region.getGemFireRegion().putIfAbsent(wKey, wrapper) != null;
+      } else {
+        remove = !this.region.getGemFireRegion().replace(wKey, oldWrapper, wrapper);
+      }
+    } catch (CacheWriterException writerEx) {
+      this.region.getStats().incHibernateDestroyJobsScheduled();
+      log.debug("caught a CacheWriterException {} ",writerEx.getMessage());
+      remove = true;
+    } catch (ServerOperationException serverEx) {
+      if (serverEx.getCause() instanceof CacheWriterException) {
+        this.region.getStats().incHibernateDestroyJobsScheduled();
+        log.debug("caught a ServerOperationException caused by CacheWriterException {} ",serverEx.getMessage());
+        remove = true;
+      } else {
+        throw serverEx;
+      }
+    }
+    if (remove) {
+      this.region.getGemFireRegion().remove(wKey);
+      return false;
+    }
+    log.debug("put for key {} succeded", wKey);
+    return true;
+  }
+
+  @Override
+  public boolean afterUpdate(Object key, Object value, Object currentVersion,
+      Object previousVersion, SoftLock lock) throws CacheException {
+    log.debug("afterUpdate:key:{} value:{} currVersion:{} previousVersion:{}",
+        new Object[] {key, value, currentVersion, previousVersion});
+    KeyWrapper wKey = getWrappedKey(key);
+    EntityWrapper wrapper = this.region.getGemFireRegion().get(wKey);
+    if (wrapper == null) {
+      // this entry was destroyed during update
+      return false;
+    }
+    Long version = wrapper.getVersion();
+    Long expectedVersion = ((EntityVersion)lock).getVersion() + 1;
+    log.debug("afterPut:key:{} value:{} version:{} expected: {}",
+        new Object[] { wKey, value, version, expectedVersion });
+    if (wrapper.getVersion() != expectedVersion) {
+      log.debug(
+          "for key {} expected version to be {} but was {}, so destroying the key",
+          new Object[] { wKey, expectedVersion, version });
+      this.region.getGemFireRegion().remove(wKey);
+      return false;
+    }
+    return true;
+  }
+
+  @Override
+  public void remove(Object key) throws CacheException {
+    log.debug("removing key {} ",key);
+    this.region.getGemFireRegion().remove(getWrappedKey(key));
+  }
+
+  @Override
+  public void removeAll() throws CacheException {
+    log.debug("removing all keys");
+    this.region.getGemFireRegion().clear();
+  }
+
+  @Override
+  public void evict(Object key) throws CacheException {
+    // TODO we should implement a method on Region to evict
+    // a particular entry, destroying is inefficient
+    log.debug("removing key {} ",key);
+    this.region.getGemFireRegion().remove(getWrappedKey(key));
+  }
+
+  @Override
+  public void evictAll() throws CacheException {
+    log.debug("removing all keys");
+    this.region.getGemFireRegion().clear();
+  }
+
+  protected Region<Object, EntityWrapper> getGemFireRegion() {
+    return this.region.getGemFireRegion();
+  }
+  
+  protected KeyWrapper getWrappedKey(Object key) {
+    return new KeyWrapper(key);
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
new file mode 100644
index 0000000..980e6ab
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
@@ -0,0 +1,208 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientCacheFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.modules.util.BootstrappingFunction;
+import com.gemstone.gemfire.modules.util.CreateRegionFunction;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+
+public class ClientServerRegionFactoryDelegate extends RegionFactoryDelegate {
+
+  private static final String DEFAULT_SERVER_REGION_TYPE = RegionShortcut.PARTITION.name();
+
+  private static final String DEFAULT_CLIENT_REGION_TYPE = ClientRegionShortcut.PROXY.name();
+
+  private ClientCache clientCache;
+  
+  public ClientServerRegionFactoryDelegate(Properties gemfireProperties,
+      Properties regionProperties) {
+    super(gemfireProperties, regionProperties);
+  }
+
+  @Override
+  public GemFireCache startCache() {
+    log.info("Creating a GemFire client cache");
+    String locatorsString = (String)gemfireProperties.remove("locators");
+    checkExistingCache();
+    ClientCacheFactory ccf = new ClientCacheFactory(gemfireProperties).setPoolSubscriptionEnabled(true);
+    List<LocatorHolder> locators = getLocatorsMap(locatorsString);
+    for (LocatorHolder locHolder : locators) {
+      log.debug("adding pool locator with host {} port {}", locHolder.host, locHolder.port);
+      ccf.addPoolLocator(locHolder.host, locHolder.port);
+    }
+    this.clientCache = ccf.create();
+    
+    log.debug("GemFire client cache creation completed");
+    // bootstrap the servers
+    FunctionService.onServers(this.clientCache).execute(new BootstrappingFunction()).getResult();
+    FunctionService.registerFunction(new CreateRegionFunction(this.clientCache));
+    return this.clientCache;
+  }
+
+  private List<LocatorHolder> getLocatorsMap(String locatorsString) {
+    List<LocatorHolder> retval = new ArrayList<LocatorHolder>();
+    if (locatorsString == null || locatorsString.isEmpty()) {
+      return retval;
+    }
+    StringTokenizer st = new StringTokenizer(locatorsString, ",");
+    while (st.hasMoreTokens()) {
+      String locator = st.nextToken();
+      int portIndex = locator.indexOf('[');
+      if (portIndex < 1) {
+        portIndex = locator.lastIndexOf(':');
+      }
+      // starting in 5.1.0.4 we allow '@' as the bind-addr separator
+      // to let people use IPv6 numeric addresses (which contain colons)
+      int bindAddrIdx = locator.lastIndexOf('@', portIndex - 1);
+      
+      if (bindAddrIdx < 0) {
+        bindAddrIdx = locator.lastIndexOf(':', portIndex - 1);
+      }
+
+      String host = locator.substring(0,
+          bindAddrIdx > -1 ? bindAddrIdx : portIndex);
+
+      if (host.indexOf(':') >= 0) {
+        bindAddrIdx = locator.lastIndexOf('@');
+        host = locator.substring(0, bindAddrIdx > -1 ? bindAddrIdx : portIndex);
+      }
+      int lastIndex = locator.lastIndexOf(']');
+      if (lastIndex == -1) {
+        if (locator.indexOf('[') >= 0) {
+          throw new IllegalArgumentException("Invalid locator");
+        } else {
+          // Using host:port syntax
+          lastIndex = locator.length();
+        }
+      }
+      String port = locator.substring(portIndex + 1, lastIndex);
+      int portVal = 0;
+      try {
+        portVal = Integer.parseInt(port);
+        if (portVal < 1 || portVal > 65535) {
+          throw new IllegalArgumentException("port should be grater than zero and less than 65536");
+        }
+      } catch (NumberFormatException ex) {
+        throw new IllegalArgumentException("Invalid Locator");
+      }
+      retval.add(new LocatorHolder(host, portVal));
+    }
+    return retval;
+  }
+
+  @Override
+  public Region<Object, EntityWrapper> createRegion(String regionName) {
+    // first create the region on the server
+    String serverRegionType = getServerRegionType(regionName);
+    RegionConfiguration regionConfig = new RegionConfiguration();
+    regionConfig.setRegionName(regionName);
+    regionConfig.setRegionAttributesId(serverRegionType);
+    regionConfig.setCacheWriterName(EntityRegionWriter.class.getCanonicalName());
+    FunctionService.onServer(this.clientCache).withArgs(regionConfig)
+        .execute(CreateRegionFunction.ID).getResult();
+    // now create region on the client
+    Region<Object, EntityWrapper> r = this.clientCache.getRegion(regionName);
+    if (r != null) {
+      return r;
+    }
+    String clientRegionType = getClientRegionType(regionName);
+    ClientRegionFactory<Object, EntityWrapper> rf = this.clientCache
+        .createClientRegionFactory(ClientRegionShortcut
+            .valueOf(clientRegionType));
+    r = rf.create(regionName);
+    return r;
+  }
+
+  private String getClientRegionType(String regionName) {
+    String rType = getOverridenClientRegionType(regionName);
+    if (rType != null) {
+      return rType.toUpperCase();
+    }
+    rType = regionProperties.getProperty("gemfire.default-client-region-attributes-id");
+    if (rType == null) {
+      rType = DEFAULT_CLIENT_REGION_TYPE;
+    }
+    return rType.toUpperCase();
+  }
+
+  private String getServerRegionType(String regionName) {
+    String rType = getOverridenServerRegionType(regionName);
+    if (rType != null) {
+      return rType.toUpperCase();
+    }
+    rType = regionProperties.getProperty("gemfire.default-region-attributes-id");
+    if (rType == null) {
+      rType = DEFAULT_SERVER_REGION_TYPE;
+    }
+    return rType.toUpperCase();
+  }
+
+  private String getOverridenServerRegionType(String regionName) {
+    String rType = null;
+    Iterator<Object> it = regionProperties.keySet().iterator();
+    while (it.hasNext()) {
+      String current = (String)it.next();
+      if (current.contains(regionName) && !current.contains("client")) {
+        rType = regionProperties.getProperty(current);
+        break;
+      }
+    }
+    return rType;
+  }
+
+  private String getOverridenClientRegionType(String regionName) {
+    String rType = null;
+    Iterator<Object> it = regionProperties.keySet().iterator();
+    while (it.hasNext()) {
+      String current = (String)it.next();
+      if (current.contains(regionName) && current.contains("client")) {
+        rType = regionProperties.getProperty(current);
+        break;
+      }
+    }
+    return rType;
+  }
+  
+  private static class LocatorHolder {
+    private String host;
+    private int port;
+    private LocatorHolder(String host, int port) {
+      this.host = host;
+      this.port = port;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java
new file mode 100644
index 0000000..f1898d8
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java
@@ -0,0 +1,224 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.CollectionRegion;
+import org.hibernate.cache.access.CollectionRegionAccessStrategy;
+import org.hibernate.cache.access.SoftLock;
+import org.hibernate.cache.entry.CollectionCacheEntry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.CacheWriterException;
+import com.gemstone.gemfire.cache.EntryExistsException;
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.client.ServerOperationException;
+
+public class CollectionAccess implements
+    CollectionRegionAccessStrategy {
+
+  private final GemFireCollectionRegion region;
+  
+  private Logger log = LoggerFactory.getLogger(getClass());
+  
+  /**
+   * if we know the entity whose ids are stored in this
+   * collection, we can prefetch those entities using
+   * getAll. This field stores that child entity name.
+   */
+  private String childEntityName;
+  
+  public CollectionAccess(GemFireCollectionRegion region) {
+    this.region = region;
+    String regionName = this.region.getGemFireRegion().getName().trim();
+    regionName = regionName.replace("\\/", "");
+    int lastPeriod = regionName.lastIndexOf('.');
+    if (lastPeriod < 0) {
+      log.info("Eager prefetching disabled for region: {}", this.region.getName());
+      return;
+    }
+    String entityName = regionName.substring(0, lastPeriod);
+    String collectionFieldName = regionName.substring(lastPeriod+1);
+    log.debug("entity name: {}, collectionFieldName: {}", entityName, collectionFieldName);
+    try {
+      Class parentClass = Class.forName(entityName);
+      Field[] fields = parentClass.getDeclaredFields();
+      for (Field field : fields) {
+        log.debug("genericType: {}", field.getGenericType());
+        if (field.getName().equals(collectionFieldName)) {
+          String genericString = field.toGenericString();
+          log.debug("genericType: for required field name: {}", field.toGenericString());
+          int startDependentEntityIndex = genericString.indexOf("<");
+          if (startDependentEntityIndex != -1 &&
+              genericString.indexOf("<", startDependentEntityIndex+1) == -1) {
+            int childDependentEntityIndex = genericString.indexOf(">");
+            this.childEntityName = genericString.substring(startDependentEntityIndex+1, childDependentEntityIndex);
+            log.debug("For Collection {} using child entity: {}", this.region.getGemFireRegion().getName(), this.childEntityName);
+          }
+        }
+      }
+    }
+    catch (ClassNotFoundException e) {
+      //ok to ignore, we will not use pre-fetching
+    }
+    if (this.childEntityName == null) {
+      log.info("Eager prefetching disabled for region: {}", this.region.getName());
+    }
+  }
+  
+  @Override
+  public CollectionRegion getRegion() {
+    return this.region;
+  }
+
+  @Override
+  public Object get(Object key, long txTimestamp) throws CacheException {
+    EntityWrapper wrapper = this.region.getGemFireRegion().get(key);
+    if (wrapper == null) {
+      this.region.getStats().incCacheMiss();
+      log.debug("Cache miss for {} ts: {}",key, txTimestamp);
+      return null;
+    } else {
+      this.region.getStats().incCacheHit();
+      log.debug("cache hit {} count: {} ", key, this.region.getStats().getCacheHits());
+      // do pre-fetching
+      if (isPrefetchPossible()) {
+        log.debug("for key: {} prefetching entries: {}", key, wrapper.getEntity());
+        prefetchKeys((CollectionCacheEntry)wrapper.getEntity());
+      }
+    }
+    return wrapper.getEntity();
+  }
+
+  private void prefetchKeys(CollectionCacheEntry entry) {
+    StringBuilder builder = new StringBuilder(this.childEntityName+"#");
+    Serializable[] childEntityKeys = entry.getState();
+    Set<String> getAllSet = new HashSet<String>();
+    for (Serializable id : childEntityKeys) {
+      String key = builder.append(id).toString();
+      log.debug("adding key {} to getAll set", key);
+      getAllSet.add(key);
+    }
+    GemFireEntityRegion childRegion = this.region.regionFactory.getEntityRegion(this.childEntityName);
+    log.debug("prefetching {} keys", getAllSet.size());
+    if (!getAllSet.isEmpty() && childRegion != null) {
+      childRegion.getAll(getAllSet);
+    }
+  }
+
+  private boolean isPrefetchPossible() {
+    return this.childEntityName != null;
+  }
+
+  private void printRegionContents(Region<Object, EntityWrapper> r) {
+    log.debug("printing contents of {} ",r);
+    for (Object k : r.keySet()) {
+      log.debug("key {} value {} ",k,r.get(k));
+    }
+  }
+  
+  @Override
+  public boolean putFromLoad(Object key, Object value, long txTimestamp,
+      Object version) throws CacheException {
+    return putFromLoad(key, value, txTimestamp, version, true);
+  }
+
+  @Override
+  public boolean putFromLoad(Object key, Object value, long txTimestamp,
+      Object version, boolean minimalPutOverride) throws CacheException {
+    EntityWrapper wrapper = new EntityWrapper(value, 1L);
+    log.debug("putting a new collection entry from load {} value: {}",key, wrapper);
+    boolean remove = false;
+    try {
+      this.region.getGemFireRegion().create(key, wrapper);
+    } catch (EntryExistsException ee) {
+      log.debug("key {} exists in the cache already, destroying", key);
+      remove = true;
+    } catch (CacheWriterException writerEx) {
+      this.region.getStats().incHibernateDestroyJobsScheduled();
+      log.debug("caught a CacheWriterException {} ",writerEx.getMessage());
+      remove = true;
+    } catch (ServerOperationException serverEx) {
+      if (serverEx.getCause() instanceof CacheWriterException) {
+        this.region.getStats().incHibernateDestroyJobsScheduled();
+        log.debug("caught a ServerOperationException caused by CacheWriterException {} ",serverEx.getMessage());
+      } else {
+        throw serverEx;
+      }
+      remove = true;
+    }
+    if (remove) {
+      this.region.getGemFireRegion().remove(key);
+      return false;
+    }
+    return true;
+  }
+
+  @Override
+  public SoftLock lockItem(Object key, Object version) throws CacheException {
+    // there are no updates to the collectionCache,
+    // so no need to lock/version
+    return null;
+  }
+
+  @Override
+  public SoftLock lockRegion() throws CacheException {
+    return null;
+  }
+
+  @Override
+  public void unlockItem(Object key, SoftLock lock) throws CacheException {
+  }
+
+  @Override
+  public void unlockRegion(SoftLock lock) throws CacheException {
+  }
+
+  @Override
+  public void remove(Object key) throws CacheException {
+    log.debug("removing key {}",key);
+    this.region.getGemFireRegion().remove(key);
+  }
+
+  @Override
+  public void removeAll() throws CacheException {
+    log.debug("removing all keys");
+    this.region.getGemFireRegion().clear();
+  }
+
+  @Override
+  public void evict(Object key) throws CacheException {
+    // TODO we should implement a method on Region to evict
+    // a particular entry, destroying is inefficient
+    log.debug("removing key {}", key);
+    this.region.getGemFireRegion().remove(key);
+  }
+
+  @Override
+  public void evictAll() throws CacheException {
+    log.debug("removing all keys");
+    this.region.getGemFireRegion().clear();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java
new file mode 100644
index 0000000..5a4e5e1
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java
@@ -0,0 +1,87 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.cache.CacheWriterException;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
+
+public class EntityRegionWriter extends CacheWriterAdapter implements Declarable {
+  
+  private Logger log = LoggerFactory.getLogger(getClass());
+  
+//  @Override
+//  public void beforeCreate(EntryEvent event) {
+//    event.getRegion().getCache().getLogger().info("GFE:Writer invoked for beforeCreate:"+event);
+//      final Object key = event.getKey();
+//      EntityWrapper val = (EntityWrapper)event.getNewValue();
+//      EntityWrapper oldVal = (EntityWrapper)event.getOldValue();
+//      log.debug("beforeCreate: key:"+key+" val:"+val.getEntity()+" ver:"+val.getVersion()+" region:"+event.getRegion().getName()+" oldVal:"+oldVal+" this:"+System.identityHashCode(this));
+//  }
+  
+  @Override
+  public void beforeUpdate(EntryEvent event) {
+    log.debug("Writer invoked for beforeUpdate:{}",event);
+    final Object key = event.getKey();
+    EntityWrapper val = (EntityWrapper)event.getNewValue();
+    if (val.getVersion() < 0) {
+      // no need for version check for NonStrictReadWrite
+      // this is needed because CacheEntry does not implement equals
+      return;
+    }
+    EntityWrapper oldVal = (EntityWrapper)event.getOldValue();
+    // if same entity was loaded from two different VMs,
+    // i.e. version same and entity equal then no need to destroy
+    //
+    if (oldVal.getVersion() == val.getVersion()) {
+      if (val.getEntity().equals(oldVal.getEntity())) {
+        // since CacheEntry does not override equals
+        // this check is probably of no use
+        return;
+      }
+    } else if (oldVal.getVersion() < val.getVersion()) {
+      return;
+    }
+    log.debug("For key {} old version was {} new version was {}", new Object[] {key, oldVal.getVersion(), val.getVersion()});
+    throw new CacheWriterException("key "+key+" had a newer version");
+  }
+  
+  @Override
+  public boolean equals(Object obj) {
+    // This method is only implemented so that RegionCreator.validateRegion works properly.
+    // The CacheWriter comparison fails because two of these instances are not equal.
+    if (this == obj) {
+      return true;
+    }
+
+    if (obj == null || !(obj instanceof EntityRegionWriter)) {
+      return false;
+    }
+    return true;
+  }
+
+  @Override
+  public void init(Properties arg0) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java
new file mode 100644
index 0000000..abfb675
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java
@@ -0,0 +1,28 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import org.hibernate.cache.access.SoftLock;
+
+/**
+ * 
+ * @author sbawaska
+ */
+public interface EntityVersion extends SoftLock {
+
+  public Long getVersion();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java
new file mode 100644
index 0000000..ad160e4
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java
@@ -0,0 +1,51 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+/**
+ * 
+ * @author sbawaska
+ */
+public class EntityVersionImpl implements EntityVersion {
+
+  private final Long version;
+
+  public EntityVersionImpl(Long version) {
+    this.version = version;
+  }
+
+  @Override
+  public Long getVersion() {
+    return this.version;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof EntityVersionImpl) {
+      EntityVersionImpl other = (EntityVersionImpl)obj;
+      if (this.version.equals(other.version)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return this.version.hashCode();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java
new file mode 100644
index 0000000..ab92dea
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java
@@ -0,0 +1,89 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class EntityWrapper implements DataSerializable {
+
+  private static final long serialVersionUID = 8616754027252339041L;
+
+  private Object entity;
+
+  private long version;
+
+  public EntityWrapper(Object entity, long version) {
+    this.entity = entity;
+    this.version = version;
+  }
+
+  /**
+   * for {@link DataSerializer}
+   */
+  public EntityWrapper() {
+  }
+  
+  public long getVersion() {
+    return version;
+  }
+
+  public Object getEntity() {
+    return entity;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof EntityWrapper) {
+      EntityWrapper other = (EntityWrapper)obj;
+      if (this.version == other.version) {
+        //CacheEntry does not override equals, hence cannot be used in this comparison
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Long.valueOf(this.version).hashCode();
+  }
+
+  @Override
+  public String toString() {
+    return new StringBuilder()
+        .append("EntityWrapper@" + System.identityHashCode(this))
+        .append(" Entity:" + this.entity).append(" version:" + this.version)
+        .toString();
+  }
+
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    out.writeLong(this.version);
+    DataSerializer.writeObject(this.entity, out);
+  }
+
+  @Override
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.version = in.readLong();
+    this.entity = DataSerializer.readObject(in);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java
new file mode 100644
index 0000000..9e77a98
--- /dev/null
+++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java
@@ -0,0 +1,166 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.hibernate.internal;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutorService;
+
+import org.hibernate.cache.CacheDataDescription;
+import org.hibernate.cache.CacheException;
+import org.hibernate.cache.Region;
+import org.hibernate.cache.Timestamper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.modules.hibernate.GemFireRegionFactory;
+import com.gemstone.gemfire.modules.util.ModuleStatistics;
+
+public class GemFireBaseRegion implements Region {
+
+  /**
+   * the backing region
+   */
+  protected final com.gemstone.gemfire.cache.Region<Object, EntityWrapper> region;
+
+  /**
+   * to determine if the operation should be forwarded to server
+   */
+  protected final boolean isClientRegion;
+
+  protected final CacheDataDescription metadata;
+
+  private final Logger log = LoggerFactory.getLogger(getClass());
+
+  protected final GemFireRegionFactory regionFactory;
+  
+  protected final ModuleStatistics stats;
+  
+  public GemFireBaseRegion(com.gemstone.gemfire.cache.Region<Object, EntityWrapper> region,
+      boolean isClient, CacheDataDescription metadata, GemFireRegionFactory regionFactory) {
+    this.region = region;
+    this.isClientRegion = isClient;
+    this.metadata = metadata;
+    this.regionFactory = regionFactory;
+    DistributedSystem system = ((LocalRegion)region).getSystem();
+    this.stats = ModuleStatistics.getInstance(system);
+
+  }
+
+  public com.gemstone.gemfire.cache.Region<Object, EntityWrapper> getGemFireRegion() {
+    return this.region;
+  }
+
+  public ModuleStatistics getStats() {
+    return this.stats;
+  }
+  
+  public ExecutorService getExecutorService() {
+    return this.regionFactory.getExecutorService();
+  }
+
+  @Override
+  public String getName() {
+    return this.region.getName();
+  }
+
+  @Override
+  public void destroy() throws CacheException {
+    if (!this.region.isDestroyed()) {
+      this.region.localDestroyRegion();
+    }
+  }
+
+  /*
+   * I did not see any useful callers from hibernate-core
+   */
+  @Override
+  public boolean contains(Object key) {
+    log.debug("contains key called for :" + key);
+    if (isClientRegion) {
+      // TODO should this be done?
+      return this.region.containsKeyOnServer(key);
+    }
+    return this.region.containsKey(key);
+  }
+
+  @Override
+  public long getSizeInMemory() {
+    return 0;
+  }
+
+  @Override
+  public long getElementCountInMemory() {
+    return this.region.size();
+  }
+
+  @Override
+  public long getElementCountOnDisk() {
+    LocalRegion lr = (LocalRegion)this.region;
+    if (lr.getDiskRegion() != null) {
+      return lr.getDiskRegion().getNumOverflowOnDisk();
+    }
+    return 0;
+  }
+
+  @Override
+  public Map<Object, EntityWrapper> toMap() {
+    return Collections.unmodifiableMap(this.region);
+  }
+
+  /*
+   * only used by updateTimestamps cache
+   */
+  @Override
+  public long nextTimestamp() {
+    log.debug("nextTimestamp called");
+    return Timestamper.next();
+  }
+  
+  /*
+   * this is used by updateTimestamps cache only
+   */
+  @Override
+  public int getTimeout() {
+    return 60*1000; // all other cache providers have same value
+  }
+  
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof GemFireBaseRegion) {
+      GemFireBaseRegion other = (GemFireBaseRegion)obj;
+      if (this.region.getName().equals(other.region.getName())
+          && this.isClientRegion == other.isClientRegion) {
+        return true;
+      }
+    }
+    return false;
+  }
+  
+  @Override
+  public int hashCode() {
+    return this.region.hashCode() + (this.isClientRegion ? 1 : 0);
+  }
+  
+}


[39/50] [abbrv] incubator-geode git commit: GEODE-14: Minor tweaks to tests to add correct categories

Posted by kl...@apache.org.
GEODE-14: Minor tweaks to tests to add correct categories


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c3b91bcf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c3b91bcf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c3b91bcf

Branch: refs/heads/feature/GEODE-268
Commit: c3b91bcf9098f4a89ff8c9aadb96d0df0c478c54
Parents: 83affd2
Author: Jens Deppe <jd...@pivotal.io>
Authored: Tue Feb 2 14:58:39 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:26 2016 -0800

----------------------------------------------------------------------
 extensions/gemfire-modules-hibernate/build.gradle               | 2 +-
 .../test/java/com/gemstone/gemfire/modules/SecondVMTest.java    | 5 +++++
 extensions/gemfire-modules-session/build.gradle                 | 3 ++-
 extensions/gemfire-modules/build.gradle                         | 2 +-
 .../modules/session/catalina/PeerToPeerSessionCache.java        | 2 +-
 .../com/gemstone/gemfire/modules/session/DualCacheTest.java     | 3 +++
 6 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c3b91bcf/extensions/gemfire-modules-hibernate/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/build.gradle b/extensions/gemfire-modules-hibernate/build.gradle
index 0fbf80f..7681301 100644
--- a/extensions/gemfire-modules-hibernate/build.gradle
+++ b/extensions/gemfire-modules-hibernate/build.gradle
@@ -33,5 +33,5 @@ dependencies {
   testRuntime 'org.hsqldb:hsqldb:' + project.'hsqldb.version'
   testRuntime 'org.javassist:javassist:' + project.'javassist.version'
 
-  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+  provided project(path: ':gemfire-junit')
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c3b91bcf/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
index 9459acc..e3b6480 100644
--- a/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
+++ b/extensions/gemfire-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
@@ -21,9 +21,12 @@ import java.util.Iterator;
 import java.util.Properties;
 import java.util.logging.Level;
 
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import junit.framework.TestCase;
 
 import org.hibernate.Session;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,6 +37,8 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.Region.Entry;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 
+@Ignore("Can this test be deleted?")
+@Category(IntegrationTest.class)
 public class SecondVMTest extends TestCase {
 
   private Logger log = LoggerFactory.getLogger(getClass());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c3b91bcf/extensions/gemfire-modules-session/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/build.gradle b/extensions/gemfire-modules-session/build.gradle
index d6f12c9..7435d37 100644
--- a/extensions/gemfire-modules-session/build.gradle
+++ b/extensions/gemfire-modules-session/build.gradle
@@ -26,8 +26,9 @@ dependencies {
   }
   testCompile(group: 'org.eclipse.jetty', name: 'jetty-http', version: project.'jetty.version', classifier: 'tests')
   testCompile(group: 'org.eclipse.jetty', name: 'jetty-servlet', version: project.'jetty.version', classifier: 'tests')
+//  testCompile 'org.apache.tomcat:jasper:6.0.29'
 
-  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+  provided project(path: ':gemfire-junit')
 }
 
 jar {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c3b91bcf/extensions/gemfire-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/build.gradle b/extensions/gemfire-modules/build.gradle
index 1d45ab8..5b452b7 100644
--- a/extensions/gemfire-modules/build.gradle
+++ b/extensions/gemfire-modules/build.gradle
@@ -38,5 +38,5 @@ dependencies {
   testCompile 'org.httpunit:httpunit:' + project.'httpunit.version'
   testRuntime 'org.apache.tomcat:coyote:' + project.'tomcat6.version'
 
-  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+  provided project(path: ':gemfire-junit')
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c3b91bcf/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
index 75b5d41..2c76ca5 100644
--- a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/PeerToPeerSessionCache.java
@@ -133,7 +133,7 @@ public class PeerToPeerSessionCache extends AbstractSessionCache {
   /**
    * For peer-to-peer the backing cache *is* what's embedded in tomcat so it's always available
    *
-   * @return
+   * @return boolean indicating whether a backing cache is available
    */
   @Override
   public boolean isBackingCacheAvailable() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c3b91bcf/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
index f3927a8..220b614 100644
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
@@ -21,15 +21,18 @@
 
 package com.gemstone.gemfire.modules.session;
 
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.meterware.httpunit.GetMethodWebRequest;
 import com.meterware.httpunit.WebConversation;
 import com.meterware.httpunit.WebRequest;
 import com.meterware.httpunit.WebResponse;
 import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
 
 /**
  *
  */
+@Category(IntegrationTest.class)
 public class DualCacheTest extends TestCase {
 
   /**


[46/50] [abbrv] incubator-geode git commit: GEODE-12: Switch to AvailablePortHelper for ephemeral ports

Posted by kl...@apache.org.
GEODE-12: Switch to AvailablePortHelper for ephemeral ports


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/41192cc9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/41192cc9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/41192cc9

Branch: refs/heads/feature/GEODE-268
Commit: 41192cc93f9ba8138383e026b2f045935cb8658d
Parents: 0089b85
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Feb 8 11:57:56 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 11:57:56 2016 -0800

----------------------------------------------------------------------
 extensions/gemfire-modules/build.gradle         |  1 +
 .../gemfire/modules/session/DualCacheTest.java  | 72 --------------------
 .../modules/session/TestSessionsBase.java       | 32 +++++----
 3 files changed, 19 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/41192cc9/extensions/gemfire-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/build.gradle b/extensions/gemfire-modules/build.gradle
index 68197bf..cf22f2c 100644
--- a/extensions/gemfire-modules/build.gradle
+++ b/extensions/gemfire-modules/build.gradle
@@ -35,4 +35,5 @@ dependencies {
   testRuntime 'org.apache.tomcat:coyote:' + project.'tomcat6.version'
 
   provided project(path: ':gemfire-junit')
+  provided project(path: ':gemfire-core', configuration: 'testOutput')
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/41192cc9/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
deleted file mode 100644
index dbe4b54..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package com.gemstone.gemfire.modules.session;
-
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.meterware.httpunit.GetMethodWebRequest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-/**
- *
- */
-@Category(IntegrationTest.class)
-public class DualCacheTest {
-
-  /**
-   * Check that our session persists. The values we pass in as query params are used to set attributes on the session.
-   */
-  @Ignore("Ignored while refactoring")
-  @Test
-  public void testSessionFailover() throws Exception {
-    String key = "value_testSessionFailover";
-    String value = "Foo";
-
-    WebConversation wc = new WebConversation();
-    WebRequest req1 = new GetMethodWebRequest("http://localhost:7890/test");
-    req1.setParameter("cmd", QueryCommand.SET.name());
-    req1.setParameter("param", key);
-    req1.setParameter("value", value);
-    WebResponse response = wc.getResponse(req1);
-    String sessionId = response.getNewCookieValue("JSESSIONID");
-
-    assertNotNull("No apparent session cookie", sessionId);
-
-    WebRequest req2 = new GetMethodWebRequest("http://localhost:7891/test");
-    req2.setHeaderField("Cookie", "JSESSIONID=" + sessionId);
-    req2.setParameter("cmd", QueryCommand.GET.name());
-    req2.setParameter("param", key);
-    response = wc.getResponse(req2);
-    sessionId = response.getNewCookieValue("JSESSIONID");
-
-    assertEquals(value, response.getText());
-    assertTrue("The sessionId does not contain the correct JVM route value", sessionId.contains("JVM-2"));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/41192cc9/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
index 4b7ab87..544658e 100644
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
@@ -17,6 +17,7 @@
 package com.gemstone.gemfire.modules.session;
 
 import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
 import com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener;
 import com.meterware.httpunit.GetMethodWebRequest;
@@ -49,9 +50,12 @@ public abstract class TestSessionsBase {
 
   private static DeltaSessionManager sessionManager;
 
+  private static int port;
+
   // Set up the servers we need
   public static void setupServer(DeltaSessionManager manager) throws Exception {
-    server = new EmbeddedTomcat("/test", 7890, "JVM-1");
+    port = AvailablePortHelper.getRandomAvailableTCPPort();
+    server = new EmbeddedTomcat("/test", port, "JVM-1");
 
     PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
     p2pListener.setProperty("mcast-port", "0");
@@ -91,7 +95,7 @@ public abstract class TestSessionsBase {
   @Test
   public void testSanity() throws Exception {
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
     req.setParameter("cmd", QueryCommand.GET.name());
     req.setParameter("param", "null");
     WebResponse response = wc.getResponse(req);
@@ -117,7 +121,7 @@ public abstract class TestSessionsBase {
     servlet.getServletContext().setAttribute("callback", c);
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     req.setParameter("cmd", QueryCommand.CALLBACK.name());
     req.setParameter("param", "callback");
@@ -142,7 +146,7 @@ public abstract class TestSessionsBase {
     servlet.getServletContext().setAttribute("callback", c);
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     req.setParameter("cmd", QueryCommand.CALLBACK.name());
     req.setParameter("param", "callback");
@@ -163,7 +167,7 @@ public abstract class TestSessionsBase {
     String value = "Foo";
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
     req.setParameter("cmd", QueryCommand.SET.name());
     req.setParameter("param", key);
     req.setParameter("value", value);
@@ -220,7 +224,7 @@ public abstract class TestSessionsBase {
     String value = "Foo";
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Set an attribute
     req.setParameter("cmd", QueryCommand.SET.name());
@@ -254,7 +258,7 @@ public abstract class TestSessionsBase {
     String value = "Foo";
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Set an attribute
     req.setParameter("cmd", QueryCommand.SET.name());
@@ -295,7 +299,7 @@ public abstract class TestSessionsBase {
     String value = "Foo";
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Set an attribute
     req.setParameter("cmd", QueryCommand.SET.name());
@@ -326,7 +330,7 @@ public abstract class TestSessionsBase {
     String value = "Foo";
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Set an attribute
     req.setParameter("cmd", QueryCommand.SET.name());
@@ -347,7 +351,7 @@ public abstract class TestSessionsBase {
     String value = "Foo";
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Set an attribute
     req.setParameter("cmd", QueryCommand.SET.name());
@@ -384,7 +388,7 @@ public abstract class TestSessionsBase {
     servlet.getServletContext().setAttribute("callback", c);
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Execute the callback
     req.setParameter("cmd", QueryCommand.CALLBACK.name());
@@ -412,7 +416,7 @@ public abstract class TestSessionsBase {
     servlet.getServletContext().setAttribute("callback", c);
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Execute the callback
     req.setParameter("cmd", QueryCommand.CALLBACK.name());
@@ -437,7 +441,7 @@ public abstract class TestSessionsBase {
     servlet.getServletContext().setAttribute("callback", c);
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Execute the callback
     req.setParameter("cmd", QueryCommand.CALLBACK.name());
@@ -472,7 +476,7 @@ public abstract class TestSessionsBase {
     servlet.getServletContext().setAttribute("callback", c);
 
     WebConversation wc = new WebConversation();
-    WebRequest req = new GetMethodWebRequest("http://localhost:7890/test");
+    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
 
     // Execute the callback
     req.setParameter("cmd", QueryCommand.CALLBACK.name());


[24/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt
new file mode 100755
index 0000000..6050b30
--- /dev/null
+++ b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.1.txt
@@ -0,0 +1,1325 @@
+
+VMware vFabric GemFire HTTP Session Management Module 2.1.0.2
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> antlr-2.7.3
+   >>> backport-util-concurrent-java_5.0
+   >>> mx4j-2.0.1
+   >>> slf4j-1.5.8
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-modeler-2.0
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5
+
+
+
+SECTION 4: GNU Lesser General Public License, V2.1
+
+   >>> jgroups-2.10
+   >>> trove-1.1.b3
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> GNU Lesser General Public License, V2.1
+
+   >>> Common Development and Distribution License, V1.0
+
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> antlr-2.7.3
+
+SOFTWARE RIGHTS
+
+ANTLR 1989-2004 Developed by Terence Parr
+Partially supported by University of San Francisco & jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
+parrt@cs.usfca.edu
+parrt@antlr.org
+
+
+>>> backport-util-concurrent-java_5.0
+
+License
+This software is released to the public domain, in the spirit of the original code written by Doug Lea. 
+The code can be used for any purpose, modified, and redistributed without acknowledgment. No 
+warranty is provided, either express or implied.
+
+
+>>> mx4j-2.0.1
+
+The MX4J License, Version 1.0
+
+Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+         1. Redistributions of source code must retain the above copyright
+            notice, this list of conditions and the following disclaimer.
+
+         2. Redistributions in binary form must reproduce the above copyright
+            notice, this list of conditions and the following disclaimer in
+            the documentation and/or other materials provided with the
+            distribution.
+
+         3. The end-user documentation included with the redistribution,
+            if any, must include the following acknowledgment:
+               "This product includes software developed by the
+                MX4J project (http://mx4j.sourceforge.net)."
+            Alternately, this acknowledgment may appear in the software itself,
+            if and wherever such third-party acknowledgments normally appear.
+
+         4. The name "MX4J" must not be used to endorse or promote
+            products derived from this software without prior written
+            permission.
+            For written permission, please contact
+            biorn_steedom [at] users [dot] sourceforge [dot] net
+
+         5. Products derived from this software may not be called "MX4J",
+            nor may "MX4J" appear in their name, without prior written
+            permission of Simone Bordet.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the MX4J project.  For more information on
+MX4J, please see
+the MX4J website.
+
+
+>>> slf4j-1.5.8
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-modeler-2.0
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5
+
+The contents of this file are subject to the terms 
+of the Common Development and Distribution License 
+(the "License"). You may not use this file except 
+in compliance with the License. 
+ 
+You can obtain a copy of the license at 
+glassfish/bootstrap/legal/CDDLv1.0.txt or 
+https://glassfish.dev.java.net/public/CDDLv1.0.html. 
+See the License for the specific language governing 
+permissions and limitations under the License. 
+ 
+When distributing Covered Code, include this CDDL 
+HEADER in each file and include the License file at 
+glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
+add the following below this CDDL HEADER, with the 
+fields enclosed by brackets "[]" replaced with your 
+own identifying information: Portions Copyright [yyyy] 
+[name of copyright owner] 
+ 
+Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
+ 
+Portions Copyright Apache Software Foundation.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
+
+GNU Lesser General Public License, V2.1 is applicable to the following component(s).
+
+
+>>> jgroups-2.10
+
+This library 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 library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+>>> trove-1.1.b3
+
+The Trove library is licensed under the Lesser GNU Public License,
+which is included with the distribution in a file called LICENSE.txt.
+
+The PrimeFinder and HashFunctions classes in Trove are subject to the
+following license restrictions:
+
+Copyright (c) 1999 CERN - European Organization for Nuclear Research.
+
+Permission to use, copy, modify, distribute and sell this software and
+its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. CERN makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without expressed or implied warranty.
+
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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 library 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 library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[VFABRICGEMFIREHTTPSESSIONMANAGEMENTMODULE21GAKR021412]


[49/50] [abbrv] incubator-geode git commit: Updating release page for M1

Posted by kl...@apache.org.
Updating release page for M1


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0daf181f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0daf181f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0daf181f

Branch: refs/heads/feature/GEODE-268
Commit: 0daf181f2a9a8f10381bd11907e416cf09b601fd
Parents: fd88a6a
Author: William Markito <wm...@pivotal.io>
Authored: Mon Feb 8 16:29:59 2016 -0800
Committer: William Markito <wm...@pivotal.io>
Committed: Mon Feb 8 16:30:40 2016 -0800

----------------------------------------------------------------------
 gemfire-site/website/content/css/geode-site.css | 47 +++++++++++
 gemfire-site/website/content/index.html         |  8 +-
 .../website/content/releases/index.html         | 83 +++++++++++++++-----
 gemfire-site/website/layouts/header.html        |  1 +
 4 files changed, 118 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0daf181f/gemfire-site/website/content/css/geode-site.css
----------------------------------------------------------------------
diff --git a/gemfire-site/website/content/css/geode-site.css b/gemfire-site/website/content/css/geode-site.css
index 987c695..136a757 100644
--- a/gemfire-site/website/content/css/geode-site.css
+++ b/gemfire-site/website/content/css/geode-site.css
@@ -1351,6 +1351,18 @@ h2.icns-tools:before{
     font-weight: 600;
     content: " Mailing Lists";
   }
+  span.icon-cloud-download:after {
+    font-family: 'klavika-web', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+    font-weight: 600;
+    content: " Releases";
+  }
+  span.icon-flag-checkered:after {
+    font-family: 'klavika-web', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+    font-weight: 600;
+    content: " Milestones";
+  }
+
+
   div.cta {
     line-height: 60px;
   }
@@ -1568,3 +1580,38 @@ h2.icns-tools:before{
   background-color: rgb(36,129,166);
   margin: 12px 0 0 0;
 }
+
+/* desert scheme ported from vim to google prettify */
+pre.prettyprint { display: block; background-color: #333 }
+pre .nocode { background-color: none; color: #000 }
+pre .str { color: #ffa0a0 } /* string  - pink */
+pre .kwd { color: #f0e68c; font-weight: bold }
+pre .com { color: #87ceeb } /* comment - skyblue */
+pre .typ { color: #98fb98 } /* type    - lightgreen */
+pre .lit { color: #cd5c5c } /* literal - darkred */
+pre .pun { color: #fff }    /* punctuation */
+pre .pln { color: #fff }    /* plaintext */
+pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag    - lightyellow */
+pre .atn { color: #bdb76b; font-weight: bold } /* attribute name  - khaki */
+pre .atv { color: #ffa0a0 } /* attribute value - pink */
+pre .dec { color: #98fb98 } /* decimal         - lightgreen */
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */
+li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
+/* Alternate shading for lines */
+li.L1,li.L3,li.L5,li.L7,li.L9 { }
+
+@media print {
+  pre.prettyprint { background-color: none }
+  pre .str, code .str { color: #060 }
+  pre .kwd, code .kwd { color: #006; font-weight: bold }
+  pre .com, code .com { color: #600; font-style: italic }
+  pre .typ, code .typ { color: #404; font-weight: bold }
+  pre .lit, code .lit { color: #044 }
+  pre .pun, code .pun { color: #440 }
+  pre .pln, code .pln { color: #000 }
+  pre .tag, code .tag { color: #006; font-weight: bold }
+  pre .atn, code .atn { color: #404 }
+  pre .atv, code .atv { color: #060 }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0daf181f/gemfire-site/website/content/index.html
----------------------------------------------------------------------
diff --git a/gemfire-site/website/content/index.html b/gemfire-site/website/content/index.html
index e20446a..8b8f61a 100644
--- a/gemfire-site/website/content/index.html
+++ b/gemfire-site/website/content/index.html
@@ -29,15 +29,17 @@ under the License. -->
                   Take advantage of Apache Geode's unique technology that blends advanced techniques for data replication, partitioning and distributed processing.
 
                   <br/><br/>
-                  Apache Geode (incubating) provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing.<br/></p>
+                  Apache Geode (incubating) provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing.<br/>
             </div>
 
             <div class="btn-wrapper">
-                <!-- Place this tag where you want the button to render. -->
+              <p><a href="/releases/" class="btn btn-inverse btn-lg">Download Geode</a> &nbsp;</p> 
+              <!-- Place this tag where you want the button to render. -->
               <a class="github-button" href="https://github.com/apache/incubator-geode" data-icon="octicon-star" data-style="mega" data-count-href="/apache/incubator-geode/stargazers" data-count-api="/repos/apache/incubator-geode#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star apache/incubator-geode on GitHub">Star</a>
               <a class="github-button" href="https://github.com/apache/incubator-geode/fork" data-icon="octicon-repo-forked" data-style="mega" data-count-href="/apache/incubator-geode/network" data-count-api="/repos/apache/incubator-geode#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork apache/incubator-geode on GitHub">Fork</a>
               <a class="github-button" href="https://github.com/apache/incubator-geode" data-icon="octicon-eye" data-style="mega" data-count-href="/apache/incubator-geode/watchers" data-count-api="/repos/apache/incubator-geode#subscribers_count" data-count-aria-label="# watchers on GitHub" aria-label="Watch apache/incubator-geode on GitHub">Watch</a>
-              <!--<p><span class="or">or</span> <a href="#">Download Geode</a></p>-->
+
+
             </div>
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0daf181f/gemfire-site/website/content/releases/index.html
----------------------------------------------------------------------
diff --git a/gemfire-site/website/content/releases/index.html b/gemfire-site/website/content/releases/index.html
index 8ad0b75..10ba781 100644
--- a/gemfire-site/website/content/releases/index.html
+++ b/gemfire-site/website/content/releases/index.html
@@ -15,11 +15,11 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. -->
 
-<section class="bf-tagline">
+<section class="bf-releases">
     <div class="container">
     	<div class="row">
-    	    <div class="col-md-12">
-    	    	<h2>Apache Geode Releases</h2>
+    	    <div class="col-md-12" id="events">
+    	    	<h2><span class="icon-releases"></span></h2>
 			</div>
 		</div>
 	</div>
@@ -27,31 +27,78 @@ under the License. -->
 
 <section class="bf-releases">
     <div class="container">
-    	<div class="row">
-    	    <div class="col-md-12" id="events">
-    	    	<h2 class="icns-download"><span>Releases</span></h2>
-			</div>
-		</div>
-		</br>
-		<div class="row">
-    		<div class="col-md-9 done">
+      <div class="row">
+    		<div class="col-md-9">
     			<p>
 				Releases of Geode are made available to the general public at no charge, under the <a href="http://apache.org/licenses/">Apache License</a>, in both binary and source distributions.
-				</p>
-				<p>
+				  </p>
+      <!-- RELEASES -->
+      <div class="container">
+        <h3><span class="icon-flag-checkered"> 1.0.0-incubating.M1</span></h3>
+        <!-- BINARY -->
+        <ul>
+            <span class="icon-cloud-download"> <strong>Binaries </strong>
+              [ <a href="http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating.M1/apache-geode-1.0.0-incubating.M1.zip">ZIP</a> , <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-1.0.0-incubating.M1.zip.sha-256">SHA-256</a> ,
+              <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-1.0.0-incubating.M1.zip.asc">PGP</a> ] -
+              [<a href="http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating.M1/apache-geode-1.0.0-incubating.M1.tar.gz">TAR.GZ</a> , <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-1.0.0-incubating.M1.tar.gz.sha-256">SHA-256</a> ,
+              <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-1.0.0-incubating.M1.tar.gz.asc">PGP</a> ]
+              </span>
+
+              <blockquote>Binary downloads are provided for the convenience of our users and are not official Apache Geode releases. </blockquote>
+            </li>
+        </ul>
+        <!-- SOURCE -->
         <ul>
-          <li>Alpha 1.0 Releases - Geode 1.0.0-ALPHA - <strong>N/A</strong></li>
-          <li>General Availability (GA) Releases - Geode 1.0.0 - <strong>N/A</strong></li>
+            <span class="icon-cloud-download"> <strong>Source</strong>
+               [ <a href="http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating.M1/apache-geode-src-1.0.0-incubating.M1.zip">ZIP</a> , <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-src-1.0.0-incubating.M1.zip.sha-256">SHA-256</a>,
+               <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-src-1.0.0-incubating.M1.zip.asc">PGP</a>
+                ] -
+               [<a href="http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating.M1/apache-geode-src-1.0.0-incubating.M1.tar.gz">TAR.GZ</a> , <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-src-1.0.0-incubating.M1.tar.gz.sha-256">SHA-256</a>,
+               <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/apache-geode-src-1.0.0-incubating.M1.tar.gz.asc">PGP</a>
+               ]
+             </span>
+            </li>
         </ul>
-        </p>
+        <!-- DEPENDENCY MANAGERS -->
+        <div class="container">
+          <h4><span class="icon-archive"> Dependency Managers</span></h4>
+          <ul>
+              <li> <strong>Gradle</strong>
+                <pre class="prettyprint">
+  dependencies {
+      compile 'org.apache.geode:gemfire-core:1.0.0-incubating.M1'
+  }</pre>
+                <!-- ><script src="https://gist.github.com/markito/b7796cafef4bd273bd07.js"></script>-->
+              </li>
+              <li> <strong>Maven</strong>
+                <pre class="prettyprint">
+  &lt;dependencies&gt;
+     &lt;dependency&gt;
+        &lt;groupId&gt;org.apache.geode&lt;/groupId&gt;
+        &lt;artifactId&gt;gemfire-core&lt;/artifactId&gt;
+        &lt;version&gt;1.0.0-incubating.M1&lt;/version&gt;
+     &lt;/dependency&gt;
+  &lt;/dependencies&gt;</pre>
+              </li>
+          </ul>
+        </div>
+      </div>
+      <!-- END OF RELEASE -->
+      <hr/>
+      <div class="container done">
+        <h3><span class="icon-flag-checkered"> General Availability (GA) Releases - Geode 1.0.0</span></h3>
+        Coming soon.
+        <br/>
+      </div>
+      <hr/>
         <p>
 					Project releases are approved by vote of the Apache Geode Podling Project Management Committee (PPMC) and Apache Incubator (PMC). Support for a release is provided by project volunteers on the project <a href="http://geode.incubator.apache.org/community/#mailing-lists">mailing lists</a>. Bugs found in a release may be discussed on the list and reported through the <a href="https://issues.apache.org/jira/browse/GEODE">issue tracker</a>. The user mailing list and issue tracker are the only support options hosted by the Apache Geode project.
 				</p>
 				<p>
-					Note: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at <a href="https://dist.apache.org/repos/dist/release/geode/">https://dist.apache.org/repos/dist/release/geode/</a>. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: <a href="https://dist.apache.org/repos/dist/release/geode/KEYS">https://dist.apache.org/repos/dist/release/geode/KEYS</a>
+					<strong>Note</strong>: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at <a href="https://dist.apache.org/repos/dist/release/incubator/geode/">https://dist.apache.org/repos/dist/release/incubator/geode/</a>. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: <a href="https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;a=blob;f=KEYS;h=9d13f70a9ce8f8d6a7c3feb1e194ccec123b5868;hb=c26334542fa9e90daff5f58467d6e174b3e0f3e2">KEYS</a>
 				</p>
 				<p>
-					The PGP signatures can be verified using PGP or GPG. First download the <a href="https://dist.apache.org/repos/dist/release/geode/KEYS">KEYS</a> as well as the <a href="https://dist.apache.org/repos/dist/release/geode/geode-1/v1.0.0/">asc signature</a> file for the particular distribution. Then verify the signatures using:
+					The PGP signatures can be verified using PGP or GPG. First download the <a href="https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;a=blob;f=KEYS;h=9d13f70a9ce8f8d6a7c3feb1e194ccec123b5868;hb=c26334542fa9e90daff5f58467d6e174b3e0f3e2">KEYS</a> as well as the <a href="https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating.M1/">asc signature</a> file for the particular distribution. Then verify the signatures using:
 				</p>
 				<p>
        				% pgpk -a KEYS

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0daf181f/gemfire-site/website/layouts/header.html
----------------------------------------------------------------------
diff --git a/gemfire-site/website/layouts/header.html b/gemfire-site/website/layouts/header.html
index b623104..4bffa61 100644
--- a/gemfire-site/website/layouts/header.html
+++ b/gemfire-site/website/layouts/header.html
@@ -26,6 +26,7 @@
     <!-- Loading Typekit -->
     <script type="text/javascript" src="//use.typekit.net/ddl7izx.js"></script>
     <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+    <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
     <!-- Place this tag right after the last button or just before your close body tag. -->
     <script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
         <!-- Loading Bootstrap -->


[16/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java b/extensions/gemfire-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
new file mode 100644
index 0000000..f312545
--- /dev/null
+++ b/extensions/gemfire-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
@@ -0,0 +1,35 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session;
+
+import com.gemstone.gemfire.modules.session.catalina.Tomcat7DeltaSessionManager;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+/**
+ * @author Jens Deppe
+ */
+@Category(UnitTest.class)
+public class Tomcat7SessionsJUnitTest extends TestSessionsBase {
+
+  // Set up the session manager we need
+  @BeforeClass
+  public static void setupClass() throws Exception {
+    setupServer(new Tomcat7DeltaSessionManager());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/conf/tomcat-users.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/conf/tomcat-users.xml b/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/conf/tomcat-users.xml
new file mode 100644
index 0000000..6c9f217
--- /dev/null
+++ b/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/conf/tomcat-users.xml
@@ -0,0 +1,3 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+</tomcat-users>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/logs/.gitkeep
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/logs/.gitkeep b/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/logs/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/temp/.gitkeep
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/temp/.gitkeep b/extensions/gemfire-modules-tomcat7/src/test/resources/tomcat/temp/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/build.gradle b/extensions/gemfire-modules/build.gradle
new file mode 100644
index 0000000..1d45ab8
--- /dev/null
+++ b/extensions/gemfire-modules/build.gradle
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+test  {
+  doFirst {
+    copy {
+      from 'build/resources/test/tomcat'
+      into 'build/test/tomcat/'
+    }
+  }
+}
+
+jar {
+  baseName = 'gemfire-modules'
+}
+
+dependencies {
+  compile project(':gemfire-core')
+
+  compile 'org.apache.tomcat:catalina:' + project.'tomcat6.version'
+  compile 'org.apache.tomcat:catalina-ha:' + project.'tomcat6.version'
+  compile 'org.apache.tomcat:juli:' + project.'tomcat6.version'
+
+  testCompile 'org.httpunit:httpunit:' + project.'httpunit.version'
+  testRuntime 'org.apache.tomcat:coyote:' + project.'tomcat6.version'
+
+  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/AbstractGatewayDeltaEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/AbstractGatewayDeltaEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/AbstractGatewayDeltaEvent.java
new file mode 100644
index 0000000..13b2e77
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/AbstractGatewayDeltaEvent.java
@@ -0,0 +1,64 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.Region;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+@SuppressWarnings("serial")
+public abstract class AbstractGatewayDeltaEvent implements GatewayDeltaEvent, DataSerializable {
+
+  protected String regionName;
+  protected String key;
+
+  public AbstractGatewayDeltaEvent() {
+  }
+
+  public AbstractGatewayDeltaEvent(String regionName, String key) {
+    this.regionName = regionName;
+    this.key = key;
+  }
+
+  public String getRegionName() {
+    return this.regionName;
+  }
+
+  public String getKey() {
+    return this.key;
+  }
+
+  @SuppressWarnings("unchecked")
+  public Region getRegion(Cache cache) {
+    return cache.getRegion(this.regionName);
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.regionName = DataSerializer.readString(in);
+    this.key = DataSerializer.readString(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(this.regionName, out);
+    DataSerializer.writeString(this.key, out);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDelta.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDelta.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDelta.java
new file mode 100644
index 0000000..4acad05
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDelta.java
@@ -0,0 +1,26 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+public interface GatewayDelta {
+
+  public static final String GATEWAY_DELTA_REGION_NAME = "__gatewayDelta";
+
+  public GatewayDeltaEvent getCurrentGatewayDeltaEvent();
+
+  public void setCurrentGatewayDeltaEvent(GatewayDeltaEvent currentGatewayDeltaEvent);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaCreateEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaCreateEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaCreateEvent.java
new file mode 100644
index 0000000..3202591
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaCreateEvent.java
@@ -0,0 +1,88 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+@SuppressWarnings("serial")
+public class GatewayDeltaCreateEvent extends AbstractGatewayDeltaEvent {
+
+  private byte[] gatewayDelta;
+
+  public GatewayDeltaCreateEvent() {
+  }
+
+  public GatewayDeltaCreateEvent(String regionName, String key, byte[] gatewayDelta) {
+    super(regionName, key);
+    this.gatewayDelta = gatewayDelta;
+  }
+
+  public byte[] getGatewayDelta() {
+    return this.gatewayDelta;
+  }
+
+  public void apply(Cache cache) {
+    Region<String, CachedDeserializable> region = getRegion(cache);
+    region.put(this.key, CachedDeserializableFactory.create(this.gatewayDelta), true);
+    if (cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("Applied ").append(this);
+      cache.getLogger().fine(builder.toString());
+    }
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    super.fromData(in);
+    this.gatewayDelta = DataSerializer.readByteArray(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    super.toData(out);
+    DataSerializer.writeByteArray(this.gatewayDelta, out);
+  }
+
+  public static void registerInstantiator(int id) {
+    Instantiator.register(new Instantiator(GatewayDeltaCreateEvent.class, id) {
+      public DataSerializable newInstance() {
+        return new GatewayDeltaCreateEvent();
+      }
+    });
+  }
+
+  public String toString() {
+    return new StringBuilder().append("GatewayDeltaCreateEvent[")
+        .append("regionName=")
+        .append(this.regionName)
+        .append("; key=")
+        .append(this.key)
+        .append("; gatewayDelta=")
+        .append(this.gatewayDelta)
+        .append("]")
+        .toString();
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaDestroyEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaDestroyEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaDestroyEvent.java
new file mode 100644
index 0000000..18bfe8b
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaDestroyEvent.java
@@ -0,0 +1,82 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.Instantiator;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.session.catalina.DeltaSession;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+@SuppressWarnings("serial")
+public class GatewayDeltaDestroyEvent extends AbstractGatewayDeltaEvent {
+
+  public GatewayDeltaDestroyEvent() {
+  }
+
+  public GatewayDeltaDestroyEvent(String regionName, String key) {
+    super(regionName, key);
+  }
+
+  public void apply(Cache cache) {
+    Region<String, DeltaSession> region = getRegion(cache);
+    try {
+      region.destroy(this.key);
+      if (cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("Applied ").append(this);
+        cache.getLogger().fine(builder.toString());
+      }
+    } catch (EntryNotFoundException e) {
+      StringBuilder builder = new StringBuilder();
+      builder.append(this).append(": Session ").append(this.key).append(" was not found");
+      cache.getLogger().warning(builder.toString());
+    }
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    super.fromData(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    super.toData(out);
+  }
+
+  public static void registerInstantiator(int id) {
+    Instantiator.register(new Instantiator(GatewayDeltaDestroyEvent.class, id) {
+      public DataSerializable newInstance() {
+        return new GatewayDeltaDestroyEvent();
+      }
+    });
+  }
+
+  public String toString() {
+    return new StringBuilder().append("GatewayDeltaDestroyEvent[")
+        .append("regionName=")
+        .append(this.regionName)
+        .append("; key=")
+        .append(this.key)
+        .append("]")
+        .toString();
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEvent.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEvent.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEvent.java
new file mode 100644
index 0000000..672a01f
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEvent.java
@@ -0,0 +1,24 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+import com.gemstone.gemfire.cache.Cache;
+
+public interface GatewayDeltaEvent {
+
+  public void apply(Cache cache);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEventApplicationCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEventApplicationCacheListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEventApplicationCacheListener.java
new file mode 100644
index 0000000..cf9aa1a
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaEventApplicationCacheListener.java
@@ -0,0 +1,67 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.cache.wan.GatewaySenderEventCallbackArgument;
+
+import java.util.Properties;
+
+public class GatewayDeltaEventApplicationCacheListener extends CacheListenerAdapter<String, GatewayDeltaEvent> implements Declarable {
+
+  private final Cache cache;
+
+  public GatewayDeltaEventApplicationCacheListener() {
+    this.cache = CacheFactory.getAnyInstance();
+  }
+
+  public void afterCreate(EntryEvent<String, GatewayDeltaEvent> event) {
+    System.out.println("GatewayDeltaApplierCacheListener event: " + event);
+    EntryEventImpl eventImpl = (EntryEventImpl) event;
+    if (this.cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("GatewayDeltaApplierCacheListener: Received event for ")
+          .append(event.getKey())
+          .append("->")
+          .append(event.getNewValue())
+          .append(".");
+      this.cache.getLogger().fine(builder.toString());
+    }
+
+    // If the event is from a remote site, apply it to the session
+    Object callbackArgument = eventImpl.getRawCallbackArgument();
+    System.out.println("GatewayDeltaApplierCacheListener callbackArgument: " + callbackArgument);
+    if (callbackArgument instanceof GatewaySenderEventCallbackArgument) {
+      GatewayDeltaEvent delta = event.getNewValue();
+      delta.apply(this.cache);
+      System.out.println("Applied " + delta);
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaApplierCacheListener: Applied ").append(delta);
+        this.cache.getLogger().fine(builder.toString());
+      }
+    }
+  }
+
+  public void init(Properties p) {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaForwarderCacheListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaForwarderCacheListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaForwarderCacheListener.java
new file mode 100644
index 0000000..ce44fcb
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/gatewaydelta/GatewayDeltaForwarderCacheListener.java
@@ -0,0 +1,197 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.gatewaydelta;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.InterestPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.SerializedCacheValue;
+import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+
+import java.util.Properties;
+
+public class GatewayDeltaForwarderCacheListener extends CacheListenerAdapter<String, GatewayDelta> implements Declarable {
+
+  private final Cache cache;
+
+  private LocalRegion gatewayDeltaRegion;
+
+  public GatewayDeltaForwarderCacheListener() {
+    this(CacheFactory.getAnyInstance());
+  }
+
+  public GatewayDeltaForwarderCacheListener(Cache cache) {
+    this.cache = cache;
+  }
+
+  @SuppressWarnings("unchecked")
+  public void afterCreate(EntryEvent<String, GatewayDelta> event) {
+    // If the event is from the local site, create a 'create' event and send it to the
+    // gateway delta region
+    if (event.getCallbackArgument() == null) {
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaForwarderCacheListener: Received create event for ")
+            .append(event.getKey())
+            .append("->")
+            .append(event.getNewValue())
+            .append(" that originated in the local site. Sending it to the remote site.");
+        this.cache.getLogger().fine(builder.toString());
+      }
+
+      // Distribute the create event to the gateway hub(s)
+      String regionName = event.getRegion().getFullPath();
+      String sessionId = event.getKey();
+      SerializedCacheValue scv = event.getSerializedNewValue();
+      if (scv == null) {
+        getGatewayDeltaRegion().put(sessionId,
+            new GatewayDeltaCreateEvent(regionName, sessionId, EntryEventImpl.serialize(event.getNewValue())));
+      } else {
+        System.out.println(
+            "GatewayDeltaForwarderCacheListener event.getSerializedNewValue().getSerializedValue(): " + event.getSerializedNewValue()
+                .getSerializedValue());
+        getGatewayDeltaRegion().put(sessionId,
+            new GatewayDeltaCreateEvent(regionName, sessionId, scv.getSerializedValue()));
+      }
+    } else {
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaForwarderCacheListener: Received create event for ")
+            .append(event.getKey())
+            .append("->")
+            .append(event.getNewValue())
+            .append(" that originated in the remote site.");
+        this.cache.getLogger().fine(builder.toString());
+      }
+    }
+  }
+
+  public void afterUpdate(EntryEvent<String, GatewayDelta> event) {
+    //System.out.println("GatewayDeltaForwarderCacheListener.afterUpdate: " + event);
+    // If the event is from the local site, create an 'update' event and send it to the
+    // gateway delta region
+    if (event.getCallbackArgument() == null) {
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaForwarderCacheListener: Received update event for ")
+            .append(event.getKey())
+            .append("->")
+            .append(event.getNewValue())
+            .append(" that originated in the local site. Sending it to the remote site.");
+        this.cache.getLogger().fine(builder.toString());
+      }
+
+      // Distribute the update event to the gateway hub(s)
+      GatewayDelta session = event.getNewValue();
+      getGatewayDeltaRegion().put(event.getKey(), session.getCurrentGatewayDeltaEvent());
+
+      // Reset the current delta
+      session.setCurrentGatewayDeltaEvent(null);
+    } else {
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaForwarderCacheListener: Received update event for ")
+            .append(event.getKey())
+            .append("->")
+            .append(event.getNewValue())
+            .append(" that originated in the remote site.");
+        this.cache.getLogger().fine(builder.toString());
+      }
+    }
+  }
+
+  public void afterDestroy(EntryEvent<String, GatewayDelta> event) {
+    // If the event is from the local site, create a 'destroy' event and send it to the
+    // gateway delta region
+    if (event.getCallbackArgument() != null) {
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaForwarderCacheListener: Received destroy event for ")
+            .append(event.getKey())
+            .append("->")
+            .append(event.getNewValue())
+            .append(" that originated in the local site. Sending it to the remote site.");
+        this.cache.getLogger().fine(builder.toString());
+      }
+
+      // Distribute the destroy event to the gateway hub(s)
+      String sessionId = event.getKey();
+      getGatewayDeltaRegion().put(sessionId, new GatewayDeltaDestroyEvent(event.getRegion().getFullPath(), sessionId));
+    } else {
+      if (this.cache.getLogger().fineEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("GatewayDeltaForwarderCacheListener: Received destroy event for session ")
+            .append(event.getKey())
+            .append(" that either expired or originated in the remote site.");
+        this.cache.getLogger().fine(builder.toString());
+      }
+    }
+  }
+
+  public void init(Properties p) {
+  }
+
+  private LocalRegion getGatewayDeltaRegion() {
+    if (this.gatewayDeltaRegion == null) {
+      this.gatewayDeltaRegion = createOrRetrieveGatewayDeltaRegion();
+    }
+    return this.gatewayDeltaRegion;
+  }
+
+  @SuppressWarnings("unchecked")
+  private LocalRegion createOrRetrieveGatewayDeltaRegion() {
+    Region region = this.cache.getRegion(GatewayDelta.GATEWAY_DELTA_REGION_NAME);
+    if (region == null) {
+      region = new RegionFactory().setScope(Scope.LOCAL)
+          .setDataPolicy(DataPolicy.EMPTY)
+          .setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.ALL))
+// TODO: Disabled for WAN
+//        .setEnableGateway(true)
+          .addCacheListener(new GatewayDeltaEventApplicationCacheListener())
+          .create(GatewayDelta.GATEWAY_DELTA_REGION_NAME);
+    }
+    if (this.cache.getLogger().fineEnabled()) {
+      StringBuilder builder = new StringBuilder();
+      builder.append("GatewayDeltaForwarderCacheListener: Created gateway delta region: ").append(region);
+      this.cache.getLogger().fine(builder.toString());
+    }
+    return (LocalRegion) region;
+  }
+
+  public boolean equals(Object obj) {
+    // This method is only implemented so that RegionCreator.validateRegion works properly.
+    // The CacheListener comparison fails because two of these instances are not equal.
+    if (this == obj) {
+      return true;
+    }
+
+    if (obj == null || !(obj instanceof GatewayDeltaForwarderCacheListener)) {
+      return false;
+    }
+
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
new file mode 100644
index 0000000..ea81309
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
@@ -0,0 +1,398 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.bootstrap;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.control.ResourceManager;
+import com.gemstone.gemfire.distributed.internal.AbstractDistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.modules.util.Banner;
+import com.gemstone.gemfire.modules.util.RegionHelper;
+import com.gemstone.gemfire.modules.util.ResourceManagerValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+public abstract class AbstractCache {
+
+  protected GemFireCache cache;
+
+  private static final DateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd");
+
+  protected static final String DEFAULT_LOG_FILE_NAME = RegionHelper.NAME + "." + FORMAT.format(new Date()) + ".log";
+
+  protected static final String DEFAULT_STATISTIC_ARCHIVE_FILE_NAME = RegionHelper.NAME + ".gfs";
+
+  protected static final float DEFAULT_EVICTION_HEAP_PERCENTAGE = LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE;
+
+  protected static final float DEFAULT_CRITICAL_HEAP_PERCENTAGE = ResourceManager.DEFAULT_CRITICAL_PERCENTAGE;
+
+  protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractCache.class);
+
+  protected float evictionHeapPercentage = DEFAULT_EVICTION_HEAP_PERCENTAGE;
+
+  protected float criticalHeapPercentage = DEFAULT_CRITICAL_HEAP_PERCENTAGE;
+
+  protected boolean rebalance = false;
+
+  protected final Map<String, String> gemfireProperties;
+
+  private final AtomicBoolean started = new AtomicBoolean(false);
+
+  /**
+   * Instance reference which is set in static initialization blocks of any subclasses.
+   */
+  protected static AbstractCache instance = null;
+
+  public AbstractCache() {
+    this.gemfireProperties = new ConcurrentHashMap<String, String>();
+  }
+
+  public void lifecycleEvent(LifecycleTypeAdapter eventType) {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug("Received " + eventType + " event");
+    }
+
+    if (eventType.equals(LifecycleTypeAdapter.START) && started.compareAndSet(false, true)) {
+      // Create or retrieve the cache
+      getLogger().info("Initializing " + Banner.getString());
+      createOrRetrieveCache();
+
+      // Initialize the resource manager
+      initializeResourceManager();
+    } else if (eventType.equals(LifecycleTypeAdapter.AFTER_START)) {
+      if (getRebalance()) {
+        rebalanceCache();
+      }
+    } else if (eventType.equals(LifecycleTypeAdapter.STOP)) {
+      // Close the cache
+//      closeCache();
+      // TODO: Do we need to reset the started flag here?
+    }
+  }
+
+  public boolean isStarted() {
+    return started.get();
+  }
+
+  public void close() {
+    getCache().close();
+    while (!getCache().isClosed()) {
+    }
+
+    started.set(false);
+  }
+
+  public GemFireCache getCache() {
+    return this.cache;
+  }
+
+  public String getLogFileName() {
+    String logFileName = getGemFireProperties().get(DistributionConfig.LOG_FILE_NAME);
+    if (logFileName == null) {
+      logFileName = DEFAULT_LOG_FILE_NAME;
+    }
+    return logFileName;
+  }
+
+  public String getStatisticArchiveFileName() {
+    String statisticsArchiveFileName = getGemFireProperties().get(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
+    if (statisticsArchiveFileName == null) {
+      statisticsArchiveFileName = DEFAULT_STATISTIC_ARCHIVE_FILE_NAME;
+    }
+    return statisticsArchiveFileName;
+  }
+
+  public String getCacheXmlFileName() {
+    String cacheXmlFileName = getGemFireProperties().get(DistributionConfig.CACHE_XML_FILE_NAME);
+    if (cacheXmlFileName == null) {
+      cacheXmlFileName = getDefaultCacheXmlFileName();
+    }
+    return cacheXmlFileName;
+  }
+
+  protected File getCacheXmlFile() {
+    String cacheXmlFileName = getCacheXmlFileName();
+    File cacheXmlFile = new File(cacheXmlFileName);
+    // If the cache xml file is not absolute, point it at the conf directory.
+    if (!cacheXmlFile.isAbsolute()) {
+      if (System.getProperty("catalina.base") != null) {
+        cacheXmlFile = new File(System.getProperty("catalina.base") + "/conf/", cacheXmlFileName);
+      }
+    }
+    return cacheXmlFile;
+  }
+
+  public float getEvictionHeapPercentage() {
+    return this.evictionHeapPercentage;
+  }
+
+  public void setEvictionHeapPercentage(String evictionHeapPercentage) {
+    this.evictionHeapPercentage = Float.valueOf(evictionHeapPercentage);
+  }
+
+  public float getCriticalHeapPercentage() {
+    return this.criticalHeapPercentage;
+  }
+
+  public void setCriticalHeapPercentage(String criticalHeapPercentage) {
+    this.criticalHeapPercentage = Float.valueOf(criticalHeapPercentage);
+  }
+
+  public void setRebalance(boolean rebalance) {
+    this.rebalance = rebalance;
+  }
+
+  public boolean getRebalance() {
+    return this.rebalance;
+  }
+
+  public Map<String, String> getGemFireProperties() {
+    return this.gemfireProperties;
+  }
+
+  public void setProperty(String name, String value) {
+    //TODO Look at fake attributes
+    if (name.equals("className")) {
+      return;
+    }
+
+    // Determine the validity of the input property
+    boolean validProperty = false;
+    for (String gemfireProperty : AbstractDistributionConfig._getAttNames()) {
+      if (name.equals(gemfireProperty)) {
+        validProperty = true;
+        break;
+      }
+    }
+
+    // If it is a valid GemFire property, add it to the the GemFire properties.
+    // Otherwise, log a warning.
+    if (validProperty) {
+      this.gemfireProperties.put(name, value);
+    } else {
+      getLogger().warn("The input property named " + name + " is not a valid GemFire property. It is being ignored.");
+    }
+  }
+
+  public Logger getLogger() {
+    return LOGGER;
+  }
+
+  protected Properties createDistributedSystemProperties() {
+    Properties properties = new Properties();
+
+    // Add any additional gemfire properties
+    for (Map.Entry<String, String> entry : this.gemfireProperties.entrySet()) {
+      properties.put(entry.getKey(), entry.getValue());
+    }
+
+    // Replace the cache xml file in the properties
+    File cacheXmlFile = getCacheXmlFile();
+    String absoluteCacheXmlFileName = cacheXmlFile.getAbsolutePath();
+    // If the file doesn't exist and the name is the default, set cache-xml-file
+    // to the GemFire default. This is for the case where only the jars have been
+    // installed and no default cache.xml exists in the conf directory.
+    if (getCacheXmlFileName().equals(getDefaultCacheXmlFileName()) && !cacheXmlFile.exists()) {
+      absoluteCacheXmlFileName = DistributionConfig.DEFAULT_CACHE_XML_FILE.getName();
+    }
+    properties.put(DistributionConfig.CACHE_XML_FILE_NAME, absoluteCacheXmlFileName);
+
+    // Replace the log file in the properties
+    properties.put(DistributionConfig.LOG_FILE_NAME, getLogFile().getAbsolutePath());
+
+    // Replace the statistics archive file in the properties
+    File statisticArchiveFile = getStatisticArchiveFile();
+    if (statisticArchiveFile == null) {
+      // Remove the statistics archive file name since statistic sampling is disabled
+      properties.remove(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
+      properties.remove(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
+    } else {
+      properties.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, statisticArchiveFile.getAbsolutePath());
+    }
+    getLogger().info("Creating distributed system from: " + properties);
+
+    return properties;
+  }
+
+  protected void closeCache() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug("Closing " + this.cache);
+    }
+    if (getCache() != null) {
+      getCache().close();
+    }
+    getLogger().info("Closed " + this.cache);
+  }
+
+  protected File getLogFile() {
+    String logFileName = getLogFileName();
+    File logFile = new File(logFileName);
+    // If the log file is not absolute, point it at the logs directory.
+    if (!logFile.isAbsolute()) {
+      if (System.getProperty("catalina.base") != null) {
+        logFile = new File(System.getProperty("catalina.base") + "/logs/", logFileName);
+      } else if (System.getProperty("weblogic.Name") != null) {
+        String weblogicName = System.getProperty("weblogic.Name");
+        String separator = System.getProperty("file.separator");
+        logFile = new File("servers" + separator + weblogicName + separator +
+            "logs" + separator + logFileName);
+      } else {
+        logFile = new File(System.getProperty("gemfire.logdir"), logFileName);
+      }
+    }
+    return logFile;
+  }
+
+  protected File getStatisticArchiveFile() {
+    File statisticsArchiveFile = null;
+    String statisticSamplingEnabled = getGemFireProperties().get(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
+    if (statisticSamplingEnabled != null && statisticSamplingEnabled.equals("true")) {
+      String statisticsArchiveFileName = getStatisticArchiveFileName();
+      statisticsArchiveFile = new File(statisticsArchiveFileName);
+      // If the statistics archive file is not absolute, point it at the logs directory.
+      if (!statisticsArchiveFile.isAbsolute()) {
+        if (System.getProperty("catalina.base") != null) {
+          statisticsArchiveFile = new File(System.getProperty("catalina.base") + "/logs/", statisticsArchiveFileName);
+        } else if (System.getProperty("weblogic.Name") != null) {
+          String weblogicName = System.getProperty("weblogic.Name");
+          String separator = System.getProperty("file.separator");
+          statisticsArchiveFile = new File("servers" + separator + weblogicName + separator +
+              "logs" + separator + statisticsArchiveFileName);
+        } else {
+          statisticsArchiveFile = new File(System.getProperty("gemfire.statisticsdir"), statisticsArchiveFileName);
+        }
+      }
+    }
+    return statisticsArchiveFile;
+  }
+
+  protected void initializeResourceManager() {
+    // Get current eviction and critical heap percentages
+    ResourceManager rm = getCache().getResourceManager();
+    float currentEvictionHeapPercentage = rm.getEvictionHeapPercentage();
+    float currentCriticalHeapPercentage = rm.getCriticalHeapPercentage();
+
+    // Set new eviction and critical heap percentages if necessary
+    if (getEvictionHeapPercentage() != currentEvictionHeapPercentage || getCriticalHeapPercentage() != currentCriticalHeapPercentage) {
+      if (getLogger().isDebugEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("Previous eviction heap percentage=")
+            .append(currentEvictionHeapPercentage)
+            .append("; critical heap percentage=")
+            .append(currentCriticalHeapPercentage);
+        getLogger().debug(builder.toString());
+        builder.setLength(0);
+        builder.append("Requested eviction heap percentage=")
+            .append(getEvictionHeapPercentage())
+            .append("; critical heap percentage=")
+            .append(getCriticalHeapPercentage());
+        getLogger().debug(builder.toString());
+      }
+      if (currentCriticalHeapPercentage == 0.0f) {
+        // If the current critical heap percentage is 0 (disabled), set eviction
+        // heap percentage first, then set the critical heap percentage. At this
+        // point, the eviction heap percentage can be set to anything.
+        try {
+          rm.setEvictionHeapPercentage(getEvictionHeapPercentage());
+          rm.setCriticalHeapPercentage(getCriticalHeapPercentage());
+        } catch (IllegalArgumentException e) {
+          handleResourceManagerException(e, currentEvictionHeapPercentage, currentCriticalHeapPercentage);
+          rm.setEvictionHeapPercentage(currentEvictionHeapPercentage);
+          rm.setCriticalHeapPercentage(currentCriticalHeapPercentage);
+        }
+      } else if (getCriticalHeapPercentage() >= currentCriticalHeapPercentage) {
+        // If the requested critical heap percentage is >= the current critical
+        // heap percentage, then set the critical heap percentage first since it
+        // can safely be slid up. Then, set the eviction heap percentage.
+        try {
+          rm.setCriticalHeapPercentage(getCriticalHeapPercentage());
+          rm.setEvictionHeapPercentage(getEvictionHeapPercentage());
+        } catch (IllegalArgumentException e) {
+          handleResourceManagerException(e, currentEvictionHeapPercentage, currentCriticalHeapPercentage);
+          rm.setCriticalHeapPercentage(currentCriticalHeapPercentage);
+          rm.setEvictionHeapPercentage(currentEvictionHeapPercentage);
+        }
+      } else {
+        // If the requested critical heap percentage is < the current critical
+        // heap percentage, then set the eviction heap percentage first since it
+        // can safely be slid down. Then, set the critical heap percentage.
+        try {
+          rm.setEvictionHeapPercentage(getEvictionHeapPercentage());
+          rm.setCriticalHeapPercentage(getCriticalHeapPercentage());
+        } catch (IllegalArgumentException e) {
+          handleResourceManagerException(e, currentEvictionHeapPercentage, currentCriticalHeapPercentage);
+          rm.setEvictionHeapPercentage(currentEvictionHeapPercentage);
+          rm.setCriticalHeapPercentage(currentCriticalHeapPercentage);
+        }
+      }
+      if (getLogger().isDebugEnabled()) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("Actual eviction heap percentage=")
+            .append(rm.getEvictionHeapPercentage())
+            .append("; critical heap percentage=")
+            .append(rm.getCriticalHeapPercentage());
+        getLogger().debug(builder.toString());
+      }
+    }
+
+    // Validate java startup parameters (done after setting the eviction and
+    // critical heap percentages so that the CMSInitiatingOccupancyFraction can
+    // be compared against them.
+    ResourceManagerValidator.validateJavaStartupParameters(getCache());
+  }
+
+  private void handleResourceManagerException(IllegalArgumentException e, float currentEvictionHeapPercentage,
+      float currentCriticalHeapPercentage) {
+    StringBuilder builder = new StringBuilder();
+    builder.append("Caught exception attempting to set eviction heap percentage=")
+        .append(getEvictionHeapPercentage())
+        .append(" and critical heap percentage=")
+        .append(getCriticalHeapPercentage())
+        .append(". The percentages will be set back to their previous values (eviction heap percentage=")
+        .append(currentEvictionHeapPercentage)
+        .append(" and critical heap percentage=")
+        .append(currentCriticalHeapPercentage)
+        .append(").");
+    getLogger().warn(builder.toString(), e);
+  }
+
+  @Override
+  public String toString() {
+    return new StringBuilder().append(getClass().getSimpleName())
+        .append("[")
+        .append("cache=")
+        .append(this.cache)
+        .append("]")
+        .toString();
+  }
+
+  protected abstract void createOrRetrieveCache();
+
+  protected abstract void rebalanceCache();
+
+  protected abstract String getDefaultCacheXmlFileName();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
new file mode 100644
index 0000000..f8cff16
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/ClientServerCache.java
@@ -0,0 +1,74 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.bootstrap;
+
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.cache.client.ClientCacheFactory;
+
+/**
+ * This is a singleton class which maintains configuration properties as well as starting a Client-Server cache.
+ */
+public class ClientServerCache extends AbstractCache {
+
+  protected static final String DEFAULT_CACHE_XML_FILE_NAME = "cache-client.xml";
+
+  static {
+    instance = new ClientServerCache();
+  }
+
+  private ClientServerCache() {
+    // Singleton
+    super();
+  }
+
+  public static AbstractCache getInstance() {
+    return instance;
+  }
+
+  @Override
+  protected void createOrRetrieveCache() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Creating cache");
+    }
+    // Get the existing cache if any
+    try {
+      this.cache = ClientCacheFactory.getAnyInstance();
+    } catch (CacheClosedException e) {
+    }
+
+    // If no cache exists, create one
+    String message = null;
+    if (this.cache == null) {
+      // enable pool subscription so that default cache can be used by hibernate module
+      this.cache = new ClientCacheFactory(createDistributedSystemProperties()).create();
+      message = "Created ";
+    } else {
+      message = "Retrieved ";
+    }
+    getLogger().info(message + this.cache);
+  }
+
+  @Override
+  protected void rebalanceCache() {
+    getLogger().warn("The client cannot rebalance the server's cache.");
+  }
+
+  @Override
+  protected String getDefaultCacheXmlFileName() {
+    return DEFAULT_CACHE_XML_FILE_NAME;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/LifecycleTypeAdapter.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/LifecycleTypeAdapter.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/LifecycleTypeAdapter.java
new file mode 100644
index 0000000..2f0c9bb
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/LifecycleTypeAdapter.java
@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.gemstone.gemfire.modules.session.bootstrap;
+
+/**
+ * Adapter for the Catalina Lifecycle event types
+ */
+public enum LifecycleTypeAdapter {
+
+  CONFIGURE_START,
+
+  CONFIGURE_STOP,
+
+  AFTER_DESTROY,
+
+  AFTER_INIT,
+
+  AFTER_START,
+
+  AFTER_STOP,
+
+  BEFORE_DESTROY,
+
+  BEFORE_INIT,
+
+  BEFORE_START,
+
+  BEFORE_STOP,
+
+  DESTROY,
+
+  INIT,
+
+  PERIODIC,
+
+  START,
+
+  STOP;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
new file mode 100644
index 0000000..b0b3b4a
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/PeerToPeerCache.java
@@ -0,0 +1,85 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.bootstrap;
+
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.control.RebalanceResults;
+import com.gemstone.gemfire.modules.util.RegionHelper;
+
+/**
+ * This is a singleton class which maintains configuration properties as well as starting a Peer-To-Peer cache.
+ */
+
+public class PeerToPeerCache extends AbstractCache {
+
+  protected static final String DEFAULT_CACHE_XML_FILE_NAME = "cache-peer.xml";
+
+  static {
+    instance = new PeerToPeerCache();
+  }
+
+  private PeerToPeerCache() {
+    // Singleton
+    super();
+  }
+
+  public static AbstractCache getInstance() {
+    return instance;
+  }
+
+  @Override
+  protected void createOrRetrieveCache() {
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug("Creating cache");
+    }
+    // Get the existing cache if any
+    try {
+      this.cache = CacheFactory.getAnyInstance();
+    } catch (CacheClosedException e) {
+    }
+
+    // If no cache exists, create one
+    String message = null;
+    if (this.cache == null) {
+      this.cache = new CacheFactory(createDistributedSystemProperties()).create();
+      message = "Created ";
+    } else {
+      message = "Retrieved ";
+    }
+    getLogger().info(message + this.cache);
+  }
+
+  @Override
+  protected void rebalanceCache() {
+    try {
+      getLogger().info("Rebalancing: " + this.cache);
+      RebalanceResults results = RegionHelper.rebalanceCache(this.cache);
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug("Done rebalancing: " + this.cache);
+        getLogger().debug(RegionHelper.getRebalanceResultsMessage(results));
+      }
+    } catch (Exception e) {
+      getLogger().warn("Rebalance failed because of the following exception:", e);
+    }
+  }
+
+  @Override
+  protected String getDefaultCacheXmlFileName() {
+    return DEFAULT_CACHE_XML_FILE_NAME;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractCacheLifecycleListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractCacheLifecycleListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractCacheLifecycleListener.java
new file mode 100644
index 0000000..1019ddc
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractCacheLifecycleListener.java
@@ -0,0 +1,68 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+
+import com.gemstone.gemfire.modules.session.bootstrap.AbstractCache;
+import com.gemstone.gemfire.modules.session.bootstrap.LifecycleTypeAdapter;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+
+
+public abstract class AbstractCacheLifecycleListener implements LifecycleListener {
+  protected AbstractCache cache;
+
+  @Override
+  public void lifecycleEvent(LifecycleEvent le) {
+    cache.lifecycleEvent(LifecycleTypeAdapter.valueOf(le.getType().toUpperCase()));
+  }
+
+  /**
+   * This is called by Tomcat to set properties on the Listener.
+   */
+  public void setProperty(String name, String value) {
+    cache.setProperty(name, value);
+  }
+
+  /*
+   * These getters and setters are also called by Tomcat and just passed on to
+   * the cache.
+   */
+  public float getEvictionHeapPercentage() {
+    return cache.getEvictionHeapPercentage();
+  }
+
+  public void setEvictionHeapPercentage(String evictionHeapPercentage) {
+    cache.setEvictionHeapPercentage(evictionHeapPercentage);
+  }
+
+  public float getCriticalHeapPercentage() {
+    return cache.getCriticalHeapPercentage();
+  }
+
+  public void setCriticalHeapPercentage(String criticalHeapPercentage) {
+    cache.setCriticalHeapPercentage(criticalHeapPercentage);
+  }
+
+  public void setRebalance(boolean rebalance) {
+    cache.setRebalance(rebalance);
+  }
+
+  public boolean getRebalance() {
+    return cache.getRebalance();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractSessionCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractSessionCache.java
new file mode 100644
index 0000000..3019cae
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/AbstractSessionCache.java
@@ -0,0 +1,113 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.session.catalina.internal.DeltaSessionStatistics;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import com.gemstone.gemfire.modules.util.SessionCustomExpiry;
+import org.apache.catalina.Session;
+
+import javax.servlet.http.HttpSession;
+
+public abstract class AbstractSessionCache implements SessionCache {
+
+  protected SessionManager sessionManager;
+
+  /**
+   * The sessionRegion is the <code>Region</code> that actually stores and replicates the <code>Session</code>s.
+   */
+  protected Region<String, HttpSession> sessionRegion;
+
+  /**
+   * The operatingRegion is the <code>Region</code> used to do HTTP operations. if local cache is enabled, then this
+   * will be the local <code>Region</code>; otherwise, it will be the session <code>Region</code>.
+   */
+  protected Region<String, HttpSession> operatingRegion;
+
+  protected DeltaSessionStatistics statistics;
+
+  public AbstractSessionCache(SessionManager sessionManager) {
+    this.sessionManager = sessionManager;
+  }
+
+  @Override
+  public String getSessionRegionName() {
+    return getSessionRegion().getFullPath();
+  }
+
+  @Override
+  public String getOperatingRegionName() {
+    return getOperatingRegion().getFullPath();
+  }
+
+  @Override
+  public void putSession(Session session) {
+    getOperatingRegion().put(session.getId(), (HttpSession) session);
+  }
+
+  @Override
+  public HttpSession getSession(String sessionId) {
+    return getOperatingRegion().get(sessionId);
+  }
+
+  @Override
+  public void destroySession(String sessionId) {
+    try {
+      getOperatingRegion().destroy(sessionId);
+    } catch (EntryNotFoundException enex) {
+      // Ignored
+    }
+  }
+
+  @Override
+  public DeltaSessionStatistics getStatistics() {
+    return this.statistics;
+  }
+
+  protected SessionManager getSessionManager() {
+    return this.sessionManager;
+  }
+
+  public Region<String, HttpSession> getSessionRegion() {
+    return this.sessionRegion;
+  }
+
+  public Region<String, HttpSession> getOperatingRegion() {
+    return this.operatingRegion;
+  }
+
+  protected void createStatistics() {
+    this.statistics = new DeltaSessionStatistics(getCache().getDistributedSystem(),
+        getSessionManager().getStatisticsName());
+  }
+
+  protected RegionConfiguration createRegionConfiguration() {
+    RegionConfiguration configuration = new RegionConfiguration();
+    configuration.setRegionName(getSessionManager().getRegionName());
+    configuration.setRegionAttributesId(getSessionManager().getRegionAttributesId());
+    if (getSessionManager().getMaxInactiveInterval() != RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL) {
+      configuration.setMaxInactiveInterval(getSessionManager().getMaxInactiveInterval());
+      configuration.setCustomExpiry(new SessionCustomExpiry());
+    }
+    configuration.setEnableGatewayDeltaReplication(getSessionManager().getEnableGatewayDeltaReplication());
+    configuration.setEnableGatewayReplication(getSessionManager().getEnableGatewayReplication());
+    configuration.setEnableDebugListener(getSessionManager().getEnableDebugListener());
+    return configuration;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerCacheLifecycleListener.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerCacheLifecycleListener.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerCacheLifecycleListener.java
new file mode 100644
index 0000000..ba66fa2
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerCacheLifecycleListener.java
@@ -0,0 +1,26 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.modules.session.bootstrap.ClientServerCache;
+
+public class ClientServerCacheLifecycleListener extends AbstractCacheLifecycleListener {
+
+  public ClientServerCacheLifecycleListener() {
+    cache = ClientServerCache.getInstance();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerSessionCache.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerSessionCache.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerSessionCache.java
new file mode 100644
index 0000000..2de43b4
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/ClientServerSessionCache.java
@@ -0,0 +1,252 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.InterestResultPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientRegionFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.execute.Execution;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.modules.session.catalina.callback.SessionExpirationCacheListener;
+import com.gemstone.gemfire.modules.util.BootstrappingFunction;
+import com.gemstone.gemfire.modules.util.CreateRegionFunction;
+import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import com.gemstone.gemfire.modules.util.RegionSizeFunction;
+import com.gemstone.gemfire.modules.util.RegionStatus;
+import com.gemstone.gemfire.modules.util.SessionCustomExpiry;
+import com.gemstone.gemfire.modules.util.TouchPartitionedRegionEntriesFunction;
+import com.gemstone.gemfire.modules.util.TouchReplicatedRegionEntriesFunction;
+
+import javax.servlet.http.HttpSession;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class ClientServerSessionCache extends AbstractSessionCache {
+
+  private ClientCache cache;
+
+  protected static final String DEFAULT_REGION_ATTRIBUTES_ID = RegionShortcut.PARTITION_REDUNDANT.toString();
+
+  protected static final boolean DEFAULT_ENABLE_LOCAL_CACHE = true;
+
+  public ClientServerSessionCache(SessionManager sessionManager, ClientCache cache) {
+    super(sessionManager);
+    this.cache = cache;
+  }
+
+  @Override
+  public void initialize() {
+    // Bootstrap the servers
+    bootstrapServers();
+
+    // Create or retrieve the region
+    try {
+      createOrRetrieveRegion();
+    } catch (Exception ex) {
+      sessionManager.getLogger().fatal("Unable to create or retrieve region", ex);
+      throw new IllegalStateException(ex);
+    }
+
+    // Set the session region directly as the operating region since there is no difference
+    // between the local cache region and the session region.
+    this.operatingRegion = this.sessionRegion;
+
+    // Create or retrieve the statistics
+    createStatistics();
+  }
+
+  @Override
+  public String getDefaultRegionAttributesId() {
+    return DEFAULT_REGION_ATTRIBUTES_ID;
+  }
+
+  @Override
+  public boolean getDefaultEnableLocalCache() {
+    return DEFAULT_ENABLE_LOCAL_CACHE;
+  }
+
+  @Override
+  public void touchSessions(Set<String> sessionIds) {
+    // Get the region attributes id to determine the region type. This is
+    // problematic since the region attributes id doesn't really define the
+    // region type. Currently there is no way to know the type of region created
+    // on the server. Maybe the CreateRegionFunction should return it.
+    String regionAttributesID = getSessionManager().getRegionAttributesId().toLowerCase();
+
+    // Invoke the appropriate function depending on the type of region
+    if (regionAttributesID.startsWith("partition")) {
+      // Execute the partitioned touch function on the primary server(s)
+      Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(sessionIds);
+      try {
+        ResultCollector collector = execution.execute(TouchPartitionedRegionEntriesFunction.ID, true, false, true);
+        collector.getResult();
+      } catch (Exception e) {
+        // If an exception occurs in the function, log it.
+        getSessionManager().getLogger().warn("Caught unexpected exception:", e);
+      }
+    } else {
+      // Execute the member touch function on all the server(s)
+      Execution execution = FunctionService.onServers(getCache())
+          .withArgs(new Object[]{this.sessionRegion.getFullPath(), sessionIds});
+      try {
+        ResultCollector collector = execution.execute(TouchReplicatedRegionEntriesFunction.ID, true, false, false);
+        collector.getResult();
+      } catch (Exception e) {
+        // If an exception occurs in the function, log it.
+        getSessionManager().getLogger().warn("Caught unexpected exception:", e);
+      }
+    }
+  }
+
+  @Override
+  public boolean isPeerToPeer() {
+    return false;
+  }
+
+  @Override
+  public boolean isClientServer() {
+    return true;
+  }
+
+  @Override
+  public Set<String> keySet() {
+    return getSessionRegion().keySetOnServer();
+  }
+
+  @Override
+  public int size() {
+    // Add a single dummy key to force the function to go to one server
+    Set<String> filters = new HashSet<String>();
+    filters.add("test-key");
+
+    // Execute the function on the session region
+    Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(filters);
+    ResultCollector collector = execution.execute(RegionSizeFunction.ID, true, true, true);
+    List<Integer> result = (List<Integer>) collector.getResult();
+
+    // Return the first (and only) element
+    return result.get(0);
+  }
+
+  @Override
+  public boolean isBackingCacheAvailable() {
+    if (getSessionManager().isCommitValveFailfastEnabled()) {
+      PoolImpl pool = (PoolImpl) PoolManager.find(getOperatingRegionName());
+      return pool.isPrimaryUpdaterAlive();
+    }
+    return true;
+  }
+
+  public GemFireCache getCache() {
+    return this.cache;
+  }
+
+  private void bootstrapServers() {
+    Execution execution = FunctionService.onServers(this.cache);
+    ResultCollector collector = execution.execute(new BootstrappingFunction());
+    // Get the result. Nothing is being done with it.
+    try {
+      collector.getResult();
+    } catch (Exception e) {
+      // If an exception occurs in the function, log it.
+      getSessionManager().getLogger().warn("Caught unexpected exception:", e);
+    }
+  }
+
+  protected void createOrRetrieveRegion() {
+    // Retrieve the local session region
+    this.sessionRegion = this.cache.getRegion(getSessionManager().getRegionName());
+
+    // If necessary, create the regions on the server and client
+    if (this.sessionRegion == null) {
+      // Create the PR on the servers
+      createSessionRegionOnServers();
+
+      // Create the region on the client
+      this.sessionRegion = createLocalSessionRegion();
+      if (getSessionManager().getLogger().isDebugEnabled()) {
+        getSessionManager().getLogger().debug("Created session region: " + this.sessionRegion);
+      }
+    } else {
+      if (getSessionManager().getLogger().isDebugEnabled()) {
+        getSessionManager().getLogger().debug("Retrieved session region: " + this.sessionRegion);
+      }
+    }
+  }
+
+  private void createSessionRegionOnServers() {
+    // Create the RegionConfiguration
+    RegionConfiguration configuration = createRegionConfiguration();
+
+    // Send it to the server tier
+    Execution execution = FunctionService.onServer(this.cache).withArgs(configuration);
+    ResultCollector collector = execution.execute(CreateRegionFunction.ID);
+
+    // Verify the region was successfully created on the servers
+    List<RegionStatus> results = (List<RegionStatus>) collector.getResult();
+    for (RegionStatus status : results) {
+      if (status == RegionStatus.INVALID) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("An exception occurred on the server while attempting to create or validate region named ")
+            .append(getSessionManager().getRegionName())
+            .append(". See the server log for additional details.");
+        throw new IllegalStateException(builder.toString());
+      }
+    }
+  }
+
+  private Region<String, HttpSession> createLocalSessionRegion() {
+    ClientRegionFactory<String, HttpSession> factory = null;
+    if (getSessionManager().getEnableLocalCache()) {
+      // Create the region factory with caching and heap LRU enabled
+      factory = this.cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY_HEAP_LRU);
+
+      // Set the expiration time, action and listener if necessary
+      int maxInactiveInterval = getSessionManager().getMaxInactiveInterval();
+      if (maxInactiveInterval != RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL) {
+        factory.setStatisticsEnabled(true);
+        factory.setCustomEntryIdleTimeout(new SessionCustomExpiry());
+        factory.addCacheListener(new SessionExpirationCacheListener());
+      }
+    } else {
+      // Create the region factory without caching enabled
+      factory = this.cache.createClientRegionFactory(ClientRegionShortcut.PROXY);
+      factory.addCacheListener(new SessionExpirationCacheListener());
+    }
+
+    // Create the region
+    Region region = factory.create(getSessionManager().getRegionName());
+
+    /*
+     * If we're using an empty client region, we register interest so that
+     * expired sessions are destroyed correctly.
+     */
+    if (!getSessionManager().getEnableLocalCache()) {
+      region.registerInterest("ALL_KEYS", InterestResultPolicy.KEYS);
+    }
+
+    return region;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/CommitSessionValve.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/CommitSessionValve.java b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/CommitSessionValve.java
new file mode 100644
index 0000000..0ae17f2
--- /dev/null
+++ b/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/session/catalina/CommitSessionValve.java
@@ -0,0 +1,68 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import org.apache.catalina.Manager;
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.valves.ValveBase;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
+import javax.servlet.ServletException;
+import java.io.IOException;
+
+public class CommitSessionValve extends ValveBase {
+
+  private static final Log log = LogFactory.getLog(CommitSessionValve.class);
+
+  protected static final String info = "com.gemstone.gemfire.modules.session.catalina.CommitSessionValve/1.0";
+
+  public CommitSessionValve() {
+    log.info("Initialized");
+  }
+
+  @Override
+  public void invoke(Request request, Response response) throws IOException, ServletException {
+    // Get the Manager
+    Manager manager = request.getContext().getManager();
+    DeltaSessionFacade session = null;
+
+    // Invoke the next Valve
+    try {
+      getNext().invoke(request, response);
+    } finally {
+      // Commit and if the correct Manager was found
+      if (manager instanceof DeltaSessionManager) {
+        session = (DeltaSessionFacade) request.getSession(false);
+        if (session != null) {
+          if (session.isValid()) {
+            ((DeltaSessionManager) manager).removeTouchedSession(session.getId());
+            session.commit();
+            if (manager.getContainer().getLogger().isDebugEnabled()) {
+              manager.getContainer().getLogger().debug(session + ": Committed.");
+            }
+          } else {
+            if (manager.getContainer().getLogger().isDebugEnabled()) {
+              manager.getContainer().getLogger().debug(session + ": Not valid so not committing.");
+            }
+          }
+        }
+      }
+    }
+  }
+}


[02/50] [abbrv] incubator-geode git commit: This closes #88

Posted by kl...@apache.org.
This closes #88


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/77f98113
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/77f98113
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/77f98113

Branch: refs/heads/feature/GEODE-268
Commit: 77f98113c36786191a6c5061f8915cb6e79f9c91
Parents: 806142d 06c3438
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Thu Feb 4 08:14:17 2016 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Thu Feb 4 08:14:17 2016 -0800

----------------------------------------------------------------------
 gemfire-site/website/content/community/index.html | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/77f98113/gemfire-site/website/content/community/index.html
----------------------------------------------------------------------


[17/50] [abbrv] incubator-geode git commit: GEODE-14: Integration of GemFire Session Replication and Hibernate modules

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
new file mode 100644
index 0000000..0abd85e
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
@@ -0,0 +1,1558 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.concurrent.TimeUnit;
+import javax.servlet.DispatcherType;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.modules.session.junit.PerTestClassLoaderRunner;
+import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.jasper.servlet.JspServlet;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.http.HttpTester;
+
+import static org.junit.Assert.*;
+
+/**
+ * In-container testing using Jetty. This allows us to test context listener
+ * events as well as dispatching actions.
+ */
+@Category(IntegrationTest.class)
+@RunWith(PerTestClassLoaderRunner.class)
+public class SessionReplicationIntegrationJUnitTest {
+
+  private MyServletTester tester;
+
+  private HttpTester.Request request;
+
+  private HttpTester.Response response;
+
+  private ServletHolder servletHolder;
+
+  private FilterHolder filterHolder;
+
+  private static final File tmpdir;
+
+  private static final String gemfire_log;
+
+  static {
+    // Create a per-user scratch directory
+    tmpdir = new File(System.getProperty("java.io.tmpdir"),
+        "gemfire_modules-" + System.getProperty("user.name"));
+    tmpdir.mkdirs();
+    tmpdir.deleteOnExit();
+
+    gemfire_log = tmpdir.getPath() +
+        System.getProperty("file.separator") + "gemfire_modules.log";
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    request = HttpTester.newRequest();
+
+    tester = new MyServletTester();
+    tester.setContextPath("/test");
+
+    filterHolder = tester.addFilter(SessionCachingFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
+    filterHolder.setInitParameter("gemfire.property.mcast-port", "0");
+    filterHolder.setInitParameter("gemfire.property.log-file", gemfire_log);
+    filterHolder.setInitParameter("cache-type", "peer-to-peer");
+
+    servletHolder = tester.addServlet(BasicServlet.class, "/hello");
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    /**
+     * This starts the servlet. Our wrapped servlets *must* start
+     * immediately otherwise the ServletContext is not captured correctly.
+     */
+    servletHolder.setInitOrder(0);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+//    if (tester.isStarted()) {
+//      ContextManager.getInstance().removeContext(
+//          servletHolder.getServlet().getServletConfig().getServletContext());
+//    }
+    tester.stop();
+  }
+
+  @Test
+  public void testSanity() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        PrintWriter out = response.getWriter();
+        out.write("Hello World");
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals(200, response.getStatus());
+    assertEquals("Hello World", response.getContent());
+  }
+
+  @Test
+  public void testSessionGenerated() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        PrintWriter out = response.getWriter();
+        out.write(request.getSession().getId());
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertTrue("Not a correctly generated session id",
+        response.getContent().endsWith("-GF"));
+
+    List<Cookie> cookies = getCookies(response);
+    assertEquals("Session id != JSESSIONID from cookie",
+        response.getContent(), cookies.get(0).getValue());
+
+    Region r = getRegion();
+    assertNotNull("Session not found in region",
+        r.get(cookies.get(0).getValue()));
+  }
+
+
+  /**
+   * Test that getSession(false) does not create a new session
+   */
+  @Test
+  public void testSessionNotGenerated() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        String output = "OK";
+        HttpSession s = request.getSession(false);
+        if (s != null) {
+          output = s.getId();
+        }
+        PrintWriter out = response.getWriter();
+        out.write(output);
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("Session should not have been created", "OK",
+        response.getContent());
+  }
+
+
+  @Test
+  public void testUnknownAttributeIsNull() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        Object o = request.getSession().getAttribute("unknown");
+        PrintWriter out = response.getWriter();
+        if (o == null) {
+          out.write("null");
+        } else {
+          out.write(o.toString());
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("Unknown attribute should be null", "null",
+        response.getContent());
+  }
+
+
+  @Test
+  public void testSessionRemains1() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        String output = "null";
+        HttpSession session = request.getSession();
+        if (session.isNew()) {
+          output = "new";
+          session.setAttribute("foo", output);
+        } else {
+          output = (String) session.getAttribute("foo");
+          if (output != null) {
+            output = "old";
+          }
+        }
+        PrintWriter out = response.getWriter();
+        out.write(output);
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("Session should be new", "new", response.getContent());
+
+    List<Cookie> cookies = getCookies(response);
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("Session should be old", "old", response.getContent());
+
+    List<Cookie> cookies2 = getCookies(response);
+    assertEquals("Session IDs should be the same", cookies.get(0).getValue(),
+        cookies2.get(0).getValue());
+
+    Region r = getRegion();
+    assertNotNull("Session object should exist in region",
+        r.get(cookies.get(0).getValue()));
+  }
+
+  /**
+   * Test that attributes are updated on the backend
+   */
+  @Test
+  public void testAttributesUpdatedInRegion() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        request.getSession().setAttribute("foo", "bar");
+      }
+    };
+
+    // This is the callback used to invalidate the session
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        request.getSession().setAttribute("foo", "baz");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    ServletHolder sh2 = tester.addServlet(BasicServlet.class, "/request2");
+    sh2.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    List<Cookie> cookies = getCookies(response);
+
+    Region r = getRegion();
+    assertEquals("bar",
+        ((HttpSession) r.get(cookies.get(0).getValue())).getAttribute("foo"));
+
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+    request.setURI("/test/request2");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("baz",
+        ((HttpSession) r.get(cookies.get(0).getValue())).getAttribute(
+            "foo"));
+  }
+
+  /**
+   * Test setting an attribute to null deletes it
+   */
+  @Test
+  public void testSetAttributeNullDeletesIt() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        request.getSession().setAttribute("foo", "bar");
+      }
+    };
+
+    // This is the callback used to invalidate the session
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        request.getSession().setAttribute("foo", null);
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    ServletHolder sh2 = tester.addServlet(BasicServlet.class, "/request2");
+    sh2.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    List<Cookie> cookies = getCookies(response);
+
+    Region r = getRegion();
+    assertEquals("bar",
+        ((HttpSession) r.get(cookies.get(0).getValue())).getAttribute(
+            "foo"));
+
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+    request.setURI("/test/request2");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertNull(
+        ((HttpSession) r.get(cookies.get(0).getValue())).getAttribute(
+            "foo"));
+  }
+
+// Don't see how to do this currently as the SessionListener needs a full
+// web context to work in.
+
+//    /**
+//     * Test that sessions expire correctly
+//     */
+//    public void testSessionExpiration() throws Exception {
+//        Callback c_1 = new Callback() {
+//            @Override
+//            public void call(HttpServletRequest request, HttpServletResponse response)
+//                    throws IOException, ServletException {
+//                HttpSession s = request.getSession();
+//                s.setAttribute("foo", "bar");
+//                s.setMaxInactiveInterval(1);
+//
+//                PrintWriter out = response.getWriter();
+//                out.write(s.getId());
+//            }
+//        };
+//
+//        // This is the callback used to check if the session is still there
+//        Callback c_2 = new Callback() {
+//            @Override
+//            public void call(HttpServletRequest request, HttpServletResponse response)
+//                    throws IOException, ServletException {
+//                HttpSession s = request.getSession(false);
+//                String output;
+//                if (s == null) {
+//                    output = "null";
+//                } else {
+//                    output = s.getId();
+//                }
+//
+//                PrintWriter out = response.getWriter();
+//                out.write(output);
+//            }
+//        };
+//
+//        tester.addEventListener(new SessionListener());
+//        tester.setAttribute("callback_1", c_1);
+//        tester.setAttribute("callback_2", c_2);
+//
+//        servletHolder.setInitParameter("test.callback", "callback_1");
+//
+//        ServletHolder sh2 = tester.addServlet(BasicServlet.class, "/request2");
+//        sh2.setInitParameter("test.callback", "callback_2");
+//
+//        tester.start();
+//        ContextManager.getInstance().putContext(
+//                servletHolder.getServlet().getServletConfig().getServletContext());
+//
+//        request.setMethod("GET");
+//        request.setURI("/test/hello");
+//        request.setHeader("Host", "tester");
+//        request.setVersion("HTTP/1.0");
+//        response.parse(tester.getResponses(request.generate()));
+//
+//        String id = response.getContent();
+//
+//        // Wait for the session to expire
+//        Thread.sleep(2000);
+//
+//        request.setHeader("Cookie", "JSESSIONID=" + id);
+//        request.setURI("/test/request2");
+//        response.parse(tester.getResponses(request.generate()));
+//
+//        assertEquals("null", response.getContent());
+//
+//        Region r = getRegion();
+//        assertNull("Region should not contain session", r.get(id));
+//    }
+
+  /**
+   * Test that invalidating a session destroys it as well as the backend
+   * object.
+   */
+  @Test
+  public void testInvalidateSession1() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        request.getSession().setAttribute("foo", "bar");
+      }
+    };
+
+    // This is the callback used to invalidate the session
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        request.getSession(false).invalidate();
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    ServletHolder sh2 = tester.addServlet(BasicServlet.class, "/request2");
+    sh2.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    List<Cookie> cookies = getCookies(response);
+    Region r = getRegion();
+    assertEquals("bar",
+        ((HttpSession) r.get(cookies.get(0).getValue())).getAttribute("foo"));
+
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+    request.setURI("/test/request2");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertNull("Region should not contain session",
+        r.get(cookies.get(0).getValue()));
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession2() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.getAttribute("foo");
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession3() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.getAttributeNames();
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession4() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.getCreationTime();
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session does not throw an exception for subsequent
+   * getId calls.
+   */
+  @Test
+  public void testInvalidateSession5() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        s.getId();
+        PrintWriter out = response.getWriter();
+        out.write("OK");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession6() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.getLastAccessedTime();
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session does not throw an exception for
+   * subsequent getMaxInactiveInterval calls.
+   */
+
+// I've commented this out for now as Jetty seems to want to throw an
+// Exception here where the HttpServlet api doesn't specify that.
+  @Test
+  public void testInvalidateSession7() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request,
+          HttpServletResponse response) throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        s.getMaxInactiveInterval();
+        PrintWriter out = response.getWriter();
+        out.write("OK");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session does not throw an exception for subsequent
+   * getServletContext calls.
+   */
+  @Test
+  public void testInvalidateSession8() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        s.getServletContext();
+        PrintWriter out = response.getWriter();
+        out.write("OK");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession9() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.isNew();
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession10() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.removeAttribute("foo");
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session throws an exception on subsequent access.
+   */
+  @Test
+  public void testInvalidateSession11() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        PrintWriter out = response.getWriter();
+        try {
+          s.setAttribute("foo", "bar");
+        } catch (IllegalStateException iex) {
+          out.write("OK");
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session does not throw an exception for subsequent
+   * setMaxInactiveInterval calls.
+   */
+  @Test
+  public void testInvalidateSession12() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        s.setMaxInactiveInterval(1);
+        PrintWriter out = response.getWriter();
+        out.write("OK");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+  /**
+   * Test that invalidating a session results in null being returned on
+   * subsequent getSession(false) calls.
+   */
+  @Test
+  public void testInvalidateSession13() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+        s = request.getSession(false);
+        PrintWriter out = response.getWriter();
+        if (s == null) {
+          out.write("OK");
+        } else {
+          out.write(s.toString());
+        }
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+
+    servletHolder.setInitParameter("test.callback", "callback_1");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("OK", response.getContent());
+  }
+
+
+  /**
+   * Test that we can invalidate and then recreate a new session
+   */
+  @Test
+  public void testInvalidateAndRecreateSession() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+
+        PrintWriter out = response.getWriter();
+        out.write(request.getSession().getId());
+      }
+    };
+
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.invalidate();
+
+        PrintWriter out = response.getWriter();
+        out.write(request.getSession().getId());
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    ServletHolder sh = tester.addServlet(BasicServlet.class, "/dispatch");
+    sh.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        sh.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    String session1 = response.getContent();
+
+    request.setHeader("Cookie", "JSESSIONID=" + session1);
+    request.setURI("/test/request2");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    String session12 = response.getContent();
+    assertFalse("First and subsequent session ids must not be the same",
+        session1.equals(session12));
+  }
+
+
+  /**
+   * Test that creation time does not change on subsequent access
+   */
+  @Test
+  public void testGetCreationTime() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession session = request.getSession();
+        PrintWriter out = response.getWriter();
+        out.write(Long.toString(session.getCreationTime()));
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    long time1 = Long.parseLong(response.getContent());
+    assertTrue("Creation time should be positive", time1 > 0);
+
+    List<Cookie> cookies = getCookies(response);
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+
+    try {
+      Thread.sleep(1000);
+    } catch (Exception ex) {
+    }
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    long time2 = Long.parseLong(response.getContent());
+    assertTrue("Creation time should be the same across requests",
+        time1 == time2);
+  }
+
+  /**
+   * Test that the last accessed time is updated on subsequent access
+   */
+  @Test
+  public void testGetLastAccessedTime() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession session = request.getSession();
+        PrintWriter out = response.getWriter();
+        out.write(Long.toString(session.getLastAccessedTime()));
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    long time1 = Long.parseLong(response.getContent());
+//        assertTrue("Last accessed time should be positive", time1 > 0);
+
+    List<Cookie> cookies = getCookies(response);
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+
+    Thread.sleep(1000);
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    long time2 = Long.parseLong(response.getContent());
+    assertTrue("Last accessed time should be increasing across requests",
+        time2 > time1);
+  }
+
+  /**
+   * Test that the underlying native session remains the same across requests
+   */
+  @Test
+  public void testNativeSessionRemainsUnchanged() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        GemfireHttpSession session = (GemfireHttpSession) request.getSession();
+        PrintWriter out = response.getWriter();
+        out.write(session.getNativeSession().getId());
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    String nativeSessionId = response.getContent();
+
+    List<Cookie> cookies = getCookies(response);
+    String sessionId = cookies.get(0).getValue();
+    Region r = getRegion();
+
+    assertEquals(
+        "Cached native session id does not match servlet returned native session id",
+        nativeSessionId,
+        ((GemfireHttpSession) r.get(sessionId)).getNativeSession().getId());
+
+    request.setHeader("Cookie", "JSESSIONID=" + cookies.get(0).getValue());
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals(
+        "Underlying native sessions must remain the same across requests",
+        nativeSessionId,
+        ((GemfireHttpSession) r.get(sessionId)).getNativeSession().getId());
+  }
+
+  /**
+   * Test session id embedded in the URL
+   */
+  @Test
+  public void testSessionIdEmbeddedInUrl() throws Exception {
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        GemfireHttpSession session = (GemfireHttpSession) request.getSession();
+        PrintWriter out = response.getWriter();
+        out.write(session.getId());
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    List<Cookie> cookies = getCookies(response);
+    String sessionId = response.getContent();
+    assertEquals("Session ids should be the same", sessionId,
+        cookies.get(0).getValue());
+
+    request.setURI("/test/hello;jsessionid=" + sessionId);
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    cookies = getCookies(response);
+
+    assertEquals("Session ids should be the same", sessionId,
+        cookies.get(0).getValue());
+  }
+
+
+  /**
+   * Test that request forward dispatching works
+   */
+  @Test
+  public void testDispatchingForward1() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        RequestDispatcher dispatcher = request.getRequestDispatcher("dispatch");
+        dispatcher.forward(request, response);
+
+        // This should not appear in the output
+        PrintWriter out = response.getWriter();
+        out.write("bang");
+      }
+    };
+
+    // This is the callback used by the forward servlet
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        PrintWriter out = response.getWriter();
+        out.write("dispatched");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    ServletHolder sh = tester.addServlet(BasicServlet.class, "/dispatch");
+    sh.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        sh.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    assertEquals("dispatched", response.getContent());
+
+//    ContextManager.getInstance().removeContext(
+//        sh.getServlet().getServletConfig().getServletContext());
+  }
+
+
+  /**
+   * Test that request include dispatching works
+   */
+  @Test
+  public void testDispatchingInclude() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        RequestDispatcher dispatcher = request.getRequestDispatcher("dispatch");
+        dispatcher.include(request, response);
+
+        // This *should* appear in the output
+        PrintWriter out = response.getWriter();
+        out.write("_bang");
+      }
+    };
+
+    // This is the callback used by the include servlet
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        PrintWriter out = response.getWriter();
+        out.write("dispatched");
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    ServletHolder sh = tester.addServlet(BasicServlet.class, "/dispatch");
+    sh.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        sh.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    assertEquals("dispatched_bang", response.getContent());
+
+//    ContextManager.getInstance().removeContext(
+//        sh.getServlet().getServletConfig().getServletContext());
+  }
+
+
+  /**
+   * Test to try and simulate a failover scenario
+   */
+  @Test
+  public void testFailover1() throws Exception {
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        HttpSession s = request.getSession();
+        s.setAttribute("foo", "bar");
+
+        PrintWriter out = response.getWriter();
+        out.write(request.getSession().getId());
+      }
+    };
+
+    Callback c_2 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        HttpSession s = request.getSession();
+
+        PrintWriter out = response.getWriter();
+        out.write((String) s.getAttribute("foo"));
+      }
+    };
+
+    tester.setAttribute("callback_1", c_1);
+    tester.setAttribute("callback_2", c_2);
+
+    ServletHolder sh = tester.addServlet(BasicServlet.class, "/request2");
+    sh.setInitParameter("test.callback", "callback_2");
+
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        sh.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+    String id = response.getContent();
+
+    // Now we simulate the failover by removing the native session from
+    // the stored session
+    Region r = getRegion();
+    GemfireHttpSession sessObj = (GemfireHttpSession) r.get(id);
+    sessObj.setNativeSession(null);
+
+    r.put(id, sessObj);
+
+    request.setHeader("Cookie", "JSESSIONID=" + id);
+    request.setURI("/test/request2");
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals("bar", response.getContent());
+  }
+
+  @Test
+  public void testHttpSessionListener1() throws Exception {
+    HttpSessionListenerImpl listener = new HttpSessionListenerImpl();
+    tester.getContext().getSessionHandler().addEventListener(listener);
+
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        // This is set in HttpSessionListenerImpl
+        String result = (String) s.getAttribute("gemfire-session-id");
+        response.getWriter().write(result);
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals(200, response.getStatus());
+
+    List<Cookie> cookies = getCookies(response);
+
+//        AbstractListener listener = RendezvousManager.getListener();
+    tester.stop();
+
+    assertTrue("Timeout waiting for events",
+        listener.await(1, TimeUnit.SECONDS));
+    assertEquals(ListenerEventType.SESSION_CREATED,
+        listener.events.get(0));
+    assertEquals(ListenerEventType.SESSION_DESTROYED,
+        listener.events.get(1));
+    assertEquals(cookies.get(0).getValue(), response.getContent());
+  }
+
+  @Test
+  public void testHttpSessionListener2() throws Exception {
+    HttpSessionListenerImpl2 listener = new HttpSessionListenerImpl2();
+    tester.getContext().getSessionHandler().addEventListener(listener);
+
+    Callback c = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException {
+        HttpSession s = request.getSession();
+        s.setAttribute("test01", "test01");
+        s = request.getSession(false);
+        s.invalidate();
+        response.getWriter().write(s.getId());
+      }
+    };
+
+    tester.setAttribute("callback_1", c);
+    tester.start();
+//    ContextManager.getInstance().putContext(
+//        servletHolder.getServlet().getServletConfig().getServletContext());
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals(200, response.getStatus());
+
+    List<Cookie> cookies = getCookies(response);
+
+    tester.stop();
+
+    assertTrue("Timeout waiting for events",
+        listener.await(1, TimeUnit.SECONDS));
+    assertEquals(ListenerEventType.SESSION_CREATED,
+        listener.events.get(0));
+    assertEquals(ListenerEventType.SESSION_DESTROYED,
+        listener.events.get(1));
+    assertEquals(cookies.get(0).getValue(), response.getContent());
+  }
+
+
+
+
+//  @Test
+  public void testJsp() throws Exception {
+    tester.setResourceBase("target/test-classes");
+    ServletHolder jspHolder = tester.addServlet(JspServlet.class, "/test/*");
+    jspHolder.setInitOrder(1);
+
+    jspHolder.setInitParameter("scratchdir", tmpdir.getPath());
+
+    Callback c_1 = new Callback() {
+      @Override
+      public void call(HttpServletRequest request, HttpServletResponse response)
+          throws IOException, ServletException {
+        request.getSession().setAttribute("foo", "bar");
+        request.setAttribute("foo", "baz");
+        RequestDispatcher dispatcher = request.getRequestDispatcher(
+            "pagecontext.jsp");
+        dispatcher.forward(request, response);
+      }
+    };
+
+    tester.getContext().setClassLoader(Thread.currentThread().getContextClassLoader());
+    tester.setAttribute("callback_1", c_1);
+
+    tester.start();
+
+    request.setMethod("GET");
+    request.setURI("/test/hello");
+    request.setHeader("Host", "tester");
+    request.setVersion("HTTP/1.0");
+
+    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
+
+    assertEquals(200, response.getStatus());
+    assertEquals("baz", response.getContent().trim());
+  }
+
+
+  ////////////////////////////////////////////////////////////////////
+  // Private methods
+
+  /**
+   * Why doesn't HttpTester do this already??
+   */
+  private List<Cookie> getCookies(HttpTester.Response response) {
+    List<Cookie> cookies = new ArrayList<Cookie>();
+
+    Enumeration e = response.getValues("Set-Cookie");
+
+    while (e != null && e.hasMoreElements()) {
+      String header = (String) e.nextElement();
+      Cookie c = null;
+
+      StringTokenizer st = new StringTokenizer(header, ";");
+      while (st.hasMoreTokens()) {
+        String[] split = st.nextToken().split("=");
+        String param = split[0].trim();
+        String value = null;
+        if (split.length > 1) {
+          value = split[1].trim();
+        }
+        if ("version".equalsIgnoreCase(param)) {
+          c.setVersion(Integer.parseInt(value));
+        } else if ("comment".equalsIgnoreCase(param)) {
+          c.setComment(value);
+        } else if ("domain".equalsIgnoreCase(param)) {
+          c.setDomain(value);
+        } else if ("max-age".equalsIgnoreCase(param)) {
+          c.setMaxAge(Integer.parseInt(value));
+        } else if ("discard".equalsIgnoreCase(param)) {
+          c.setMaxAge(-1);
+        } else if ("path".equalsIgnoreCase(param)) {
+          c.setPath(value);
+        } else if ("secure".equalsIgnoreCase(param)) {
+          c.setSecure(true);
+        } else if ("httponly".equalsIgnoreCase(param)) {
+          // Ignored??
+        } else {
+          if (c == null) {
+            c = new Cookie(param, value);
+          } else {
+            throw new IllegalStateException("Unknown cookie param: " + param);
+          }
+        }
+      }
+
+      if (c != null) {
+        cookies.add(c);
+      }
+    }
+
+    return cookies;
+  }
+
+  private Region getRegion() {
+    // Yuck...
+    return ((GemfireSessionManager) ((SessionCachingFilter) filterHolder.getFilter()).getSessionManager()).getCache().getCache().getRegion(
+        "gemfire_modules_sessions");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
new file mode 100644
index 0000000..ba4cbd9
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
@@ -0,0 +1,53 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.mockrunner.mock.web.MockFilterConfig;
+import com.mockrunner.mock.web.WebMockObjectFactory;
+import org.junit.Before;
+import org.junit.experimental.categories.Category;
+
+/**
+ * This runs all tests with a local cache disabled
+ */
+@Category(IntegrationTest.class)
+public class SessionReplicationJUnitTest extends CommonTests {
+
+  @Before
+  public void setUp() throws Exception {
+    super.setUp();
+
+    WebMockObjectFactory factory = getWebMockObjectFactory();
+    MockFilterConfig config = factory.getMockFilterConfig();
+
+    config.setInitParameter("gemfire.property.mcast-port", "0");
+    config.setInitParameter("cache-type", "peer-to-peer");
+
+    factory.getMockServletContext().setContextPath(CONTEXT_PATH);
+
+    factory.getMockRequest().setRequestURL("/test/foo/bar");
+    factory.getMockRequest().setContextPath(CONTEXT_PATH);
+
+    createFilter(SessionCachingFilter.class);
+    createServlet(CallbackServlet.class);
+
+    setDoChain(true);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
new file mode 100644
index 0000000..4016c7c
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
@@ -0,0 +1,54 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.internal.filter;
+
+import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.mockrunner.mock.web.MockFilterConfig;
+import com.mockrunner.mock.web.WebMockObjectFactory;
+import org.junit.Before;
+import org.junit.experimental.categories.Category;
+
+/**
+ * This runs all tests with a local cache enabled
+ */
+@Category(IntegrationTest.class)
+public class SessionReplicationLocalCacheJUnitTest extends CommonTests {
+
+  @Before
+  public void setUp() throws Exception {
+    super.setUp();
+
+    WebMockObjectFactory factory = getWebMockObjectFactory();
+    MockFilterConfig config = factory.getMockFilterConfig();
+
+    config.setInitParameter("gemfire.property.mcast-port", "0");
+    config.setInitParameter("cache-type", "peer-to-peer");
+    config.setInitParameter("gemfire.cache.enable_local_cache", "true");
+
+    factory.getMockServletContext().setContextPath(CONTEXT_PATH);
+
+    factory.getMockRequest().setRequestURL("/test/foo/bar");
+    factory.getMockRequest().setContextPath(CONTEXT_PATH);
+
+    createFilter(SessionCachingFilter.class);
+    createServlet(CallbackServlet.class);
+
+    setDoChain(true);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/ChildFirstClassLoader.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/ChildFirstClassLoader.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/ChildFirstClassLoader.java
new file mode 100644
index 0000000..dd4441b
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/ChildFirstClassLoader.java
@@ -0,0 +1,86 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.junit;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class ChildFirstClassLoader extends URLClassLoader {
+
+  public ChildFirstClassLoader() {
+    super(new URL[]{});
+  }
+
+  public ChildFirstClassLoader(URL[] urls) {
+    super(urls);
+  }
+
+  public ChildFirstClassLoader(URL[] urls, ClassLoader parent) {
+    super(urls, parent);
+  }
+
+  @Override
+  public void addURL(URL url) {
+    super.addURL(url);
+  }
+
+  @Override
+  public Class loadClass(String name) throws ClassNotFoundException {
+    return loadClass(name, false);
+  }
+
+  /**
+   * We override the parent-first behavior established by
+   * java.lang.Classloader.
+   */
+  @Override
+  protected Class loadClass(String name, boolean resolve)
+      throws ClassNotFoundException {
+    Class c = null;
+
+    if (name.startsWith("com.gemstone")) {
+      // First, check if the class has already been loaded
+      c = findLoadedClass(name);
+
+      // if not loaded, search the local (child) resources
+      if (c == null) {
+        try {
+          c = findClass(name);
+        } catch (ClassNotFoundException cnfe) {
+          // ignore
+        }
+      }
+    }
+
+    // if we could not find it, delegate to parent
+    // Note that we don't attempt to catch any ClassNotFoundException
+    if (c == null) {
+      if (getParent() != null) {
+        c = getParent().loadClass(name);
+      } else {
+        c = getSystemClassLoader().loadClass(name);
+      }
+    }
+
+    if (resolve) {
+      resolveClass(c);
+    }
+
+    return c;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/NamedRunner.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/NamedRunner.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/NamedRunner.java
new file mode 100644
index 0000000..e717c9a
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/NamedRunner.java
@@ -0,0 +1,120 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.junit;
+
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+
+/**
+ * A Junit 4 runner that stores the name of the method that runs.  The methods
+ * marked with @After and @Before (but also the Test method itself) can request
+ * this name for which it is running.
+ *
+ * @author Rudy De Busscher
+ */
+public class NamedRunner extends BlockJUnit4ClassRunner {
+
+  /**
+   * The Constant PREFIX_KEY.
+   */
+  private static final String PREFIX_KEY = "ClassLoaderRunner_TestMethodName_";
+
+  /**
+   * The Constant NO_NAME.
+   */
+  private static final String NO_NAME = "null";
+
+  /**
+   * Instantiates a new named runner.
+   *
+   * @param klass the klass
+   * @throws InitializationError the initialization error
+   */
+  public NamedRunner(Class<?> klass) throws InitializationError {
+    super(klass);
+  }
+
+  @Override
+  protected void runChild(FrameworkMethod method, RunNotifier notifier)
+
+  {
+    storeTestMethodName(method.getName());
+    super.runChild(method, notifier);
+    removeTestMethodName();
+  }
+
+  /**
+   * Gets the test method name.
+   *
+   * @return the test method name
+   */
+  public static String getTestMethodName() {
+    return retrieveTestMethodName();
+  }
+
+  /**
+   * Retrieve test method name.
+   *
+   * @return the string
+   */
+  private static String retrieveTestMethodName() {
+    // We can't use a ThreadLocal variable in the case the TestPerClassLoader runner is used.  Then this
+    // Method is accessed from another classloader and thus reinitialized variables.
+    String result = null;
+    String storedName = System.getProperty(getKey());
+    if (!NO_NAME.equals(storedName)) {
+      result = storedName;
+    }
+    return result;
+  }
+
+  /**
+   * Removes the test method name.
+   */
+  private static void removeTestMethodName() {
+    // We can't use a ThreadLocal variable in the case the TestPerClassLoader runner is used.  Then this
+    // Method is accessed from another classloader and thus reinitialized variables.
+    System.setProperty(getKey(), NO_NAME);
+
+  }
+
+  /**
+   * Store test method name.
+   *
+   * @param name the name
+   */
+  private static void storeTestMethodName(String name) {
+
+    // We can't use a ThreadLocal variable in the case the TestPerClassLoader runner is used.  Then this
+    // Method is accessed from another classloader and thus reinitialized variables.
+    System.setProperty(getKey(), name);
+  }
+
+  /**
+   * Gets the key.
+   *
+   * @return the key
+   */
+  private static String getKey() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append(PREFIX_KEY).append(Thread.currentThread().getName());
+    return buffer.toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/PerTestClassLoaderRunner.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/PerTestClassLoaderRunner.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/PerTestClassLoaderRunner.java
new file mode 100644
index 0000000..3e5c998
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/PerTestClassLoaderRunner.java
@@ -0,0 +1,283 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.junit;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.internal.runners.statements.Fail;
+import org.junit.internal.runners.statements.RunAfters;
+import org.junit.internal.runners.statements.RunBefores;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+import org.junit.runners.model.TestClass;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.logging.Logger;
+
+public class PerTestClassLoaderRunner extends NamedRunner {
+  private static final Logger LOGGER = Logger
+      .getLogger(PerTestClassLoaderRunner.class.getName());
+
+  // The classpath is needed because the custom class loader looks there to find the classes.
+  private static String classPath;
+  private static boolean classPathDetermined = false;
+
+  // Some data related to the class from the custom class loader.
+  private TestClass testClassFromClassLoader;
+  private Object beforeFromClassLoader;
+  private Object afterFromClassLoader;
+
+  /**
+   * Instantiates a new test per class loader runner.
+   *
+   * @param klass the klass
+   * @throws InitializationError the initialization error
+   */
+  public PerTestClassLoaderRunner(Class<?> klass) throws InitializationError {
+    super(klass);
+  }
+
+  @Override
+  protected Object createTest() throws Exception {
+    // Need an instance now from the class loaded by the custom loader.
+    return testClassFromClassLoader.getJavaClass().newInstance();
+  }
+
+  /**
+   * Load classes (TestCase, @Before and @After with custom class loader.
+   *
+   * @throws ClassNotFoundException the class not found exception
+   */
+  private void loadClassesWithCustomClassLoader()
+      throws ClassNotFoundException {
+    String classPath = System.getProperty("java.class.path");
+    StringTokenizer st = new StringTokenizer(classPath, ":");
+    List<URL> urls = new ArrayList<URL>();
+    while (st.hasMoreTokens()) {
+      String u = st.nextToken();
+      try {
+        if (!u.endsWith(".jar")) {
+          u += "/";
+        }
+        URL url = new URL("file://" + u);
+        urls.add(url);
+      } catch (MalformedURLException e) {
+        e.printStackTrace();
+      }
+    }
+
+    ClassLoader classLoader = new ChildFirstClassLoader(
+        urls.toArray(new URL[]{}),
+        Thread.currentThread().getContextClassLoader()
+    );
+
+    Thread.currentThread().setContextClassLoader(classLoader);
+
+    testClassFromClassLoader = new TestClass(classLoader
+        .loadClass(getTestClass().getJavaClass().getName()));
+    // See withAfters and withBefores for the reason.
+    beforeFromClassLoader = classLoader.loadClass(Before.class.getName());
+    afterFromClassLoader = classLoader.loadClass(After.class.getName());
+  }
+
+  @Override
+  protected Statement methodBlock(FrameworkMethod method) {
+    FrameworkMethod newMethod = null;
+    try {
+      // Need the class from the custom loader now, so lets load the class.
+      loadClassesWithCustomClassLoader();
+      // The method as parameter is from the original class and thus not found in our
+      // class loaded by the custom name (reflection is class loader sensitive)
+      // So find the same method but now in the class from the class Loader.
+      Method methodFromNewlyLoadedClass = testClassFromClassLoader
+          .getJavaClass().getMethod(method.getName());
+      newMethod = new FrameworkMethod(methodFromNewlyLoadedClass);
+    } catch (ClassNotFoundException e) {
+      // Show any problem nicely as a JUnit Test failure.
+      return new Fail(e);
+    } catch (SecurityException e) {
+      return new Fail(e);
+    } catch (NoSuchMethodException e) {
+      return new Fail(e);
+    }
+
+    // We can carry out the normal JUnit functionality with our newly discovered method now.
+    return super.methodBlock(newMethod);
+  }
+
+  @SuppressWarnings("unchecked")
+  @Override
+  protected Statement withAfters(FrameworkMethod method, Object target,
+      Statement statement) {
+    // We now to need to search in the class from the custom loader.
+    // We also need to search with the annotation loaded by the custom
+    // class loader or otherwise we don't find any method.
+    List<FrameworkMethod> afters = testClassFromClassLoader
+        .getAnnotatedMethods(
+            (Class<? extends Annotation>) afterFromClassLoader);
+    return new RunAfters(statement, afters, target);
+  }
+
+  @SuppressWarnings("unchecked")
+  @Override
+  protected Statement withBefores(FrameworkMethod method, Object target,
+      Statement statement) {
+    // We now to need to search in the class from the custom loader.
+    // We also need to search with the annotation loaded by the custom
+    // class loader or otherwise we don't find any method.
+    List<FrameworkMethod> befores = testClassFromClassLoader
+        .getAnnotatedMethods(
+            (Class<? extends Annotation>) beforeFromClassLoader);
+    return new RunBefores(statement, befores, target);
+  }
+
+//    /**
+//     * Gets the class path. This value is cached in a static variable for performance reasons.
+//     *
+//     * @return the class path
+//     */
+//    private static String getClassPath()
+//    {
+//        if (classPathDetermined)
+//        {
+//            return classPath;
+//        }
+//
+//        classPathDetermined = true;
+//        // running from maven, we have the classpath in this property.
+//        classPath = System.getProperty("surefire.test.class.path");
+//        if (classPath != null)
+//        {
+//            return classPath;
+//        }
+//
+//        // For a multi module project, running it from the top we have to find it using another way.
+//        // We also need to set useSystemClassLoader=true in the POM so that we gets a jar with the classpath in it.
+//        String booterClassPath = System.getProperty("java.class.path");
+//        Vector<String> pathItems = null;
+//        if (booterClassPath != null)
+//        {
+//            pathItems = scanPath(booterClassPath);
+//        }
+//        // Do we have just 1 entry as classpath which is a jar?
+//        if (pathItems != null && pathItems.size() == 1
+//                && isJar((String) pathItems.get(0)))
+//        {
+//            classPath = loadJarManifestClassPath((String) pathItems.get(0),
+//                    "META-INF/MANIFEST.MF");
+//        }
+//        return classPath;
+//
+//    }
+
+//    /**
+//     * Load jar manifest class path.
+//     *
+//     * @param path the path
+//     * @param fileName the file name
+//     *
+//     * @return the string
+//     */
+//    private static String loadJarManifestClassPath(String path, String fileName)
+//    {
+//        File archive = new File(path);
+//        if (!archive.exists()) {
+//            return null;
+//        }
+//        ZipFile zipFile = null;
+//
+//        try {
+//            zipFile = new ZipFile(archive);
+//        } catch (IOException io) {
+//            return null;
+//        }
+//
+//        ZipEntry entry = zipFile.getEntry(fileName);
+//        if (entry == null) {
+//            return null;
+//        } try {
+//            Manifest mf = new Manifest();
+//            mf.read(zipFile.getInputStream(entry));
+//
+//            return mf.getMainAttributes().getValue(Attributes.Name.CLASS_PATH)
+//                    .replaceAll(" ", System.getProperty("path.separator"))
+//                    .replaceAll("file:/", "");
+//        } catch (MalformedURLException e) {
+//            LOGGER.throwing("ClassLoaderTestSuite", "loadJarManifestClassPath", e);
+//        } catch (IOException e) {
+//            LOGGER.throwing("ClassLoaderTestSuite", "loadJarManifestClassPath", e);
+//        }
+//        return null;
+//    }
+//
+//    /**
+//     * Checks if is jar.
+//     *
+//     * @param pathEntry the path entry
+//     *
+//     * @return true, if is jar
+//     */
+//    private static boolean isJar(String pathEntry)
+//    {
+//        return pathEntry.endsWith(".jar") || pathEntry.endsWith(".zip");
+//    }
+//
+//    /**
+//     * Scan path for all directories.
+//     *
+//     * @param classPath the class path
+//     *
+//     * @return the vector< string>
+//     */
+//    private static Vector<String> scanPath(String classPath)
+//    {
+//        String separator = System.getProperty("path.separator");
+//        Vector<String> pathItems = new Vector<String>(10);
+//        StringTokenizer st = new StringTokenizer(classPath, separator);
+//        while (st.hasMoreTokens())
+//        {
+//            pathItems.addElement(st.nextToken());
+//        }
+//        return pathItems;
+//    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java
new file mode 100644
index 0000000..4337f5a
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java
@@ -0,0 +1,56 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package com.gemstone.gemfire.modules.session.junit;
+
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.InitializationError;
+
+import java.net.URLClassLoader;
+
+/**
+ * @author StackOverflow
+ */
+public class SeparateClassloaderTestRunner extends BlockJUnit4ClassRunner {
+
+  public SeparateClassloaderTestRunner(Class<?> clazz) throws InitializationError {
+    super(getFromTestClassloader(clazz));
+  }
+
+  private static Class<?> getFromTestClassloader(Class<?> clazz) throws InitializationError {
+    try {
+      ClassLoader testClassLoader = new TestClassLoader();
+      return Class.forName(clazz.getName(), true, testClassLoader);
+    } catch (ClassNotFoundException e) {
+      throw new InitializationError(e);
+    }
+  }
+
+  public static class TestClassLoader extends URLClassLoader {
+    public TestClassLoader() {
+      super(((URLClassLoader)getSystemClassLoader()).getURLs());
+    }
+
+    @Override
+    public Class<?> loadClass(String name) throws ClassNotFoundException {
+      if (name.startsWith("com.gemstone.gemfire.modules.session.")) {
+        return super.findClass(name);
+      }
+      return super.loadClass(name);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-session/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-session/src/test/resources/log4j.properties b/extensions/gemfire-modules-session/src/test/resources/log4j.properties
new file mode 100644
index 0000000..b346714
--- /dev/null
+++ b/extensions/gemfire-modules-session/src/test/resources/log4j.properties
@@ -0,0 +1,12 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/build.gradle b/extensions/gemfire-modules-tomcat7/build.gradle
new file mode 100644
index 0000000..10b8803
--- /dev/null
+++ b/extensions/gemfire-modules-tomcat7/build.gradle
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+test  {
+  doFirst {
+    copy {
+      from 'build/resources/test/tomcat'
+      into 'build/test/tomcat/'
+    }
+  }
+}
+
+jar {
+  baseName = 'gemfire-modules-tomcat7'
+}
+
+dependencies {
+  compile(project(':extensions/gemfire-modules')) {
+    // Remove everything related to Tomcat 6.x
+    exclude group: 'org.apache.tomcat'
+  }
+
+  compile 'org.apache.tomcat:tomcat-api:' + project.'tomcat7.version'
+  compile 'org.apache.tomcat:tomcat-catalina:' + project.'tomcat7.version'
+  compile 'org.apache.tomcat:tomcat-coyote:' + project.'tomcat7.version'
+  compile 'org.apache.tomcat:tomcat-util:' + project.'tomcat7.version'
+  compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version'
+
+  testCompile 'org.httpunit:httpunit:' + project.'httpunit.version'
+  testRuntime 'javax.servlet:javax.servlet-api:3.1.0'
+  testRuntime 'javax.annotation:jsr250-api:1.0'
+  testRuntime 'javax.ejb:ejb-api:3.0'
+  testRuntime 'javax.persistence:persistence-api:1.0.2'
+
+  provided(project(path: ':extensions/gemfire-modules', configuration: 'testOutput')) {
+    // Remove everything related to Tomcat 6.x
+    exclude group: 'org.apache.tomcat', module: 'catalina'
+    exclude group: 'org.apache.tomcat', module: 'catalina-ha'
+    exclude group: 'org.apache.tomcat', module: 'juli'
+  }
+  provided project(path: ':gemfire-junit', configuration: 'testOutput')
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48552465/extensions/gemfire-modules-tomcat7/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat7DeltaSessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat7DeltaSessionManager.java b/extensions/gemfire-modules-tomcat7/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat7DeltaSessionManager.java
new file mode 100644
index 0000000..d1f44bb
--- /dev/null
+++ b/extensions/gemfire-modules-tomcat7/src/main/java/com/gemstone/gemfire/modules/session/catalina/Tomcat7DeltaSessionManager.java
@@ -0,0 +1,112 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.gemstone.gemfire.modules.session.catalina;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.LifecycleState;
+
+import java.io.IOException;
+
+public class Tomcat7DeltaSessionManager extends DeltaSessionManager {
+
+  /**
+   * Prepare for the beginning of active use of the public methods of this component.  This method should be called
+   * after <code>configure()</code>, and before any of the public methods of the component are utilized.
+   *
+   * @throws LifecycleException if this component detects a fatal error that prevents this component from being used
+   */
+  @Override
+  public void startInternal() throws LifecycleException {
+    super.startInternal();
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Starting");
+    }
+    if (this.started.get()) {
+      return;
+    }
+
+    this.lifecycle.fireLifecycleEvent(START_EVENT, null);
+
+    // Register our various valves
+    registerJvmRouteBinderValve();
+
+    if (isCommitValveEnabled()) {
+      registerCommitSessionValve();
+    }
+
+    // Initialize the appropriate session cache interface
+    initializeSessionCache();
+
+    try {
+      load();
+    } catch (ClassNotFoundException e) {
+      throw new LifecycleException("Exception starting manager", e);
+    } catch (IOException e) {
+      throw new LifecycleException("Exception starting manager", e);
+    }
+
+    // Create the timer and schedule tasks
+    scheduleTimerTasks();
+
+    this.started.set(true);
+    this.setState(LifecycleState.STARTING);
+  }
+
+  /**
+   * Gracefully terminate the active use of the public methods of this component.  This method should be the last one
+   * called on a given instance of this component.
+   *
+   * @throws LifecycleException if this component detects a fatal error that needs to be reported
+   */
+  @Override
+  public void stopInternal() throws LifecycleException {
+    super.stopInternal();
+    if (getLogger().isDebugEnabled()) {
+      getLogger().debug(this + ": Stopping");
+    }
+
+    try {
+      unload();
+    } catch (IOException e) {
+      getLogger().error("Unable to unload sessions", e);
+    }
+
+    this.started.set(false);
+    this.lifecycle.fireLifecycleEvent(STOP_EVENT, null);
+
+    // StandardManager expires all Sessions here.
+    // All Sessions are not known by this Manager.
+
+    super.destroyInternal();
+
+    // Clear any sessions to be touched
+    getSessionsToTouch().clear();
+
+    // Cancel the timer
+    cancelTimer();
+
+    // Unregister the JVM route valve
+    unregisterJvmRouteBinderValve();
+
+    if (isCommitValveEnabled()) {
+      unregisterCommitSessionValve();
+    }
+
+    this.setState(LifecycleState.STOPPING);
+  }
+
+}


[43/50] [abbrv] incubator-geode git commit: GEODE-14: No more multicast discovery for peer-to-peer

Posted by kl...@apache.org.
GEODE-14: No more multicast discovery for peer-to-peer


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/89b0ab2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/89b0ab2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/89b0ab2e

Branch: refs/heads/feature/GEODE-268
Commit: 89b0ab2ef1230a4d333af7f06db72239b32b17a1
Parents: c221b2a
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Feb 3 23:53:21 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 07:06:27 2016 -0800

----------------------------------------------------------------------
 .../tcserver/gemfire-p2p/configuration-prompts.properties        | 2 --
 .../release/tcserver/gemfire-p2p/server-fragment.xml             | 4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/89b0ab2e/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
index f109d82..fdead44 100644
--- a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/configuration-prompts.properties
@@ -8,8 +8,6 @@ prefer.deserialized.form=Please specify whether to prefer keeping attributes in
 eviction.heap.percentage=Please enter the percentage of heap at which sessions will be evicted from the local cache. Default '${default}':
 locators=Please enter the list of locators used by GemFire members to discover each other. The format is a comma-separated list of host[port]. Default '${default}':
 log.file=Please enter the name of the file used to log GemFire messages. Default '${default}':
-multicast.discovery.port=Please enter the port used by GemFire members to discover each other using multicast networking. Default '${default}':
-multicast.discovery.address=Please enter the address used by GemFire members to discover each other using multicast networking. Default '${default}':
 rebalance=Please specify whether to rebalance the GemFire cache at startup. Default '${default}':
 region.attributes.id=Please enter the id of the attributes of the GemFire region used to cache sessions. Default '${default}':
 region.name=Please enter the name of the GemFire region used to cache sessions. Default '${default}':

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/89b0ab2e/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
index d1983c0..cf7dc0d 100644
--- a/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
+++ b/extensions/gemfire-modules-assembly/release/tcserver/gemfire-p2p/server-fragment.xml
@@ -5,10 +5,8 @@
       cache-xml-file="${cache.configuration.file:cache-peer.xml}"
       criticalHeapPercentage="${critical.heap.percentage:0.0}"
       evictionHeapPercentage="${eviction.heap.percentage:80.0}"
-      locators="${locators: }"
+      locators="${locators:localhost[10334]}"
       log-file="${log.file:gemfire_modules.log}"
-      mcast-port="${multicast.discovery.port:10334}"
-      mcast-address="${multicast.discovery.address:239.192.81.1}"
       rebalance="${rebalance:false}"
       statistic-archive-file="${statistic.archive.file:gemfire_modules.gfs}"
       statistic-sampling-enabled="${statistic.sampling.enabled:false}"/>


[47/50] [abbrv] incubator-geode git commit: GEODE-14: Fix broken build for gemfire-modules-tomcat7

Posted by kl...@apache.org.
GEODE-14: Fix broken build for gemfire-modules-tomcat7


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c8c26e61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c8c26e61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c8c26e61

Branch: refs/heads/feature/GEODE-268
Commit: c8c26e610e1c691628a2226bc66f77248a4b3284
Parents: 41192cc
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Feb 8 12:49:01 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 12:49:01 2016 -0800

----------------------------------------------------------------------
 extensions/gemfire-modules-tomcat7/build.gradle | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8c26e61/extensions/gemfire-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-tomcat7/build.gradle b/extensions/gemfire-modules-tomcat7/build.gradle
index 5a4c28e..9d2219d 100644
--- a/extensions/gemfire-modules-tomcat7/build.gradle
+++ b/extensions/gemfire-modules-tomcat7/build.gradle
@@ -50,4 +50,5 @@ dependencies {
     exclude group: 'org.apache.tomcat', module: 'juli'
   }
   provided project(path: ':gemfire-junit')
+  provided project(path: ':gemfire-core', configuration: 'testOutput')
 }
\ No newline at end of file


[07/50] [abbrv] incubator-geode git commit: GEODE-922: Fix javadoc warnings in RetryRule

Posted by kl...@apache.org.
GEODE-922: Fix javadoc warnings in RetryRule


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a8263dd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a8263dd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a8263dd9

Branch: refs/heads/feature/GEODE-268
Commit: a8263dd9311cce37b72ac18b37de6a04e549eaac
Parents: c4591fa
Author: Kirk Lund <kl...@pivotal.io>
Authored: Fri Feb 5 13:08:15 2016 -0800
Committer: Kirk Lund <kl...@pivotal.io>
Committed: Fri Feb 5 13:09:30 2016 -0800

----------------------------------------------------------------------
 .../gemstone/gemfire/test/junit/rules/RetryRule.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a8263dd9/gemfire-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/RetryRule.java
----------------------------------------------------------------------
diff --git a/gemfire-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/RetryRule.java b/gemfire-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/RetryRule.java
index 4a26d5e..c885aec 100755
--- a/gemfire-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/RetryRule.java
+++ b/gemfire-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/RetryRule.java
@@ -30,10 +30,10 @@ import com.gemstone.gemfire.test.junit.Retry;
  * RetryRule can be used globally for all tests in a test case by specifying a 
  * retryCount when instantiating it:
  * <pre>
- * @Rule
+ * {@literal @}Rule
  * public final RetryRule retryRule = new RetryRule(3);
  * 
- * @Test
+ * {@literal @}Test
  * public void shouldBeRetriedUntilPasses() {
  *   ...
  * }
@@ -42,13 +42,13 @@ import com.gemstone.gemfire.test.junit.Retry;
  * The above will result in 3 retries for every test in the test case.
  * </p> 
  * RetryRule can be used locally for specific tests by annotating the test 
- * method with @Rule and specifying a retryCount for that test:
+ * method with {@literal @}Rule and specifying a retryCount for that test:
  * <pre>
- * @Rule
+ * {@literal @}Rule
  * public final RetryRule retryRule = new RetryRule();
  * 
- * @Test
- * @Retry(3)
+ * {@literal @}Test
+ * {@literal @}Retry(3)
  * public void shouldBeRetriedUntilPasses() {
  *   ...
  * }


[11/50] [abbrv] incubator-geode git commit: Merge branch 'release/1.0.0-incubating.M1' into develop

Posted by kl...@apache.org.
Merge branch 'release/1.0.0-incubating.M1' into develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/98e29ee5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/98e29ee5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/98e29ee5

Branch: refs/heads/feature/GEODE-268
Commit: 98e29ee53b76006e7895c92cac166e4bd3c844de
Parents: 57b8229 c263345
Author: Anthony Baker <ab...@apache.org>
Authored: Sat Feb 6 10:06:45 2016 -0800
Committer: Anthony Baker <ab...@apache.org>
Committed: Sat Feb 6 10:06:45 2016 -0800

----------------------------------------------------------------------
 gradle.properties | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/98e29ee5/gradle.properties
----------------------------------------------------------------------
diff --cc gradle.properties
index c6ca51f,3687ff0..13d4839
--- a/gradle.properties
+++ b/gradle.properties
@@@ -12,8 -12,13 +12,13 @@@
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
+ 
+ # Set the release type using the following conventions:
+ # M? - Milestone 
+ # RC? - Release candidate
+ # RELEASE - Final build
  versionNumber = 1.0.0-incubating
- releaseType = SNAPSHOT
 -releaseType = M1
++releaseType = SNAPSHOT 
  
  org.gradle.daemon = true
  org.gradle.jvmargs = -Xmx2048m


[45/50] [abbrv] incubator-geode git commit: GEODE-14: Ignoring broken test while it is being refactored

Posted by kl...@apache.org.
GEODE-14: Ignoring broken test while it is being refactored


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0089b856
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0089b856
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0089b856

Branch: refs/heads/feature/GEODE-268
Commit: 0089b85695c9089ad22b2feb4258bccc824bfd2a
Parents: f890a14
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Feb 8 11:14:11 2016 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Feb 8 11:14:11 2016 -0800

----------------------------------------------------------------------
 .../gemstone/gemfire/modules/session/DualCacheTest.java  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0089b856/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
index 220b614..dbe4b54 100644
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
+++ b/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/DualCacheTest.java
@@ -26,18 +26,25 @@ import com.meterware.httpunit.GetMethodWebRequest;
 import com.meterware.httpunit.WebConversation;
 import com.meterware.httpunit.WebRequest;
 import com.meterware.httpunit.WebResponse;
-import junit.framework.TestCase;
+import org.junit.Ignore;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 /**
  *
  */
 @Category(IntegrationTest.class)
-public class DualCacheTest extends TestCase {
+public class DualCacheTest {
 
   /**
    * Check that our session persists. The values we pass in as query params are used to set attributes on the session.
    */
+  @Ignore("Ignored while refactoring")
+  @Test
   public void testSessionFailover() throws Exception {
     String key = "value_testSessionFailover";
     String value = "Foo";


[34/50] [abbrv] incubator-geode git commit: GEODE-14: We can add 3rd party licenses later

Posted by kl...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/64009709/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt
----------------------------------------------------------------------
diff --git a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt b/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt
deleted file mode 100755
index 82db8ad..0000000
--- a/extensions/gemfire-modules-assembly/release/3rdparty_license/open_source_licenses-vFabric_GemFire_HTTP_Session_Management_Modules_2.0.1.txt
+++ /dev/null
@@ -1,1316 +0,0 @@
-open_source_licenses.txt
-
-vFabric GemFire HTTP Session Management Module 2.0.1
-
-===========================================================================
-
-The following copyright statements and licenses apply to various open
-source software packages (or portions thereof) that are distributed with
-this VMware Product.
-
-The VMware Product may also include other VMware components, which may
-contain additional open source software packages. One or more such
-open_source_licenses.txt files may therefore accompany this VMware Product.
-
-The VMware Product that includes this file does not necessarily use all the
-open source software packages referred to below and may also only use
-portions of a given package.
-
-===========================================================================
-TABLE OF CONTENTS
-===========================================================================
-
-The following is a listing of the open source components detailed in this
-document. This list is provided for your convenience; please read further if
-you wish to review the copyright notice(s) and the full text of the license
-associated with each component.
-
-
-SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
-
-   >>> antlr-2.7.3
-   >>> backport-util-concurrent-java_5.0
-   >>> mx4j-2.0.1
-   >>> slf4j-1.5.8
-
-
-
-SECTION 2: Apache License, V2.0
-
-    >>> commons-modeler-2.0
-
-
-
-SECTION 3: Common Development and Distribution License, V1.0
-
-   >>> servlet-api-2.5
-
-
-
-SECTION 4: GNU Lesser General Public License, V2.1
-
-   >>> jgroups-2.10
-   >>> trove-1.1.b3
-
-
-
-APPENDIX. Standard License Files
-
-   >>> Apache License, V2.0
-
-   >>> GNU Lesser General Public License, V2.1
-
-   >>> Common Development and Distribution License, V1.0
-
-
---------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
-
-BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
-
-
-
->>> antlr-2.7.3
-
-SOFTWARE RIGHTS
-
-ANTLR 1989-2004 Developed by Terence Parr
-Partially supported by University of San Francisco & jGuru.com
-
-We reserve no legal rights to the ANTLR--it is fully in the
-public domain. An individual or company may do whatever
-they wish with source code distributed with ANTLR or the
-code generated by ANTLR, including the incorporation of
-ANTLR, or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However,
-we do ask that credit is given to us for developing
-ANTLR. By "credit", we mean that if you use ANTLR or
-incorporate any source code into one of your programs
-(commercial product, research project, or otherwise) that
-you acknowledge this fact somewhere in the documentation,
-research report, etc... If you like ANTLR and have
-developed a nice tool with the output, please mention that
-you developed it using ANTLR. In addition, we ask that the
-headers remain intact in our source code. As long as these
-guidelines are kept, we expect to continue enhancing this
-system and expect to make other tools available as they are
-completed.
-
-The primary ANTLR guy:
-
-Terence Parr
-parrt@cs.usfca.edu
-parrt@antlr.org
-
-
->>> backport-util-concurrent-java_5.0
-
-License
-This software is released to the public domain, in the spirit of the original code written by Doug Lea. The code can be used for any purpose, modified, and redistributed without acknowledgment. No warranty is provided, either express or implied.
-
-
->>> mx4j-2.0.1
-
-The MX4J License, Version 1.0
-
-Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-         1. Redistributions of source code must retain the above copyright
-            notice, this list of conditions and the following disclaimer.
-
-         2. Redistributions in binary form must reproduce the above copyright
-            notice, this list of conditions and the following disclaimer in
-            the documentation and/or other materials provided with the
-            distribution.
-
-         3. The end-user documentation included with the redistribution,
-            if any, must include the following acknowledgment:
-               "This product includes software developed by the
-                MX4J project (http://mx4j.sourceforge.net)."
-            Alternately, this acknowledgment may appear in the software itself,
-            if and wherever such third-party acknowledgments normally appear.
-
-         4. The name "MX4J" must not be used to endorse or promote
-            products derived from this software without prior written
-            permission.
-            For written permission, please contact
-            biorn_steedom [at] users [dot] sourceforge [dot] net
-
-         5. Products derived from this software may not be called "MX4J",
-            nor may "MX4J" appear in their name, without prior written
-            permission of Simone Bordet.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the MX4J project.  For more information on
-MX4J, please see
-the MX4J website.
-
-
->>> slf4j-1.5.8
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------- SECTION 2: Apache License, V2.0 ----------
-
-Apache License, V2.0 are applicable to the following component(s).
-
->>> commons-modeler-2.0
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
-
-Common Development and Distribution License, V1.0 are applicable to the following component(s).
-
-
->>> servlet-api-2.5
-
-The contents of this file are subject to the terms 
-of the Common Development and Distribution License 
-(the "License"). You may not use this file except 
-in compliance with the License. 
- 
-You can obtain a copy of the license at 
-glassfish/bootstrap/legal/CDDLv1.0.txt or 
-https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-See the License for the specific language governing 
-permissions and limitations under the License. 
- 
-When distributing Covered Code, include this CDDL 
-HEADER in each file and include the License file at 
-glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 
-add the following below this CDDL HEADER, with the 
-fields enclosed by brackets "[]" replaced with your 
-own identifying information: Portions Copyright [yyyy] 
-[name of copyright owner] 
- 
-Copyright 2005 Sun Microsystems, Inc. All rights reserved. 
- 
-Portions Copyright Apache Software Foundation.
-
-
---------------- SECTION 4: GNU Lesser General Public License, V2.1 ----------
-
-GNU Lesser General Public License, V2.1 are applicable to the following component(s).
-
-
->>> jgroups-2.10
-
-This library 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 library 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 library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
->>> trove-1.1.b3
-
-The Trove library is licensed under the Lesser GNU Public License,
-which is included with the distribution in a file called LICENSE.txt.
-
-The PrimeFinder and HashFunctions classes in Trove are subject to the
-following license restrictions:
-
-Copyright (c) 1999 CERN - European Organization for Nuclear Research.
-
-Permission to use, copy, modify, distribute and sell this software and
-its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. CERN makes no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without expressed or implied warranty.
-
-
-=============== APPENDIX. Standard License Files ============== 
-
-
-
---------------- SECTION 1: Apache License, V2.0 -----------
-
-Apache License 
-
-Version 2.0, January 2004 
-http://www.apache.org/licenses/ 
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction,
-and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the
-copyright owner that is granting the License.  
-
-"Legal Entity" shall mean the union of the acting entity and all other
-entities that control, are controlled by, or are under common control
-with that entity. For the purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management
-of such entity, whether by contract or otherwise, or (ii) ownership
-of fifty percent (50%) or more of the outstanding shares, or (iii)
-beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.  
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation
-or translation of a Source form, including but not limited to compiled
-object code, generated documentation, and conversions to other media
-types.  
-
-"Work" shall mean the work of authorship, whether in Source or
-Object form, made available under the License, as indicated by a copyright
-notice that is included in or attached to the work (an example is provided
-in the Appendix below).  
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent,
-as a whole, an original work of authorship. For the purposes of this
-License, Derivative Works shall not include works that remain separable
-from, or merely link (or bind by name) to the interfaces of, the Work
-and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the
-original version of the Work and any modifications or additions to
-that Work or Derivative Works thereof, that is intentionally submitted
-to Licensor for inclusion in the Work by the copyright owner or by an
-individual or Legal Entity authorized to submit on behalf of the copyright
-owner. For the purposes of this definition, "submitted" means any form of
-electronic, verbal, or written communication sent to the Licensor or its
-representatives, including but not limited to communication on electronic
-mailing lists, source code control systems, and issue tracking systems
-that are managed by, or on behalf of, the Licensor for the purpose of
-discussing and improving the Work, but excluding communication that is
-conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity
-on behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-2. Grant of Copyright License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty-free, irrevocable copyright license to reproduce, prepare
-Derivative Works of, publicly display, publicly perform, sublicense, and
-distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-Subject to the terms and conditions of this License, each Contributor
-hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
-royalty- free, irrevocable (except as stated in this section) patent
-license to make, have made, use, offer to sell, sell, import, and
-otherwise transfer the Work, where such license applies only to those
-patent claims licensable by such Contributor that are necessarily
-infringed by their Contribution(s) alone or by combination of
-their Contribution(s) with the Work to which such Contribution(s)
-was submitted. If You institute patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Work or a Contribution incorporated within the Work constitutes direct
-or contributory patent infringement, then any patent licenses granted
-to You under this License for that Work shall terminate as of the date
-such litigation is filed.
-
-4. Redistribution.
-You may reproduce and distribute copies of the Work or Derivative Works
-thereof in any medium, with or without modifications, and in Source or
-Object form, provided that You meet the following conditions:
-
-  a. You must give any other recipients of the Work or Derivative Works
-     a copy of this License; and
-
-  b. You must cause any modified files to carry prominent notices stating
-     that You changed the files; and
-
-  c. You must retain, in the Source form of any Derivative Works that
-     You distribute, all copyright, patent, trademark, and attribution
-     notices from the Source form of the Work, excluding those notices
-     that do not pertain to any part of the Derivative Works; and
-
-  d. If the Work includes a "NOTICE" text file as part of its
-     distribution, then any Derivative Works that You distribute must
-     include a readable copy of the attribution notices contained
-     within such NOTICE file, excluding those notices that do not
-     pertain to any part of the Derivative Works, in at least one of
-     the following places: within a NOTICE text file distributed as part
-     of the Derivative Works; within the Source form or documentation,
-     if provided along with the Derivative Works; or, within a display
-     generated by the Derivative Works, if and wherever such third-party
-     notices normally appear. The contents of the NOTICE file are for
-     informational purposes only and do not modify the License. You
-     may add Your own attribution notices within Derivative Works that
-     You distribute, alongside or as an addendum to the NOTICE text
-     from the Work, provided that such additional attribution notices
-     cannot be construed as modifying the License.  You may add Your own
-     copyright statement to Your modifications and may provide additional
-     or different license terms and conditions for use, reproduction, or
-     distribution of Your modifications, or for any such Derivative Works
-     as a whole, provided Your use, reproduction, and distribution of the
-     Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions.
-Unless You explicitly state otherwise, any Contribution intentionally
-submitted for inclusion in the Work by You to the Licensor shall be
-under the terms and conditions of this License, without any additional
-terms or conditions.  Notwithstanding the above, nothing herein shall
-supersede or modify the terms of any separate license agreement you may
-have executed with Licensor regarding such Contributions.
-
-6. Trademarks.
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-Unless required by applicable law or agreed to in writing, Licensor
-provides the Work (and each Contributor provides its Contributions) on
-an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-express or implied, including, without limitation, any warranties or
-conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
-A PARTICULAR PURPOSE. You are solely responsible for determining the
-appropriateness of using or redistributing the Work and assume any risks
-associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability.
-In no event and under no legal theory, whether in tort (including
-negligence), contract, or otherwise, unless required by applicable law
-(such as deliberate and grossly negligent acts) or agreed to in writing,
-shall any Contributor be liable to You for damages, including any direct,
-indirect, special, incidental, or consequential damages of any character
-arising as a result of this License or out of the use or inability to
-use the Work (including but not limited to damages for loss of goodwill,
-work stoppage, computer failure or malfunction, or any and all other
-commercial damages or losses), even if such Contributor has been advised
-of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-While redistributing the Work or Derivative Works thereof, You may
-choose to offer, and charge a fee for, acceptance of support, warranty,
-indemnity, or other liability obligations and/or rights consistent with
-this License. However, in accepting such obligations, You may act only
-on Your own behalf and on Your sole responsibility, not on behalf of
-any other Contributor, and only if You agree to indemnify, defend, and
-hold each Contributor harmless for any liability incurred by, or claims
-asserted against, such Contributor by reason of your accepting any such
-warranty or additional liability.
-
-END OF TERMS AND CONDITIONS 
-
-
-
---------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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 library 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 library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
---------------- SECTION 3: Common Development and Distribution License, V1.0 -----------
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original Software,
-prior Modifications used by a Contributor (if any), and the Modifications
-made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first makes
-Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of any
-of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-1.10. "Original Software" means the Source Code and Executable form of
-computer software code that is originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
-acquired, including without limitation, method, process, and apparatus
-claims, in any patent Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer software code
-in which modifications are made and (b) associated documentation included
-in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal entity exercising
-rights under, and complying with all of the terms of, this License. For
-legal entities, "You" includes any entity which controls, is controlled
-by, or is under common control with You. For purposes of this definition,
-"control" means (a) the power, direct or indirect, to cause the direction
-or management of such entity, whether by contract or otherwise, or (b)
-ownership of more than fifty percent (50%) of the outstanding shares or
-beneficial ownership of such entity.
-
-2. License Grants. 
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, the Initial Developer hereby
-grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce, modify,
-    display, perform, sublicense and distribute the Original Software
-    (or portions thereof), with or without Modifications, and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling
-    of Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective
-    on the date Initial Developer first distributes or otherwise makes
-    the Original Software available to a third party under the terms of
-    this License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software,
-    or (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and subject to
-third party intellectual property claims, each Contributor hereby grants
-You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications created
-    by such Contributor (or portions thereof), either on an unmodified
-    basis, with other Modifications, as Covered Software and/or as part
-    of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or
-    in combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor
-    (or portions thereof); and (2) the combination of Modifications
-    made by that Contributor with its Contributor Version (or portions
-    of such combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available
-in Executable form must also be made available in Source Code form and
-that Source Code form must be distributed only under the terms of this
-License. You must include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or otherwise make
-available. You must inform recipients of any such Covered Software in
-Executable form as to how they can obtain such Covered Software in Source
-Code form in a reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed
-by the terms of this License. You represent that You believe Your
-Modifications are Your original creation(s) and/or You have sufficient
-rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications that identifies
-You as the Contributor of the Modification.  You may not remove or alter
-any copyright, patent or trademark notices contained within the Covered
-Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered Software in Source
-Code form that alters or restricts the applicable version of this License
-or the recipients' rights hereunder. You may choose to offer, and to
-charge a fee for, warranty, support, indemnity or liability obligations to
-one or more recipients of Covered Software.  However, you may do so only
-on Your own behalf, and not on behalf of the Initial Developer or any
-Contributor. You must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by You alone, and
-You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor
-as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered Software under the
-terms of this License or under the terms of a license of Your choice,
-which may contain terms different from this License, provided that You are
-in compliance with the terms of this License and that the license for the
-Executable form does not attempt to limit or alter the recipient's rights
-in the Source Code form from the rights set forth in this License. If
-You distribute the Covered Software in Executable form under a different
-license, You must make it absolutely clear that any terms which differ
-from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and
-every Contributor for any liability incurred by the Initial Developer
-or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software with other code
-not governed by the terms of this License and distribute the Larger Work
-as a single product. In such a case, You must make sure the requirements
-of this License are fulfilled for the Covered Software.
-
-4. Versions of the License. 
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and may publish
-revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided
-in Section 4.3, no one other than the license steward has the right to
-modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under
-which You originally received the Covered Software. If the Initial
-Developer includes a notice in the Original Software prohibiting it
-from being distributed or otherwise made available under any subsequent
-version of the License, You must distribute and make the Covered Software
-available under the terms of the version of the License under which You
-originally received the Covered Software. Otherwise, You may also choose
-to use, distribute or otherwise make the Covered Software available
-under the terms of any subsequent version of the License published by
-the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license
-for Your Original Software, You may create and use a modified version of
-this License if You: (a) rename the license and remove any references
-to the name of the license steward (except to note that the license
-differs from this License); and (b) otherwise make it clear that the
-license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
-IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
-YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
-OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION. 
-
-6.1. This License and the rights granted hereunder will terminate
-automatically if You fail to comply with terms herein and fail to cure
-such breach within 30 days of becoming aware of the breach. Provisions
-which, by their nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory
-judgment actions) against Initial Developer or a Contributor (the
-Initial Developer or Contributor against whom You assert such claim is
-referred to as "Participant") alleging that the Participant Software
-(meaning the Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the Initial Developer)
-directly or indirectly infringes any patent, then any and all rights
-granted directly or indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
-days notice from Participant terminate prospectively and automatically
-at the expiration of such 60 day notice period, unless if within such
-60 day period You withdraw Your claim with respect to the Participant
-Software against such Participant either unilaterally or pursuant to a
-written agreement with Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-user licenses that have been validly granted by You or any distributor
-hereunder prior to termination (excluding licenses granted to You by
-any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
-OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
-OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
-OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
-FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
-DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
-DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is defined
-in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
-"commercial computer software documentation" as such terms are used in
-48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
-C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes, any
-other FAR, DFAR, or other clause or provision that addresses Government
-rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable,
-such provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to
-the extent applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation relating to
-this License shall be subject to the jurisdiction of the courts located
-in the jurisdiction and venue specified in a notice contained within
-the Original Software, with the losing party responsible for costs,
-including, without limitation, court costs and reasonable attorneys'
-fees and expenses. The application of the United Nations Convention on
-Contracts for the International Sale of Goods is expressly excluded. Any
-law or regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the United
-States export administration regulations (and the export control laws and
-regulation of any other countries) when You use, distribute or otherwise
-make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or indirectly, out
-of its utilization of rights under this License and You agree to work
-with Initial Developer and Contributors to distribute such responsibility
-on an equitable basis. Nothing herein is intended or shall be deemed to
-constitute any admission of liability.
-
-
-
-===========================================================================
-
-To the extent any open source components are licensed under the
-GPL and/or LGPL, or other similar licenses that require the
-source code and/or modifications to source code to be made
-available (as would be noted above), you may obtain a copy of
-the source code corresponding to the binaries for such open
-source components and modifications thereto, if any, (the
-"Source Files"), by downloading the Source Files from VMware's website at
-http://www.vmware.com/download/open_source.html, or by sending a request, with
-your name and address to: VMware, Inc., 3401 Hillview Avenue,
-Palo Alto, CA 94304,United States of America or email info@vmware.com.  All such
-requests should clearly specify:  OPEN SOURCE FILES REQUEST,
-Attention General Counsel. VMware shall mail a copy of the
-Source Files to you on a CD or equivalent physical medium.  This
-offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product. Alternatively, 
-the Source Files may accompany the VMware product.
-
-[GFEHTTP201KP101911]