example is a C# program that uses Microsoft .NET Framework 2.0 to access the
GemFire C++ API for continuous query.
Microsoft .NET Framework 2.0 must be installed before running this example. For information about installing the .NET Framework, see the GemFire Enterprise Native Client Guide.
The client application comes with a cache configuration file,
clientCqQuery.xml, which is configured to
create a root region and establish the native client endpoints to the
locally-run server by specifying
localhost:50505. If java server is
located on another host, change localhost to that
cache listens for client requests at a specific port (see
serverCqQuery.xml). The client connects
to the cache server's port.
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:
examples/EnvSetup.html. Refer to the developer's guide if you need help with this step.
GF_JAVA_HOMEenvironment variables to your installed Java JRE or JDK. See the Installation chapter of the GemFire Enterprise System Administrator's Guide for the versions of Java that are compatible with GemFire Enterprise. The
JAVA_HOMEsetting is for your applications, and
GF_JAVA_HOMEis for the GemFire scripts. You must have a compatible Java JRE or JDK installed and you must set
GF_JAVA_HOMEto point to it.
$JAVA_HOME/binto the start of your
The following is a list of the environment configuration commands for the
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.
Bourne and Korn shells (sh, ksh, bash)
%CLASSPATH=$CLASSPATH:$GEMFIRE/quickstart/classes; export CLASSPATH
%JAVA_HOME=<Installed JRE PATH>; export JAVA_HOME
%GF_JAVA_HOME=$JAVA_HOME; export GF_JAVA_HOME
%PATH=$JAVA_HOME/bin:$PATH; export PATH
>set JAVA_HOME=<Installed JRE PATH>
To run the
example, create a session from the GemFire Enterprise product directory and
complete the following steps. Throughout this example, when you're prompted to
enter the native client directory, replace the
NativeClient_xxxx with the actual
four-digit product version number. Note that in the following steps, except CqQuery.exe,
all other programs can be run on other operating system machines.
This first session starts the Java cache server.
In another window,
number>, where itr number is the number of
iterations you want this program to run, e.g, 500.
In the window where java server was started:
Copyright © 2005-2009 by GemStone Systems, Inc. All rights reserved. GemStone®, GemFire®, and the GemStone logo are trademarks or registered trademarks of GemStone Systems, Inc. All other trade names or trademarks are the property of their respective owners. Information in this document is subject to change without notice.