- Unzip the distribution into a working directory; GS_HOME
- Set the JAVA_HOME environment variable to point to the JDK root directory
- Start your favorite Java IDE
- Create a new project
- Include all jar files from the GS_HOME/lib/required in the classpath
XAP is Maven-friendly - it is built using maven and designed to be easily used by developers constructing XAP applications.
The main dependency required to use XAP is
<dependency> <groupId>org.gigaspaces</groupId> <artifactId>xap-openspaces</artifactId> <version>12.0.1</version> </dependency>
Since XAP artifacts are currently not published in Maven Central Repo, you’ll also need to configure a repository:
<repository> <id>org.openspaces</id> <url>http://maven-repository.openspaces.org</url> </repository>
There are two examples provided with the Open Source distribution. You can find them under the
<XAP root>/examples directory. The examples are also available on github(see links below).
The Hello World example demonstrates how to perform basic Space operations - e.g. writing and reading an Object from the data-grid. This example also covers different deployment modes: embedded, remote and partitioned.
This example builds on the previous example, introducing the concepts of event-processing using a Processing Unit. This example also demonstrates how to run with the IDE.