You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ab...@apache.org on 2016/02/17 19:23:44 UTC

[40/51] [partial] incubator-geode git commit: GEODE-917: rename gemfire subprojects to geode

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f6c4c2f9/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
deleted file mode 100644
index c5edeea..0000000
--- a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/ResourceManagerValidator.java
+++ /dev/null
@@ -1,166 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index 25ee3b1..0000000
--- a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/SessionCustomExpiry.java
+++ /dev/null
@@ -1,64 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index d2b74c8..0000000
--- a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchPartitionedRegionEntriesFunction.java
+++ /dev/null
@@ -1,100 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index 735c27f..0000000
--- a/extensions/gemfire-modules/src/main/java/com/gemstone/gemfire/modules/util/TouchReplicatedRegionEntriesFunction.java
+++ /dev/null
@@ -1,97 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index 7a73b41..0000000
--- a/extensions/gemfire-modules/src/main/resources/modules-version.properties
+++ /dev/null
@@ -1 +0,0 @@
-version = @VERSION@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f6c4c2f9/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
deleted file mode 100644
index 12e935d..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Callback.java
+++ /dev/null
@@ -1,30 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index 32ac7d8..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/CommandServlet.java
+++ /dev/null
@@ -1,91 +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.
-*/
-
-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/f6c4c2f9/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
deleted file mode 100644
index 53a305e..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/EmbeddedTomcat.java
+++ /dev/null
@@ -1,193 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index a891c5a..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/QueryCommand.java
+++ /dev/null
@@ -1,34 +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.
- */
-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/f6c4c2f9/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
deleted file mode 100644
index 544658e..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
+++ /dev/null
@@ -1,493 +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.
-*/
-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;
-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;
-
-  private static int port;
-
-  // Set up the servers we need
-  public static void setupServer(DeltaSessionManager manager) throws Exception {
-    port = AvailablePortHelper.getRandomAvailableTCPPort();
-    server = new EmbeddedTomcat("/test", port, "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(String.format("http://localhost:%d/test", port));
-    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(String.format("http://localhost:%d/test", port));
-
-    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(String.format("http://localhost:%d/test", port));
-
-    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(String.format("http://localhost:%d/test", port));
-    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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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(String.format("http://localhost:%d/test", port));
-
-    // 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/f6c4c2f9/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
deleted file mode 100644
index 0ce73ae..0000000
--- a/extensions/gemfire-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
+++ /dev/null
@@ -1,35 +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.
-*/
-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/f6c4c2f9/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
deleted file mode 100644
index 17faf29..0000000
--- a/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Event.hbm.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?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/f6c4c2f9/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
deleted file mode 100644
index c6380e7..0000000
--- a/extensions/gemfire-modules/src/test/resources/com/gemstone/gemfire/modules/Person.hbm.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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/f6c4c2f9/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
deleted file mode 100644
index c136990..0000000
--- a/extensions/gemfire-modules/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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/f6c4c2f9/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
deleted file mode 100644
index 6c9f217..0000000
--- a/extensions/gemfire-modules/src/test/resources/tomcat/conf/tomcat-users.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<tomcat-users>
-</tomcat-users>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f6c4c2f9/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
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f6c4c2f9/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
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f6c4c2f9/extensions/geode-modules-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/build.gradle b/extensions/geode-modules-assembly/build.gradle
new file mode 100644
index 0000000..381375b
--- /dev/null
+++ b/extensions/geode-modules-assembly/build.gradle
@@ -0,0 +1,247 @@
+/*
+ * 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.
+ */
+
+import org.apache.tools.ant.filters.ReplaceTokens
+
+configurations {
+  slf4jDeps
+  servletApiDeps
+  moduleDistOutputs
+}
+
+dependencies {
+  slf4jDeps 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
+  slf4jDeps 'org.slf4j:slf4j-jdk14:' + project.'slf4j-api.version'
+
+  servletApiDeps 'javax.servlet:servlet-api:2.5'
+}
+
+jar.enabled = false
+extraArchive {
+  sources = false
+  javadoc = false
+  tests = false
+}
+
+disableMavenPublishing()
+
+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('geode-cs/lib') {
+    from getJarArtifact(':extensions/geode-modules')
+    from getJarArtifact(':extensions/geode-modules-tomcat7')
+    from configurations.slf4jDeps
+  }
+  into('geode-cs/bin') {
+    from('release/scripts') {
+      include '*'
+    }
+    from('release/tcserver/geode-cs') {
+      include 'modules.env'
+    }
+    filter(ReplaceTokens, tokens:['GEMFIRE_MODULES_VERSION': version])
+  }
+  into('geode-cs/conf') {
+    from('release/conf') {
+      exclude 'cache-peer.xml'
+    }
+    from('release/tcserver/geode-cs') {
+      include 'context-fragment.xml'
+      include 'server-fragment.xml'
+    }
+  }
+  into('geode-cs') {
+    from('release/tcserver/geode-cs') {
+      include 'configuration-prompts.properties'
+      include 'README.txt'
+      filter(ReplaceTokens, tokens:['VERSION': version])
+    }
+  }
+
+  // Tomncat 7 specifics
+  into('geode-cs-tomcat-7/conf') {
+    from('release/tcserver/geode-cs-tomcat-7') {
+      include 'context-fragment.xml'
+    }
+  }
+  into('geode-cs-tomcat-7/bin') {
+    from('release/tcserver/geode-cs-tomcat-7') {
+      include 'modules.env'
+    }
+  }
+  // All peer-to-peer files
+  into('geode-p2p/lib') {
+    from getJarArtifact(':extensions/geode-modules')
+    from getJarArtifact(':extensions/geode-modules-tomcat7')
+    from configurations.slf4jDeps
+    from('release/3rdparty_license') {
+      include "open_source_licenses*${version}.txt"
+    }
+  }
+  into('geode-p2p/bin') {
+    from('release/scripts') {
+      include 'gemfire.*'
+      include 'setenv.properties'
+    }
+    from('release/tcserver/geode-p2p') {
+      include 'modules.env'
+    }
+  }
+  into('geode-p2p/conf') {
+    from('release/conf') {
+      include 'cache-peer.xml'
+    }
+    from('release/tcserver/geode-p2p') {
+      include 'context-fragment.xml'
+      include 'server-fragment.xml'
+    }
+  }
+  into('geode-p2p') {
+    from('release/tcserver/geode-p2p') {
+      include 'configuration-prompts.properties'
+      include 'README.txt'
+      filter(ReplaceTokens, tokens:['VERSION': version])
+    }
+  }
+
+  // Tomncat 7 specifics
+  into('geode-p2p-tomcat-7/conf') {
+    from('release/tcserver/geode-p2p-tomcat-7') {
+      include 'context-fragment.xml'
+    }
+  }
+  into('geode-p2p-tomcat-7/bin') {
+    from('release/tcserver/geode-p2p-tomcat-7') {
+      include 'modules.env'
+    }
+  }
+}
+
+def configureTcServer30Assembly = {
+  archiveName = "Apache_Geode_Modules-${version}-tcServer30.zip"
+
+  into('geode-cs-tomcat-8/bin') {
+    from('release/tcserver/geode-cs-tomcat-8') {
+      include 'modules.env'
+    }
+  }
+  into('geode-cs-tomcat-8/conf') {
+    from('release/tcserver/geode-cs-tomcat-8') {
+      include 'context-fragment.xml'
+    }
+  }
+
+  into('geode-p2p-tomcat-8/bin') {
+    from('release/tcserver/geode-p2p-tomcat-8') {
+      include 'modules.env'
+    }
+  }
+  into('geode-p2p-tomcat-8/conf') {
+    from('release/tcserver/geode-p2p-tomcat-8') {
+      include 'context-fragment.xml'
+    }
+  }
+}
+
+task distTomcat(type: Zip, dependsOn: ':extensions/geode-modules:build') {
+  archiveName = "Apache_Geode_Modules-${version}-Tomcat.zip"
+
+  // All client-server files
+  into('lib') {
+    from getJarArtifact(':extensions/geode-modules')
+    from getJarArtifact(':extensions/geode-modules-tomcat7')
+    from configurations.slf4jDeps
+  }
+  into('bin') {
+    from('release/scripts') {
+      include '*'
+      exclude 'setenv.properties'
+    }
+  }
+  into('conf') {
+    from('release/conf') {
+      include '*'
+    }
+  }
+}
+
+task distHibernate(type: Zip, dependsOn: ':extensions/geode-modules-hibernate:build') {
+  archiveName = "Apache_Geode_Modules-${version}-Hibernate.zip"
+
+  into('lib') {
+    from getJarArtifact(':extensions/geode-modules')
+    from getJarArtifact(':extensions/geode-modules-hibernate')
+  }
+}
+
+task distAppServer(type: Zip, dependsOn: ':extensions/geode-modules-session:build') {
+  archiveName = "Apache_Geode_Modules-${version}-AppServer.zip"
+
+  into('lib') {
+    from getJarArtifact(':extensions/geode-modules')
+    from getJarArtifact(':extensions/geode-modules-session')
+    from configurations.slf4jDeps
+    from configurations.servletApiDeps
+  }
+
+  into('bin') {
+    from('release/session/bin/') {
+      include 'setenv.properties'
+      include 'modify_war'
+      include 'cacheserver.*'
+      include 'gemfire.*'
+
+      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])
+    }
+  }
+
+  into('conf') {
+    from('release/conf')
+  }
+}
+
+task distTcServer(type: Zip, dependsOn: [':extensions/geode-modules:build', ':extensions/geode-modules-tomcat7:build']) {
+  configure(configureTcServerAssembly)
+}
+
+task distTcServer30(type: Zip, dependsOn: [':extensions/geode-modules:build', ':extensions/geode-modules-tomcat7:build']) {
+  configure(configureTcServerAssembly)
+  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/f6c4c2f9/extensions/geode-modules-assembly/release/conf/cache-client.xml
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/conf/cache-client.xml b/extensions/geode-modules-assembly/release/conf/cache-client.xml
new file mode 100755
index 0000000..3ae9ba7
--- /dev/null
+++ b/extensions/geode-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/f6c4c2f9/extensions/geode-modules-assembly/release/conf/cache-peer.xml
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/conf/cache-peer.xml b/extensions/geode-modules-assembly/release/conf/cache-peer.xml
new file mode 100755
index 0000000..1f62cb1
--- /dev/null
+++ b/extensions/geode-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/f6c4c2f9/extensions/geode-modules-assembly/release/conf/cache-server.xml
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/conf/cache-server.xml b/extensions/geode-modules-assembly/release/conf/cache-server.xml
new file mode 100755
index 0000000..b9d8c2c
--- /dev/null
+++ b/extensions/geode-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/f6c4c2f9/extensions/geode-modules-assembly/release/scripts/cacheserver.bat
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/scripts/cacheserver.bat b/extensions/geode-modules-assembly/release/scripts/cacheserver.bat
new file mode 100755
index 0000000..ef7f99f
--- /dev/null
+++ b/extensions/geode-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\geode-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\geode-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/geode-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/f6c4c2f9/extensions/geode-modules-assembly/release/scripts/cacheserver.sh
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/scripts/cacheserver.sh b/extensions/geode-modules-assembly/release/scripts/cacheserver.sh
new file mode 100755
index 0000000..28edc35
--- /dev/null
+++ b/extensions/geode-modules-assembly/release/scripts/cacheserver.sh
@@ -0,0 +1,97 @@
+#!/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
+
+GEMFIRE_DEP_JAR=$GEMFIRE/lib/geode-dependencies.jar
+if [ ! -f "$GEMFIRE_DEP_JAR" ]; then
+  echo "ERROR: Could not determine GEMFIRE location."
+  exit 1
+fi
+
+MOD_JAR=`ls $GEMFIRE/lib/geode-modules-?.*.jar` 2>/dev/null
+if [ -z "$MOD_JAR" ]; then
+  MOD_JAR=$GEMFIRE/lib/geode-modules.jar
+fi
+
+# Add Tomcat classes
+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
+
+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/f6c4c2f9/extensions/geode-modules-assembly/release/scripts/gemfire.bat
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/scripts/gemfire.bat b/extensions/geode-modules-assembly/release/scripts/gemfire.bat
new file mode 100755
index 0000000..6102b88
--- /dev/null
+++ b/extensions/geode-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/f6c4c2f9/extensions/geode-modules-assembly/release/scripts/gemfire.sh
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/scripts/gemfire.sh b/extensions/geode-modules-assembly/release/scripts/gemfire.sh
new file mode 100755
index 0000000..12956cc
--- /dev/null
+++ b/extensions/geode-modules-assembly/release/scripts/gemfire.sh
@@ -0,0 +1,58 @@
+#!/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_DEP_JAR=$GEMFIRE/lib/geode-dependencies.jar
+if [ ! -f "$GEMFIRE_DEP_JAR" ]; then
+  echo "ERROR: Could not determine GEMFIRE location."
+  exit 1
+fi
+
+GEMFIRE_JARS=$GEMFIRE_DEP_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/f6c4c2f9/extensions/geode-modules-assembly/release/scripts/setenv.properties
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/scripts/setenv.properties b/extensions/geode-modules-assembly/release/scripts/setenv.properties
new file mode 100644
index 0000000..fc8918b
--- /dev/null
+++ b/extensions/geode-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