You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rv...@apache.org on 2017/01/13 22:46:30 UTC

[46/51] [partial] geode git commit: Software Grant Agreement (SGA) from Pivotal for Apache Geode

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Form1.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Form1.cs b/examples/clicache/ProductBrowser/Form1.cs
new file mode 100755
index 0000000..5300f22
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Form1.cs
@@ -0,0 +1,342 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using GemStone.GemFire.Cache;
+
+namespace ProductBrowser
+{
+  public partial class ProductBrowser : Form, ICacheListener
+  {
+    //Cache cache = null;
+    GemStone.GemFire.Cache.Region prodRegion = null;
+    private string logLevel = "debug";
+    private string logFile = "productBrowserLog";
+
+    public ProductBrowser()
+    {
+      InitializeComponent();
+      Serializable.RegisterType(Product.CreateInstance);
+
+      /*
+       * Initialize Cache system properties
+       */      
+      GemStone.GemFire.Cache.Properties prop = GemStone.GemFire.Cache.Properties.Create();
+      prop.Insert("log-file", logFile);
+      prop.Insert("log-level", logLevel);
+      prop.Insert("name", "ProductCache");
+      CacheFactory cacheFactory = CacheFactory.CreateCacheFactory(prop);      
+
+      try
+      {
+        /*
+         * Create the GemFire Client cache
+         */
+
+        Cache cache = cacheFactory.SetSubscriptionEnabled(true).Create();
+
+        /*
+         * Specify required region attributes
+         */
+
+        RegionFactory regionFactory = cache.CreateRegionFactory(RegionShortcut.CACHING_PROXY);
+
+        /*
+         * Create the region and register interest in all keys
+         */
+         prodRegion = regionFactory
+          .SetCachingEnabled(true)
+          .SetCacheListener(this)
+          .Create("product");      
+
+         prodRegion.RegisterAllKeys();
+      }
+      catch (Exception e)
+      {
+        MessageBox.Show("Error during client initialization.  " + e.Message);
+      }
+
+    }
+
+    private void btnCreate_Click(object sender, EventArgs e)
+    {
+      Product prd = new Product();
+      prd.productId = Convert.ToInt32(txtProdId.Text);
+      prd.name = txtProdName.Text;
+      prd.productNumber = txtProdNum.Text;
+      prd.makeFlag = "false";
+      prd.finishedGoodsFlag = "false";
+      prd.color = "Black";
+      prd.safetyLockLevel = Convert.ToInt32(txtStock.Text);
+      prd.reorderPoint = Convert.ToInt32(txtReorder.Text);
+      prd.standardCost = Convert.ToDouble(txtCost.Text);
+      prd.listPrice = Convert.ToDouble(txtList.Text);
+      prd.daysToManufacture = Convert.ToInt32(txtMfgDays.Text);
+      prd.sellStartDate = txtSellDate.Text;
+      prd.discontinuedDate = txtDiscDate.Text;
+
+      try
+      {
+        // as the unique identifier is ProductId, we can use this as the key
+        CacheableString key = new CacheableString(txtProdId.Text);
+        prodRegion.Put(key, prd);
+      }
+      catch (Exception ex)
+      {
+        MessageBox.Show("Error creating a new product.  " + ex.Message);
+      }
+    }
+
+    private void btnSearch_Click(object sender, EventArgs e)
+    {
+      //  perform a search based upon the ProductId.  If the ProductId is not specified, thrown an exception.
+      if (txtProdId.Text == null)
+      {
+        MessageBox.Show("Searching enabled on Product ID only");
+      }
+      else
+      {
+        string prodId = txtProdId.Text;
+        clearTxtBoxes();
+        Product prod = (Product)prodRegion.Get(prodId);
+
+        if (prod == null)
+        {
+          MessageBox.Show("Unable to find a product with a ProductId of " + prodId);
+        }
+        else
+        {
+          txtProdId.Text = Convert.ToString(prodId);
+          txtProdName.Text = prod.name;
+          txtProdNum.Text = prod.productNumber;
+          txtStock.Text = Convert.ToString(prod.safetyLockLevel);
+          txtReorder.Text = Convert.ToString(prod.reorderPoint);
+          txtCost.Text = Convert.ToString(prod.standardCost);
+          txtList.Text = Convert.ToString(prod.listPrice);
+          txtMfgDays.Text = Convert.ToString(prod.daysToManufacture);
+          txtSellDate.Text = prod.sellStartDate;
+          txtDiscDate.Text = prod.discontinuedDate;
+        }
+      }
+    }
+
+    private void btnClear_Click(object sender, EventArgs e)
+    {
+      clearTxtBoxes();
+    }
+
+    private void clearTxtBoxes()
+    {
+      txtCost.Clear();
+      txtList.Clear();
+      txtMfgDays.Clear();
+      txtProdId.Clear();
+      txtProdName.Clear();
+      txtProdNum.Clear();
+      txtReorder.Clear();
+      txtStock.Clear();
+      txtSellDate.ResetText();
+      txtDiscDate.ResetText();
+      txtEvent.ResetText();
+    }
+
+
+    #region ICacheListener Members
+
+    public void AfterCreate(EntryEvent ev)
+    {
+      string createMessage;
+
+      ICacheableKey cKey = ev.Key;
+      CacheableString cStr = cKey as CacheableString;
+
+      Product newProd = (Product)ev.NewValue;
+
+      createMessage = string.Format("Product ID {1} has been created. " +
+        "Product details are:{0}\tProduct Name :  {2}{0}\tProduct Number :  " +
+        "{3}{0}\tColor :  {4}{0}\tStock Level :  {5}{0}\tReorder Point :  " +
+        "{6}{0}\tProduct Cost :  {7}{0}\tList Price :  " +
+        "{8}{0}\tAvailable as of :  {9}{0}\tDiscontinued as of :  {10}",
+        Environment.NewLine, cStr.Value, newProd.name, newProd.productNumber,
+        newProd.color, newProd.safetyLockLevel, newProd.reorderPoint,
+        newProd.standardCost, newProd.listPrice, newProd.sellStartDate,
+        newProd.discontinuedDate);
+    }
+
+    public void AfterDestroy(EntryEvent ev)
+    {
+      string destroyMessage;
+
+      ICacheableKey cKey = ev.Key;
+      CacheableString cStr = cKey as CacheableString;
+
+      destroyMessage = "Product ID " + cStr.Value + " has been destroyed";
+    }
+
+    public void AfterInvalidate(EntryEvent ev)
+    {
+      string invalidateMessage;
+
+      ICacheableKey cKey = ev.Key;
+      CacheableString cStr = cKey as CacheableString;
+
+      invalidateMessage = "Product ID " + cStr.Value + " has been invalidated";
+    }
+
+    public void AfterRegionDestroy(RegionEvent ev)
+    {
+      txtEvent.Text = ev.Region.Name + " has been destroyed";
+    }
+
+    public void AfterRegionClear(RegionEvent ev)
+    {
+      txtEvent.Text = ev.Region.Name + " has been cleared";
+    }
+
+    public void AfterRegionInvalidate(RegionEvent ev)
+    {
+      txtEvent.Text = ev.Region.Name + " has been invalidated";
+    }
+    /*
+     * AfterUpdate is invoked after an entry has been updated.  It provide access to the 
+     * old and new values of the entry
+     */
+    public void AfterUpdate(EntryEvent ev)
+    {
+      // text string containing the 'delta' between the two objects
+      string updateMessage = null;
+
+      try
+      {
+        ICacheableKey cKey = ev.Key;
+        CacheableString cStr = cKey as CacheableString;
+
+        updateMessage = "Product ID " + cStr.Value + " has been updated." +
+          Environment.NewLine;
+
+        Product newProduct = (Product)ev.NewValue;
+        Product oldProduct = (Product)ev.OldValue;
+
+        if (oldProduct != null)
+        {
+          updateMessage = updateMessage + Environment.NewLine +
+            "\tProduct Name :  " + oldProduct.name + " ---> " +
+              newProduct.name + Environment.NewLine +
+            "\tProduct Number :  " + oldProduct.productNumber + " ---> " +
+              newProduct.productNumber + Environment.NewLine +
+            "\tColor :  " + oldProduct.color + " ---> " +
+              newProduct.color + Environment.NewLine +
+            "\tStock Level :  " + oldProduct.safetyLockLevel + " ---> " +
+              newProduct.safetyLockLevel + Environment.NewLine +
+            "\tReorder Point :  " + oldProduct.reorderPoint + " ---> " +
+              newProduct.reorderPoint + Environment.NewLine +
+            "\tProduct Cost :  " + oldProduct.standardCost + " ---> " +
+              newProduct.standardCost + Environment.NewLine +
+            "\tList Price :  " + oldProduct.listPrice + " ---> " +
+              newProduct.listPrice + Environment.NewLine +
+            "\tAvailable as of :  " + oldProduct.sellStartDate + " ---> " +
+              newProduct.sellStartDate + Environment.NewLine +
+            "\tDiscontinued as of :  " + oldProduct.discontinuedDate + " ---> " +
+              newProduct.discontinuedDate + Environment.NewLine;
+
+          txtEvent.Text = updateMessage;
+        }
+        else
+        {
+          updateMessage = "Product ID " + cStr.Value + " has been updated. " +
+            "A prior value does not exist.  Product details are: " + Environment.NewLine + Environment.NewLine +
+            "\tProduct Name :  " + newProduct.name + Environment.NewLine +
+            "\tProduct Number :  " + newProduct.productNumber + Environment.NewLine +
+            "\tColor :  " + newProduct.color + Environment.NewLine +
+            "\tStock Level :  " + newProduct.safetyLockLevel + Environment.NewLine +
+            "\tReorder Point :  " + newProduct.reorderPoint + Environment.NewLine +
+            "\tProduct Cost :  " + newProduct.standardCost + Environment.NewLine +
+            "\tList Price :  " + newProduct.listPrice + Environment.NewLine +
+            "\tAvailable as of :  " + newProduct.sellStartDate + Environment.NewLine +
+            "\tDiscontinued as of :  " + newProduct.discontinuedDate + Environment.NewLine;
+        }
+      }
+      catch (Exception e)
+      {
+        txtEvent.Text = "AfterUpdate exception." +
+          Environment.NewLine + e.Message;
+      }
+    }
+
+    public void AfterRegionLive(RegionEvent ev)
+    {
+      txtEvent.Text = ev.Region.Name + " is live";
+    }
+
+    public void Close(GemStone.GemFire.Cache.Region region)
+    {
+      txtEvent.Text = region.Name + " has closed";
+    }
+    public void AfterRegionDisconnected(GemStone.GemFire.Cache.Region region)
+    {
+      txtEvent.Text = region.Name + " has disconnected";
+    }
+    #endregion
+
+    private void btnDestroy_Click(object sender, EventArgs e)
+    {
+      //  Destroy an entry based upon the ProductId (key).  If the ProductId is not specified, notify the user.
+      if (txtProdId.Text.Length == 0)
+      {
+        MessageBox.Show("Please specify a Product Id to destroy.");
+      }
+      else
+      {
+        string prodId = txtProdId.Text;
+
+        try
+        {
+          prodRegion.Destroy(prodId);
+          clearTxtBoxes();
+        }
+        catch (Exception re)
+        {
+          MessageBox.Show("Unable to destroy entry." +
+            Environment.NewLine + re.Message);
+        }
+      }
+    }
+
+    private void btnInvalidate_Click(object sender, EventArgs e)
+    {
+      //  Invalidate an entry based upon the ProductId (key).  If the ProductId is not specified, notify the user.
+      if (txtProdId.Text.Length == 0)
+      {
+        MessageBox.Show("Please specify a Product Id to invalidate.");
+      }
+      else
+      {
+        string prodId = txtProdId.Text;
+
+        try
+        {
+          prodRegion.Invalidate(prodId);
+          clearTxtBoxes();
+        }
+        catch (Exception re)
+        {
+          MessageBox.Show("Unable to invalidate entry." +
+            Environment.NewLine + re.Message);
+        }
+      }
+
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Form1.resx
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Form1.resx b/examples/clicache/ProductBrowser/Form1.resx
new file mode 100755
index 0000000..19dc0dd
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Form1.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Product.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Product.cs b/examples/clicache/ProductBrowser/Product.cs
new file mode 100755
index 0000000..8b3e764
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Product.cs
@@ -0,0 +1,293 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using GemStone.GemFire.Cache;
+
+namespace ProductBrowser
+{
+  class Product : IGFSerializable
+  {
+    private int ProductID;
+    private string Name;
+    private string ProductNumber;
+    private string MakeFlag;
+    private string FinishedGoodsFlag;
+    private string Color;
+    private int SafetyStockLevel;
+    private int ReorderPoint;
+    private double StandardCost;
+    private double ListPrice;
+    private int DaysToManufacture;
+    private string SellStartDate;
+    private string DiscontinuedDate;
+
+    private UInt32 GetStringSize(string str)
+    {
+      return (UInt32)(str == null ? 0 : sizeof(char) * str.Length);
+    }
+
+    public Product()
+    {
+    }
+
+    public Product(int prodId, string prodName, string prodNum, string makeFlag, string finished, string color,
+                    int safetyLock, int reorderPt, double stdCost, double listPrice, int mfgDays,
+                    string startDate, string discDate)
+    {
+      ProductID = prodId;
+      Name = prodName;
+      ProductNumber = prodNum;
+      MakeFlag = makeFlag;
+      FinishedGoodsFlag = finished;
+      Color = color;
+      SafetyStockLevel = safetyLock;
+      ReorderPoint = reorderPt;
+      StandardCost = stdCost;
+      ListPrice = listPrice;
+      DaysToManufacture = mfgDays;
+      SellStartDate = startDate;
+      DiscontinuedDate = discDate;
+    }
+
+    public static IGFSerializable CreateInstance()
+    {
+      return new Product(0, null, null, Convert.ToString(false), Convert.ToString(false), null, 1000, 750, 0.00, 0.00, 5,
+                          Convert.ToString(DateTime.Now), Convert.ToString(DateTime.Now));
+    }
+
+    public int productId
+    {
+      get
+      {
+        return ProductID;
+      }
+      set
+      {
+        ProductID = value;
+      }
+    }
+
+    public string name
+    {
+      get
+      {
+        return Name;
+      }
+      set
+      {
+        Name = value;
+      }
+    }
+
+    public string productNumber
+    {
+      get
+      {
+        return ProductNumber;
+      }
+      set
+      {
+        ProductNumber = value;
+      }
+    }
+
+    public string makeFlag
+    {
+      get
+      {
+        return MakeFlag;
+      }
+      set
+      {
+        MakeFlag = value;
+      }
+    }
+
+    public string finishedGoodsFlag
+    {
+      get
+      {
+        return FinishedGoodsFlag;
+      }
+      set
+      {
+        FinishedGoodsFlag = value;
+      }
+    }
+
+    public string color
+    {
+      get
+      {
+        return Color;
+      }
+      set
+      {
+        Color = value;
+      }
+    }
+
+    public int safetyLockLevel
+    {
+      get
+      {
+        return SafetyStockLevel;
+      }
+      set
+      {
+        SafetyStockLevel = value;
+      }
+    }
+
+    public int reorderPoint
+    {
+      get
+      {
+        return ReorderPoint;
+      }
+      set
+      {
+        ReorderPoint = value;
+      }
+    }
+
+    public double standardCost
+    {
+      get
+      {
+        return StandardCost;
+      }
+      set
+      {
+        StandardCost = value;
+      }
+    }
+
+    public double listPrice
+    {
+      get
+      {
+        return ListPrice;
+      }
+      set
+      {
+        ListPrice = value;
+      }
+    }
+
+    public int daysToManufacture
+    {
+      get
+      {
+        return DaysToManufacture;
+      }
+      set
+      {
+        DaysToManufacture = value;
+      }
+    }
+
+    public string sellStartDate
+    {
+      get
+      {
+        return SellStartDate;
+      }
+      set
+      {
+        SellStartDate = value;
+      }
+    }
+
+    public string discontinuedDate
+    {
+      get
+      {
+        return DiscontinuedDate;
+      }
+      set
+      {
+        DiscontinuedDate = value;
+      }
+    }
+
+    #region IGFSerializable Members
+
+    public UInt32 ClassId
+    {
+      get
+      {
+        return 0x07;
+      }
+    }
+
+    public IGFSerializable FromData(DataInput input)
+    {
+      ProductID = input.ReadInt32();
+      Name = input.ReadUTF();
+      ProductNumber = input.ReadUTF();
+      MakeFlag = input.ReadUTF();
+      FinishedGoodsFlag = input.ReadUTF();
+      Color = input.ReadUTF();
+      SafetyStockLevel = input.ReadInt32();
+      ReorderPoint = input.ReadInt32();
+      StandardCost = input.ReadDouble();
+      ListPrice = input.ReadDouble();
+      DaysToManufacture = input.ReadInt32();
+      SellStartDate = input.ReadUTF();
+      DiscontinuedDate = input.ReadUTF();
+
+      return this;
+
+    }
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteInt32(ProductID);
+      output.WriteUTF(Name);
+      output.WriteUTF(ProductNumber);
+      output.WriteUTF(MakeFlag);
+      output.WriteUTF(FinishedGoodsFlag);
+      output.WriteUTF(Color);
+      output.WriteInt32(SafetyStockLevel);
+      output.WriteInt32(ReorderPoint);
+      output.WriteDouble(StandardCost);
+      output.WriteDouble(ListPrice);
+      output.WriteInt32(DaysToManufacture);
+      output.WriteUTF(SellStartDate);
+      output.WriteUTF(DiscontinuedDate);
+    }
+
+    public UInt32 ObjectSize
+    {
+      get
+      {
+        UInt32 objectSize = 0;
+        objectSize += (UInt32)sizeof(Int32);
+        objectSize += GetStringSize(Name);
+        objectSize += GetStringSize(ProductNumber);
+        objectSize += GetStringSize(MakeFlag);
+        objectSize += GetStringSize(FinishedGoodsFlag);
+        objectSize += GetStringSize(Color);
+        objectSize += (UInt32)sizeof(Int32);
+        objectSize += (UInt32)sizeof(Int32);
+        objectSize += (UInt32)sizeof(double);
+        objectSize += (UInt32)sizeof(double);
+        objectSize += (UInt32)sizeof(double);
+        objectSize += GetStringSize(SellStartDate);
+        objectSize += GetStringSize(DiscontinuedDate);
+        return objectSize;
+      }
+    }
+
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/ProductBrowser.csproj
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/ProductBrowser.csproj b/examples/clicache/ProductBrowser/ProductBrowser.csproj
new file mode 100755
index 0000000..9f580a4
--- /dev/null
+++ b/examples/clicache/ProductBrowser/ProductBrowser.csproj
@@ -0,0 +1,120 @@
+\ufeff<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{7C77A471-0334-49DF-ABE5-B1799428B8AC}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>GemStone.GemFire.Cache.Examples</RootNamespace>
+    <AssemblyName>ProductBrowser</AssemblyName>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\Debug\ProductBrowser\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\Debug\ProductBrowser\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\ProductBrowser\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\ProductBrowser\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\Debug\ProductBrowser\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\Debug\ProductBrowser\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\ProductBrowser\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\ProductBrowser\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\vs_projects\gfclicache\gfclicache.vcproj">
+      <Project>{B274E3B1-6A09-4322-952B-8BDA712892CE}</Project>
+      <Name>gfclicache</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Product.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Program.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Program.cs b/examples/clicache/ProductBrowser/Program.cs
new file mode 100755
index 0000000..4d6c758
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Program.cs
@@ -0,0 +1,28 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace ProductBrowser
+{
+  static class Program
+  {
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+    [STAThread]
+    static void Main()
+    {
+      Application.EnableVisualStyles();
+      Application.SetCompatibleTextRenderingDefault(false);
+      Application.Run(new ProductBrowser());
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Properties/AssemblyInfo.cs b/examples/clicache/ProductBrowser/Properties/AssemblyInfo.cs
new file mode 100755
index 0000000..64c4fa9
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+\ufeffusing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ProductBrowser")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("GemStone Systems, Inc.")]
+[assembly: AssemblyProduct("ProductBrowser")]
+[assembly: AssemblyCopyright("Copyright � GemStone Systems, Inc. 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5f89d3ba-58b8-46d9-b61d-744b82704cf6")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("9.0.0.0")]
+[assembly: AssemblyFileVersion("9.0.0.0")]

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Properties/Resources.Designer.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Properties/Resources.Designer.cs b/examples/clicache/ProductBrowser/Properties/Resources.Designer.cs
new file mode 100755
index 0000000..f27808e
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+\ufeff//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.3053
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace GemStone.GemFire.Cache.Examples.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GemStone.GemFire.Cache.Examples.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Properties/Resources.resx
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Properties/Resources.resx b/examples/clicache/ProductBrowser/Properties/Resources.resx
new file mode 100755
index 0000000..af7dbeb
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Properties/Resources.resx
@@ -0,0 +1,117 @@
+\ufeff<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Properties/Settings.Designer.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Properties/Settings.Designer.cs b/examples/clicache/ProductBrowser/Properties/Settings.Designer.cs
new file mode 100755
index 0000000..4ff0889
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+\ufeff//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.3053
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace GemStone.GemFire.Cache.Examples.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/Properties/Settings.settings
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/Properties/Settings.settings b/examples/clicache/ProductBrowser/Properties/Settings.settings
new file mode 100755
index 0000000..3964565
--- /dev/null
+++ b/examples/clicache/ProductBrowser/Properties/Settings.settings
@@ -0,0 +1,7 @@
+\ufeff<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/README.html
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/README.html b/examples/clicache/ProductBrowser/README.html
new file mode 100644
index 0000000..bd2eed5
--- /dev/null
+++ b/examples/clicache/ProductBrowser/README.html
@@ -0,0 +1,377 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 7.0/HTML Export Filter">
+
+<TITLE>ProductBrowser: GemFire Native&#174; Client Example</TITLE>
+<style type="text/css">
+<!--
+.style1 {font-style: italic}
+-->
+</style>
+</HEAD>
+<BODY>
+ <IMG SRC="../../../docs/PIVOTAL_GemFire_190x81.png" BORDER="0">
+ <DIV>
+   <h1 align="center"><a name="Top" id="Top"></a>ProductBrowser</h1>
+   <h2 align="center">Pivotal GemFire&#174; Native Client</h2>
+   <h2 align="center">Programming Example</h2>
+</DIV>
+<DIV>
+<P>The <code>ProductBrowser</code> example demonstrates heterogeneous client access by using both a .NET client and a Java client to interact with a Java cache server and exchange data between the clients. Both clients have <code>Product</code> for their <code>DataSerializable</code> class, and the .NET client implements a cache listener to display events as they occur.
+<P>Use <code>ProductBrowser</code> to put product data into the cache server from one client, retrieve the data in another client, make modifications, then update the clients with the new data. The example is located in <code>examples/cli_ProductBrowser.<br>
+  </code><br>
+  <br>
+</DIV>
+ <DIV>
+<H2>
+Running ProductBrowser</H2>
+<P>
+The <code>ProductBrowser</code> example runs both a .NET client and a Java client with a GemFire Java cache server. The example uses <code><a href="./product.xml" target="_blank">product.xml</a></code> to configure the Java cache server. When the Java cache server starts, <code>product.xml</code> creates a <code>root</code> region named <code>product</code>.</P>
+<P>
+In the procedures, the lines you type are shown in a
+ <code> <strong>boldface fixed</strong></code> font. System output is in a <code>regular fixed</code> font.<br>
+ <br>
+ <br>
+</P> 
+</DIV>
+
+<DIV>
+<H2>
+<a name="configuring_environment" id="configuring_environment"></a>Configuring the Environment </H2>
+<P>
+Examples that interact with a Java cache server require specific environment configurations so the Java cache server will run properly. Follow the configuration steps listed below that apply to your operating system: </P>
+</DIV>
+ <DIV>
+<ol>
+  <li>From the GemFire product installation directory, configure your environment settings by following the steps in <code>examples/EnvSetup.html</code>. Refer to the developer's 
+      guide if you need help with this step.<br>
+      <br>
+  <li>Set the <code>JAVA_HOME</code> and <code>GF_JAVA_HOME</code>  environment variables to your installed Java JRE or JDK. See the Installation chapter of the   <em>GemFire User's Guide</em> for the versions of Java that are compatible with GemFire. The <code>JAVA_HOME</code> setting is for your applications, and  <code>GF_JAVA_HOME</code> is for the GemFire scripts.  You must have a compatible Java JRE or JDK installed and you must set <code>JAVA_HOME</code> and <code>GF_JAVA_HOME</code> to point to it.<br>
+      <br>
+  <li>Add <code>$JAVA_HOME/bin</code> to the start of your <code>PATH</code>. <br>
+</ol>
+<p>The following is a list of the environment configuration commands for the <code>ProductBrowser</code> example. Choose the set of commands that are appropriate for your operating system. The text that you type is shown in bold.
+  These configurations only need to be performed for the sessions that invoke the Java cache server.</p>
+<p><strong>Bourne and Korn shells (sh, ksh, bash)</strong></p>
+<blockquote>
+  <p>    <code>% <strong>cd GemFireInstallDirectory</strong><br>
+    % <strong>JAVA_HOME=&lt;installed JRE PATH&gt;; export JAVA_HOME</strong><br>
+    % <strong>GF_JAVA_HOME=$JAVA_HOME; export GF_JAVA_HOME</strong><br>
+    % <strong>PATH=$JAVA_HOME/bin:$PATH; export PATH</strong></code></p>
+</blockquote>
+<p><strong>Windows</strong></p>
+<blockquote>
+  <p><code>&gt; <strong>cd GemFireInstallDirectory</strong><br>
+&gt; <strong>set JAVA_HOME=&lt;installed JRE PATH&gt;</strong><br>
+&gt; <strong>set GF_JAVA_HOME=%JAVA_HOME%</strong><br>
+&gt; <strong>set PATH=%JAVA_HOME%\bin;%PATH%</strong> </code></p>
+</blockquote>
+</DIV>
+
+<DIV>
+<H2>
+<a name="starting_application_processes" id="starting_application_processes"></a>Starting the Cache Server </H2>
+<P>
+To start the cache server for the <code>ProductBrowser</code> example, create a session and complete the following steps. </P>
+</DIV>
+ <DIV>
+<OL>
+<LI CLASS="Numbered-1st">
+<p>Configure the session environment according to the steps listed in <a href="#configuring_environment">Configuring the Environment</a><a href="..\EnvSetup.html" target="_blank"></a>.</p>
+</LI>
+<LI CLASS="Numbered">
+Go to the <code>cli_ProductBrowser</code> directory:
+ <blockquote>
+   <p><strong>
+     <code>cd examples\cli_ProductBrowser</code></strong></p>
+   </blockquote>
+ </LI>
+<LI CLASS="Numbered">
+Start the cache server, specifying <code>product.xml</code> in the <code>defaultConfig</code> directory as its configuration file. Enter the entire <code>cacheserver start</code> command below on a single line, replacing the <code>xxxx</code> in <code>NativeClient_xxxx</code> with the actual four-digit product version:
+   <blockquote>
+     <p><strong><code>cacheserver start -dir=</code></strong><strong><code>defaultConfig cache-xml-file=product.xml</code></strong></p>
+   </blockquote>
+ <P>The cache server is initialized using the settings in the <code>product.xml</code> file. A message similar to the following appears, indicating that the cache server is running:</P>
+</LI>
+ <blockquote>
+   <p>
+     <code>Cacheserver pid: 2120 status: running</code></p>
+   </blockquote>
+</OL>
+</DIV>
+
+<DIV>
+<H2>
+<a name="starting_application_processes" id="starting_application_processes"></a>Starting the ProductBrowser Java client </H2>
+<P>
+The Java client uses <code>productClient.jar</code> in the <code>lib</code> directory. To start the </code>Java client:</P>
+</DIV>
+
+ <DIV>
+<OL>
+<LI CLASS="Numbered-1st">
+<p>Create another session and configure its environment
+  by entering the following command:
+</LI>
+  <blockquote>
+   <p><strong>
+     <code>bin\setenv.bat</code></strong></p>
+   </blockquote>
+ <LI CLASS="Numbered-1st">
+   <p>Add the classes for <code>productClient.jar</code> to your <code>CLASSPATH</code> by entering the following in a single line: </p>
+ </LI>
+  <blockquote>
+   <p><strong>
+     <code>set CLASSPATH=&lt;full path to NativeClient_xxxx&gt;\examples\cli_ProductBrowser\<br>
+     lib\productClient.jar;%CLASSPATH%</code></strong></p>
+   </blockquote>
+ <LI CLASS="Numbered">
+Start the <code> ProductBrowser</code>
+ Java client:
+     <blockquote>
+       <p><strong><code>java com.examples.gemfire.net.ProductBrowser</code></strong> </p>
+   </blockquote>
+ <P>The <code>ProductBrowser</code> Java client is initialized and connects with the cache server. In a moment, the following prompt appears:</P>
+</LI>
+ <blockquote>
+   <p>
+     <code>Enter the operation to execute.  'Get' to find an object, 'Put' to insert/update  an object, or 'Exit' to end:</code></p>
+   </blockquote>
+</OL>
+<br>
+</DIV>
+
+<DIV>
+<H2>Starting the ProductBrowser .NET Client</H2>
+<P>
+To complete the client setup, start the .NET client by following these steps:</P>
+</DIV>
+<DIV>
+  <OL>
+  <li>Create another session, then go to the <code>cli_ProductBrowser</code> directory.
+    <blockquote>
+   <p><strong><code>cd examples\cli_ProductBrowser</code></strong></p>
+   </blockquote>
+ </li>
+
+  <LI CLASS="Numbered">
+    Start the .NET client:
+      <blockquote>
+        <p><strong>
+          <code>ProductBrowser.exe</code></strong></p>
+      </blockquote>
+      <P>
+      The Product Browser form appears. The form consists of a set of fields where you enter product data. The Event Message area is a cache listener interface that displays events as they occur in the clients. </P>
+  </LI>
+  </OL>
+</DIV>
+<DIV>
+<H2>
+Entering Data in the Product Browser Form </H2>
+<P>
+Enter data in the Product Browser form and put the data into the cache.</P>
+</DIV>
+<DIV>
+<P CLASS="Head-D"><strong>
+In the Product Browser form: </strong></P>
+
+<OL>
+<LI CLASS="Numbered">
+Type the following data into each of the fields:</LI>
+<blockquote>
+  <table width="302" cellpadding="2" cellspacing="2">
+    <tr>
+      <td width="142"><code>Product Id </code></td>
+      <td width="150" bordercolor="#000000"><strong><code>101</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Product Name </code></td>
+      <td bordercolor="#000000"><strong><code>widget</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Product Number </code></td>
+      <td bordercolor="#000000"><strong><code>123</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Stock Amt </code></td>
+      <td bordercolor="#000000"><strong><code>15</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Reorder Amt </code></td>
+      <td bordercolor="#000000"><strong><code>10</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Cost</code></td>
+      <td bordercolor="#000000"><strong><code>1.5</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>List Price </code></td>
+      <td bordercolor="#000000"><strong><code>5.0</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Days to Mfg </code></td>
+      <td bordercolor="#000000"><strong><code>5</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Sell Date </code></td>
+      <td bordercolor="#000000"><strong><code>3/15</code></strong></td>
+    </tr>
+    <tr>
+      <td><code>Discontinue Date </code></td>
+      <td bordercolor="#000000"><strong><code>9/12</code></strong></td>
+    </tr>
+  </table>
+  </blockquote>
+<li>
+  Click the <code>Put</code> button to enter the data into the cache server.</li>
+</OL>
+<br>
+</DIV>
+<DIV>
+<H2>
+<a name="managing_data"></a>Retrieving the Data in the Java Client</H2>
+<P>
+Next, specify the Product ID to update the Java client with the data you entered in the Product Browser form<code></code>.</P>
+</DIV>
+<DIV>
+<P CLASS="Head-D"><strong>
+In the Java client: </strong></P>
+  <OL>
+    <LI CLASS="Numbered">
+Get the product data previously entered into the Product Browser form:
+     <blockquote>
+       <p><strong><code>Get</code></strong></p>
+   </blockquote>
+    <li>When the following prompt appears, enter <code>101</code> for the Product ID that was defined in the Product Browser:
+      <blockquote>
+        <p><code>Enter the Product ID to search for:<strong> 101</strong></code></p>
+   </blockquote>
+        <p> The data associated with Product ID 101 is retrieved from the cacheserver:</p>
+        <blockquote>
+        <p><code>Product ID =            101<br>
+          Product Name =          widget<br>
+          Product Number =        123<br>
+          Color =                 Black<br>
+          Stock Level =           15<br>
+          Reorder Point =         10<br>
+          Product Cost =          1.5<br>
+          List Price =            5.0<br>
+          Available as of =       3/15<br>
+          Discontinue as of =     9/12</code></p>
+      </blockquote>
+  </li>
+  </OL>
+</DIV>
+<DIV>
+<H2>
+<a name="managing_data"></a>Modifying the Data With the Java Client</H2>
+<P>
+Enter some new product values into the Java client and see both the original and the new values displayed in the .NET client (Product Browser).</P>
+</DIV>
+<DIV>
+<P CLASS="Head-D"><strong>
+In the Java client: </strong></P>
+  <OL>
+<LI CLASS="Numbered-1st">Put new data into the cache. You're prompted with the same input fields as the Product Browser form:
+  <blockquote>
+    <p><strong><code>Put</code></strong></p>
+  </blockquote>
+  </LI>
+    <LI CLASS="Numbered">For each of the following prompts, enter the values shown:<br>
+      <br>
+    </LI>
+    <blockquote>
+      <table width="379" cellpadding="2" cellspacing="2">
+        <tr>
+          <td width="225"><code>ProductId: </code></td>
+          <td width="138" bordercolor="#000000"><strong><code>101</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Product Name: </code></td>
+          <td bordercolor="#000000"><strong><code>widget</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Product Number: </code></td>
+          <td bordercolor="#000000"><strong><code>123</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Color:</code></td>
+          <td bordercolor="#000000"><strong><code>Blue</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Stock Level (int): </code></td>
+          <td bordercolor="#000000"><strong><code>30</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Reorder Point (int): </code></td>
+          <td bordercolor="#000000"><strong><code>15</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Product Cost (double): </code></td>
+          <td bordercolor="#000000"><strong><code>2.0</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>List Price (double): </code></td>
+          <td bordercolor="#000000"><strong><code>6.0</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Available as of (string):  </code></td>
+          <td bordercolor="#000000"><strong><code>6/15</code></strong></td>
+        </tr>
+        <tr>
+          <td><code>Discontinue as of (string): </code></td>
+          <td bordercolor="#000000"><strong><code>11/12</code></strong></td>
+        </tr>
+      </table>
+    </blockquote>
+  <LI CLASS="Numbered"><p>Look at the Product Browser. Its Event Message area displays the original values for Product ID 101, along with the updated values that you just entered in the Java client.</p></LI>
+
+    <LI CLASS="Numbered">In the cache server session, enter the following command to stop the cache server:
+      <blockquote>
+        <p><strong> <code>cacheserver stop -dir=defaultConfig </code></strong></p>
+      </blockquote>
+    </LI>
+<li>
+  <p>Now close the cache server session: </p>
+  <blockquote>
+    <p><strong> <code>exit</code></strong></p>
+  </blockquote>
+</li>
+<li>
+  <p>End the Java client, then close its session: </p>
+  <blockquote>
+    <p><strong> <code>exit</code></strong></p>
+    <p><strong><code>exit</code></strong></p>
+  </blockquote>
+</li>
+<li>
+  <p>Close the .NET client session: </p>
+  <blockquote>
+    <p><strong><code>exit</code></strong></p>
+  </blockquote>
+</li>
+  <LI CLASS="Numbered">
+    Close the Product Browser form by clicking the '<code>X</code>' button in the right part of its titlebar, or by clicking the icon in the left part of its titlebar and then clicking <code>Close</code>.</LI>
+</OL>
+  <br>
+</DIV>
+
+<DIV>
+<H2>
+Changing System Parameters</H2>
+<P>
+This product ships configured to run with default system properties. If you need to run in a non-default configuration, GemFire also takes a system-level configuration file. Copy the <code>gfcpp.properties</code> file into your <code>cli_ProductBrowser</code> directory from the <code>defaultSystem</code> directory. Edit the <code>gfcpp.properties</code> file in your <code>cli_ProductBrowser</code> directory as needed. For example, to change the name of the <code>cache.xml</code> file, uncomment this line and change the file name:</P>
+<P> <code>#cache-xml-file=cache.xml</code><br>
+  <br>
+  <br>
+</P>
+</DIV>
+<a href="#Top">Top</a>
+<P>&nbsp;</P>
+<P>
+<p>Copyright &#169; 2005-2014 Pivotal Software, Inc. All rights reserved.  This product is protected by U.S. and international copyright and intellectual property laws. Pivotal products are covered by one or more patents listed at http://www.pivotal.io/patents.</p>
+</BODY>
+</HTML>
+

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/com/examples/gemfire/net/Product.java
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/com/examples/gemfire/net/Product.java b/examples/clicache/ProductBrowser/com/examples/gemfire/net/Product.java
new file mode 100755
index 0000000..92c2a1d
--- /dev/null
+++ b/examples/clicache/ProductBrowser/com/examples/gemfire/net/Product.java
@@ -0,0 +1,201 @@
+package com.examples.gemfire.net;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.geode.DataSerializable;
+import org.apache.geode.Instantiator;
+
+public class Product implements DataSerializable {
+	
+    private int ProductID;
+    private String Name;
+    private String ProductNumber;
+    private String MakeFlag;
+    private String FinishedGoodsFlag;
+    private String Color;
+    private int SafetyStockLevel;
+    private int ReorderPoint;
+    private double StandardCost;
+    private double ListPrice;
+    private int DaysToManufacture;
+    private String SellStartDate;
+    private String DiscontinuedDate;
+
+    static { // note that classID (7) must match C#
+        Instantiator.register(new Instantiator(Product.class, (byte) 0x07) {
+            public DataSerializable newInstance() {
+            	return new Product();
+        }
+        });
+    }
+
+        
+	public Product() {
+		// TODO Auto-generated constructor stub
+		
+	}
+	
+	public Product(int prodId, String prodName, String prodNum, String makeFlag, String finished, String color,
+            int safetyLock, int reorderPt, double stdCost, double listPrice, int mfgDays,
+            String startDate, String discDate)
+	{
+		ProductID = prodId;
+		Name = prodName;
+		ProductNumber = prodNum;
+		MakeFlag = makeFlag;
+		FinishedGoodsFlag = finished;
+		Color = color;
+		SafetyStockLevel = safetyLock;
+		ReorderPoint = reorderPt;
+		StandardCost = stdCost;
+		ListPrice = listPrice;
+		DaysToManufacture = mfgDays;
+		SellStartDate = startDate;
+		DiscontinuedDate = discDate;
+	}
+
+	public void fromData(DataInput input) throws IOException, ClassNotFoundException {
+
+			ProductID = input.readInt();
+			Name = input.readUTF();
+			ProductNumber = input.readUTF();
+			MakeFlag = input.readUTF();
+			FinishedGoodsFlag = input.readUTF();
+			Color = input.readUTF();
+			SafetyStockLevel = input.readInt();
+			ReorderPoint	= input.readInt();
+			StandardCost = input.readDouble();
+			ListPrice = input.readDouble();
+			DaysToManufacture = input.readInt();
+			SellStartDate = input.readUTF();
+			DiscontinuedDate = input.readUTF();
+	}
+
+	public void toData(DataOutput output) throws IOException {
+			output.writeInt(this.getProductID());
+			output.writeUTF(this.getName());
+			output.writeUTF(this.getProductNumber());
+			output.writeUTF(this.getMakeFlag());
+			output.writeUTF(this.getFinishedGoodsFlag());
+			output.writeUTF(this.getColor());
+			output.writeInt(this.getSafetyStockLevel());
+	        output.writeInt(this.getReorderPoint());
+	        output.writeDouble(this.getStandardCost());
+	        output.writeDouble(this.getListPrice());
+	        output.writeInt(this.getDaysToManufacture());
+	        output.writeUTF(this.getSellStartDate());
+	        output.writeUTF(this.getDiscontinuedDate());
+	}
+
+	public String getColor() {
+		return Color;
+	}
+
+	public void setColor(String color) {
+		Color = color;
+	}
+
+	public int getDaysToManufacture() {
+		return DaysToManufacture;
+	}
+
+	public void setDaysToManufacture(int daysToManufacture) {
+		DaysToManufacture = daysToManufacture;
+	}
+
+	public String getDiscontinuedDate() {
+		return DiscontinuedDate;
+	}
+
+	public void setDiscontinuedDate(String discontinuedDate) {
+		DiscontinuedDate = discontinuedDate;
+	}
+
+	public String getFinishedGoodsFlag() {
+		return FinishedGoodsFlag;
+	}
+
+	public void setFinishedGoodsFlag(String finishedGoodsFlag) {
+		FinishedGoodsFlag = finishedGoodsFlag;
+	}
+
+	public double getListPrice() {
+		return ListPrice;
+	}
+
+	public void setListPrice(double listPrice) {
+		ListPrice = listPrice;
+	}
+
+	public String getMakeFlag() {
+		return MakeFlag;
+	}
+
+	public void setMakeFlag(String makeFlag) {
+		MakeFlag = makeFlag;
+	}
+
+	public String getName() {
+		return Name;
+	}
+
+	public void setName(String name) {
+		Name = name;
+	}
+
+	public int getProductID() {
+		return ProductID;
+	}
+
+	public void setProductID(int productID) {
+		ProductID = productID;
+	}
+
+	public String getProductNumber() {
+		return ProductNumber;
+	}
+
+	public void setProductNumber(String productNumber) {
+		ProductNumber = productNumber;
+	}
+
+	public int getReorderPoint() {
+		return ReorderPoint;
+	}
+
+	public void setReorderPoint(int reorderPoint) {
+		ReorderPoint = reorderPoint;
+	}
+
+	public int getSafetyStockLevel() {
+		return SafetyStockLevel;
+	}
+
+	public void setSafetyStockLevel(int safetyStockLevel) {
+		SafetyStockLevel = safetyStockLevel;
+	}
+
+	public String getSellStartDate() {
+		return SellStartDate;
+	}
+
+	public void setSellStartDate(String sellStartDate) {
+		SellStartDate = sellStartDate;
+	}
+
+	public double getStandardCost() {
+		return StandardCost;
+	}
+
+	public void setStandardCost(double standardCost) {
+		StandardCost = standardCost;
+	}
+
+	public Class[] getSupportedClasses() {
+		// TODO Auto-generated method stub
+		return new Class[] {com.examples.gemfire.net.Product.class};
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/com/examples/gemfire/net/ProductBrowser.java
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/com/examples/gemfire/net/ProductBrowser.java b/examples/clicache/ProductBrowser/com/examples/gemfire/net/ProductBrowser.java
new file mode 100755
index 0000000..71f593c
--- /dev/null
+++ b/examples/clicache/ProductBrowser/com/examples/gemfire/net/ProductBrowser.java
@@ -0,0 +1,189 @@
+package com.examples.gemfire.net;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.geode.DataSerializable;
+import org.apache.geode.DataSerializer;
+import org.apache.geode.Instantiator;
+import org.apache.geode.cache.AttributesFactory;
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.CacheException;
+import org.apache.geode.cache.CacheFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.Scope;
+import org.apache.geode.cache.util.BridgeLoader;
+import org.apache.geode.cache.util.BridgeWriter;
+import org.apache.geode.distributed.DistributedSystem;
+
+
+public class ProductBrowser {
+
+	/**
+	 * @param args
+	 */
+	/** This example's connection to the distributed system */
+	private DistributedSystem system = null;
+
+	/** Cache <code>Region</code> currently reviewed by this example */
+	private Region productRegion;
+	
+	/** The cache used in the example */
+	private Cache cache;
+	
+	private File xmlFile = new File("product.xml");
+	
+	
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		
+		ProductBrowser client = new ProductBrowser();
+		try {
+			client.initialize();
+			client.go();
+		}
+		catch (CacheException ce)
+		{
+			ce.printStackTrace();
+		}
+		catch (Exception e)
+		{
+			System.out.println("\nException...");
+			e.printStackTrace();
+		}
+
+	}
+	
+	/*
+	 * Initialized the cache client.  Gemfire.properties and product.xml are required
+	 * for initialization.  No additional cache or region parameters are specified
+	 * programmatically
+	 */
+	private void initialize() throws CacheException, Exception  {	
+		Properties props = new Properties();
+		props.setProperty("cache-xml-file", this.xmlFile.toString());
+		system = DistributedSystem.connect(props);
+		cache = CacheFactory.create(system);
+		
+		productRegion = cache.getRegion("product");
+		
+		// register the product class for heterogeneous client access.
+		Instantiator.register(new Instantiator(Product.class, (byte) 0x07) {
+            public DataSerializable newInstance() {
+            	return new Product();
+        }
+        });
+		
+	}
+		
+	/*
+	 * Allows the user to search and create entries in the cache.
+	 */
+	private void go() throws CacheException, Exception
+	{
+		String command;
+		String key;
+		BufferedReader bin = new BufferedReader(new InputStreamReader(System.in));
+				
+		do { 
+			System.out.print("\n\n");
+			System.out.print("Enter the operation to execute.  'Get' to find an object, 'Put' to insert/update an object, or 'Exit' to end:  ");
+			
+			command = bin.readLine();
+			
+			if (command.equalsIgnoreCase("get"))
+			{
+				System.out.print("Enter the Product ID to search for:  ");
+				key = bin.readLine();
+				Product prod = (Product)productRegion.get(key);
+				
+				if (prod != null) {
+					System.out.println("Product ID =		" + prod.getProductID());
+					System.out.println("Product Name =		" + prod.getName());
+					System.out.println("Product Number =	" + prod.getProductNumber());
+					System.out.println("Color =			" + prod.getColor());
+					System.out.println("Stock Level = 		" + prod.getSafetyStockLevel());
+					System.out.println("Reorder Point = 	" + prod.getReorderPoint());
+					System.out.println("Product Cost =		" + prod.getStandardCost());
+					System.out.println("List Price = 		" + prod.getListPrice());
+					System.out.println("Available as of = 	" + prod.getSellStartDate());
+					System.out.println("Discontinue as of = 	" + prod.getDiscontinuedDate());
+				}
+				else {
+					System.out.println("Product not found in the cache.");
+				}
+			}
+			else if (command.equalsIgnoreCase("put"))
+			{
+				System.out.print("ProductId:  ");
+				String pId = bin.readLine();
+				Integer pKey = new Integer(pId);
+				
+				System.out.print("Product Name:  ");
+				String pName = bin.readLine();
+				
+				System.out.print("Product Number:  ");
+				String pNum = bin.readLine();
+				
+				System.out.print("Color:  ");
+				String color = bin.readLine();
+				
+				System.out.print("Stock Level (int):  ");
+				String stockLevel = bin.readLine();
+				
+				System.out.print("Reorder Point (int):  ");
+				String reorderPoint = bin.readLine();
+				
+				System.out.print("Product Cost (double):  ");
+				String cost = bin.readLine();
+				
+				System.out.print("List Price (double):  ");
+				String listPrice = bin.readLine();
+				
+				System.out.print("Available as of (string):  ");
+				String availableAsOf = bin.readLine();
+				
+				System.out.print("Discontinue as of (string):  ");
+				String discAsOf = bin.readLine();
+				
+				try {
+					// Populate the product object with the values specified and insert into the 
+					// cache.  Please note that no type checking is performed.  Entering an 
+					// invalid type will result in an exception 
+					Product prod = new Product();
+					prod.setProductID(pKey.intValue());
+					prod.setName(pName);
+					prod.setProductNumber(pNum);
+					prod.setMakeFlag("false");
+					prod.setFinishedGoodsFlag("false");
+					prod.setColor(color);
+					prod.setSafetyStockLevel(new Integer(stockLevel).intValue());
+					prod.setReorderPoint(new Integer(reorderPoint).intValue());
+					prod.setStandardCost(new Double(cost).doubleValue());
+					prod.setListPrice(new Double(listPrice).doubleValue());
+					prod.setDaysToManufacture(2);
+					prod.setSellStartDate(availableAsOf);
+					prod.setDiscontinuedDate(discAsOf);
+				
+					productRegion.put(pId, prod);
+				}
+				catch (NumberFormatException nfe)
+				{
+					System.out.println("\n\nException occurred populating the Product Object.  ");
+					System.out.println("------> Stock level, reorder point, list price and product cost must be numeric values");
+				}
+				catch (Exception re)
+				{
+					System.out.println("Eception occurred adding the object to the cache.  Exception is:");
+					re.printStackTrace();
+				}
+				
+			}
+		} while (!command.equalsIgnoreCase("exit"));
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/defaultConfig/gemfire.properties
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/defaultConfig/gemfire.properties b/examples/clicache/ProductBrowser/defaultConfig/gemfire.properties
new file mode 100644
index 0000000..b5b659c
--- /dev/null
+++ b/examples/clicache/ProductBrowser/defaultConfig/gemfire.properties
@@ -0,0 +1,7 @@
+#Fri Dec 15 10:20:26 PST 2006
+cache-xml-file=product.xml
+mcast-port=10334
+mcast-address=239.192.81.1
+log-level=config
+log-file=productBrowserServer.log
+name=ProductBrowserServer
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/defaultConfig/product.xml
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/defaultConfig/product.xml b/examples/clicache/ProductBrowser/defaultConfig/product.xml
new file mode 100644
index 0000000..58fa089
--- /dev/null
+++ b/examples/clicache/ProductBrowser/defaultConfig/product.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+  <region name="product">
+    <region-attributes/>
+  </region>
+</cache>

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/gemfire.properties
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/gemfire.properties b/examples/clicache/ProductBrowser/gemfire.properties
new file mode 100755
index 0000000..b5b659c
--- /dev/null
+++ b/examples/clicache/ProductBrowser/gemfire.properties
@@ -0,0 +1,7 @@
+#Fri Dec 15 10:20:26 PST 2006
+cache-xml-file=product.xml
+mcast-port=10334
+mcast-address=239.192.81.1
+log-level=config
+log-file=productBrowserServer.log
+name=ProductBrowserServer
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/lib/productClient.jar
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/lib/productClient.jar b/examples/clicache/ProductBrowser/lib/productClient.jar
new file mode 100644
index 0000000..19e5c3e
Binary files /dev/null and b/examples/clicache/ProductBrowser/lib/productClient.jar differ

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/ProductBrowser/product.xml
----------------------------------------------------------------------
diff --git a/examples/clicache/ProductBrowser/product.xml b/examples/clicache/ProductBrowser/product.xml
new file mode 100755
index 0000000..98beab0
--- /dev/null
+++ b/examples/clicache/ProductBrowser/product.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+  
+<cache xmlns="http://geode.apache.org/schema/cache"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+       version="1.0" lock-lease="120" lock-timeout="60" search-timeout="300" is-server="true" copy-on-read="false">
+  <cache-server port="40404"/>
+  <region name="product">
+    <region-attributes scope="distributed-no-ack" data-policy="normal">
+    </region-attributes>
+  </region>
+</cache>

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/UserObjects/AccountHistory.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/UserObjects/AccountHistory.cs b/examples/clicache/UserObjects/AccountHistory.cs
new file mode 100644
index 0000000..a16b901
--- /dev/null
+++ b/examples/clicache/UserObjects/AccountHistory.cs
@@ -0,0 +1,94 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+using System;
+using System.Collections.Generic;
+
+namespace GemStone.GemFire.Cache.Examples
+{
+  class AccountHistory : IGFSerializable
+  {
+    #region Private members
+
+    private List<string> m_history;
+
+    #endregion
+
+    public AccountHistory()
+    {
+      m_history = new List<string>();
+    }
+
+    public void ShowAccountHistory()
+    {
+      Console.WriteLine("AccountHistory:");
+      foreach (string hist in m_history)
+      {
+        Console.WriteLine("\t{0}", hist);
+      }
+    }
+
+    public void AddLog(string entry)
+    {
+      m_history.Add(entry);
+    }
+
+    public static IGFSerializable CreateInstance()
+    {
+      return new AccountHistory();
+    }
+
+    #region IGFSerializable Members
+
+    public IGFSerializable FromData(DataInput input)
+    {
+      int len = input.ReadInt32();
+
+      m_history.Clear();
+      for (int i = 0; i < len; i++)
+      {
+        m_history.Add(input.ReadUTF());
+      }
+      return this;
+    }
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteInt32(m_history.Count);
+      foreach (string hist in m_history)
+      {
+        output.WriteUTF(hist);
+      }
+    }
+
+    public UInt32 ClassId
+    {
+      get
+      {
+        return 0x05;
+      }
+    }
+    
+    public UInt32 ObjectSize
+    {
+      get
+      {
+        UInt32 objectSize = 0;
+        foreach (string hist in m_history)
+        {
+          objectSize += (UInt32)(hist == null ? 0 : sizeof(char) * hist.Length);
+        }
+        return objectSize;
+
+      }
+      
+    }
+
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/UserObjects/BankAccount.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/UserObjects/BankAccount.cs b/examples/clicache/UserObjects/BankAccount.cs
new file mode 100644
index 0000000..3f997e7
--- /dev/null
+++ b/examples/clicache/UserObjects/BankAccount.cs
@@ -0,0 +1,130 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+using System;
+
+namespace GemStone.GemFire.Cache.Examples
+{
+  class BankAccount : ICacheableKey
+  {
+    #region Private members
+
+    private int m_customerId;
+    private int m_accountId;
+
+    #endregion
+
+    #region Public accessors
+
+    public int Customer
+    {
+      get
+      {
+        return m_customerId;
+      }
+    }
+
+    public int Account
+    {
+      get
+      {
+        return m_accountId;
+      }
+    }
+
+    #endregion
+
+    public BankAccount(int customer, int account)
+    {
+      m_customerId = customer;
+      m_accountId = account;
+    }
+
+    // Our TypeFactoryMethod
+    public static IGFSerializable CreateInstance()
+    {
+      return new BankAccount(0, 0);
+    }
+
+    #region IGFSerializable Members
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteInt32(m_customerId);
+      output.WriteInt32(m_accountId);
+    }
+
+    public IGFSerializable FromData(DataInput input)
+    {
+      m_customerId = input.ReadInt32();
+      m_accountId = input.ReadInt32();
+      return this;
+    }
+
+    public UInt32 ClassId
+    {
+      get
+      {
+        return 0x04;
+      }
+    }
+
+    public UInt32 ObjectSize
+    {
+      get
+      {
+        return (UInt32)(sizeof(Int32) + sizeof(Int32));
+      }
+    
+    }
+
+    #endregion
+
+    #region ICacheableKey Members
+
+    public bool Equals(ICacheableKey other)
+    {
+      BankAccount otherAccount = other as BankAccount;
+      if (otherAccount != null)
+      {
+        return (m_customerId == otherAccount.m_customerId) &&
+          (m_accountId == otherAccount.m_accountId);
+      }
+      return false;
+    }
+
+    public override int GetHashCode()
+    {
+      return (m_customerId ^ m_accountId);
+    }
+
+    #endregion
+
+    #region Overriden System.Object methods
+
+    public override bool Equals(object obj)
+    {
+      BankAccount otherAccount = obj as BankAccount;
+      if (otherAccount != null)
+      {
+        return (m_customerId == otherAccount.m_customerId) &&
+          (m_accountId == otherAccount.m_accountId);
+      }
+      return false;
+    }
+
+    // Also override ToString to get a nice string representation.
+    public override string ToString()
+    {
+      return string.Format("BankAccount( customer: {0}, account: {1} )",
+        m_customerId, m_accountId);
+    }
+
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/UserObjects/Program.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/UserObjects/Program.cs b/examples/clicache/UserObjects/Program.cs
new file mode 100644
index 0000000..3dd9111
--- /dev/null
+++ b/examples/clicache/UserObjects/Program.cs
@@ -0,0 +1,73 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+using System;
+
+namespace GemStone.GemFire.Cache.Examples
+{
+  class UserObjects
+  {
+    static void Main()
+    {
+      // Register the user-defined serializable type.
+      Serializable.RegisterType(AccountHistory.CreateInstance);
+      Serializable.RegisterType(BankAccount.CreateInstance);
+
+      // Create a GemFire Cache Programmatically.
+      CacheFactory cacheFactory = CacheFactory.CreateCacheFactory(null);
+      Cache cache = cacheFactory.SetSubscriptionEnabled(true).Create();
+
+      Console.WriteLine("Created the GemFire Cache");
+
+      RegionFactory regionFactory = cache.CreateRegionFactory(RegionShortcut.LOCAL);
+      Console.WriteLine("Created Region Factory");
+
+      // Create the example Region programmatically.
+      Region region = regionFactory
+        .Create("BankAccounts");
+
+      Console.WriteLine("Created the Region Programmatically.");
+
+      // Place some instances of BankAccount cache region.
+      BankAccount baKey = new BankAccount(2309, 123091);
+      AccountHistory ahVal = new AccountHistory();
+      ahVal.AddLog("Created account");
+      region.Put(baKey, ahVal);
+      Console.WriteLine("Put an AccountHistory in cache keyed with BankAccount.");
+
+      // Display the BankAccount information.
+      Console.WriteLine(baKey.ToString());
+
+      // Call custom behavior on instance of AccountHistory.
+      ahVal.ShowAccountHistory();
+
+      // Get a value out of the region.
+      AccountHistory history = region.Get(baKey) as AccountHistory;
+      if (history != null)
+      {
+        Console.WriteLine("Found AccountHistory in the cache.");
+        history.ShowAccountHistory();
+        history.AddLog("debit $1,000,000.");
+        region.Put(baKey, history);
+        Console.WriteLine("Updated AccountHistory in the cache.");
+      }
+
+      // Look up the history again.
+      history = region.Get(baKey) as AccountHistory;
+      if (history != null)
+      {
+        Console.WriteLine("Found AccountHistory in the cache.");
+        history.ShowAccountHistory();
+      }
+
+      // Close the cache.
+      cache.Close();
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/2d4a7ecd/examples/clicache/UserObjects/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/examples/clicache/UserObjects/Properties/AssemblyInfo.cs b/examples/clicache/UserObjects/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..52d496b
--- /dev/null
+++ b/examples/clicache/UserObjects/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+\ufeffusing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GemFireUserObjects")]
+[assembly: AssemblyDescription("GemFire Simple Bank Example")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("GemStone Systems Inc.")]
+[assembly: AssemblyProduct("GemFireUserObjects")]
+[assembly: AssemblyCopyright("Copyright � GemStone Systems Inc. 2008")]
+[assembly: AssemblyTrademark("All Rights Reserved")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("446a6d15-e898-4fd5-8493-2076da55bd84")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("9.0.0.0")]
+[assembly: AssemblyFileVersion("9.0.0.0")]