JBoss Data Grid (JDG) is an open source data grid platform that offers multiple clustered modes, but its true value is observed while running in distributed mode where caches cluster together and expose a large memory heap.
JBoss Data Grid offers two usage modes:
- Library mode - This mode provides all the binaries required to build and deploy a custom runtime environment. The library usage mode allows local access to a single node in a distributed cluster. This usage mode gives the application access to data grid functionality within a virtual machine in the container being used. Supported containers include JBoss AS 7, JBoss Enterprise Application Platform 6 and Tomcat 7.
- Client-server mode - This mode provides a managed, distributed and clusterable data grid server. Applications can remotely access the data grid server using Hot Rod, memcached or REST client APIs., the Cache is stored in a managed, distributed and clusterable data grid server. Applications can remotely access the data grid server using Hot Rod, memcached or REST client APIs. This web application bundles only the HotRod client and communicates with a remote JBoss Data Grid (JDG) server. The JDG server is configured via the
standalone.xml
configuration file.
The quickstarts included in this distribution were written to demonstrate JBoss Data Grid functionality and features. They provide small, specific, working examples that can be used as a reference for your own project.
The following is a list of the currently available quickstarts. The table lists each quickstart name, the technologies it demonstrates, gives a brief description of the quickstart, and the level of experience required to set it up. For more detailed information about a quickstart, click on the quickstart name. This distribution contains the following quickstarts:
Quickstart Name | Demonstrated Technologies | Description |
---|---|---|
carmart | Infinispan, CDI | Shows how to use Infinispan instead of a relational database. |
carmart-tx | Infinispan, CDI, Transactions | Shows how to use Infinispan instead of a relational database with transactions enabled. |
helloworld-jdg | Infinispan, CDI | Shows how to use Infinispan in clustered mode, with expiration enabled. |
hotrod-endpoint | Infinispan, Hot Rod | Demonstrates how to use Infinispan remotely using the Hot Rod protocol. |
memcached-endpoint | Infinispan, Memcached | Demonstrates how to use Infinispan remotely using the Memcached protocol. |
rapid-stock-market | Infinispan, Hot Rod, REST | Demonstrates the use of compatibility mode to access data from multiple protocols. |
spring | Infinispan, Spring | Demonstrates the use of Spring integration modules. |
remote-query | Infinispan, Hot Rod, Remote Query | Demonstrates how to query Infinispan remotely using the Hot Rod protocol. |
rest-endpoint | Infinispan, REST | Demonstrates how to use Infinispan remotely using the REST protocol. |
secure-embedded-cache | Infinispan, CDI, REST | Demonstrates how to secure Infinispan in embedded mode. |
secure-embedded-cache | Infinispan, CDI | Demonstrates how to use Infinispan CDI and JCache extension. |
[TOC-quickstart]
We suggest you approach the quickstarts as follows:
- Regardless of your level of expertise, we suggest you start with the helloworld quickstart. It is the simplest example and is an easy way to prove your server is configured and started correctly.
- If you are a beginner or new to JBoss, start with the quickstarts labeled Beginner, then try those marked as Intermediate. When you are comfortable with those, move on to the Advanced quickstarts.
- Some quickstarts are based upon other quickstarts but have expanded capabilities and functionality. If a prerequisite quickstart is listed, be sure to deploy and test it before looking at the expanded version.
To run these quickstarts with the provided build scripts, you need the following:
-
Java 1.6, to run JBoss Data Grid, JBoss EAP and Maven. You can choose from the following:
- OpenJDK
- Oracle Java SE
- Oracle JRockit
-
Maven 3.0.0 or newer, to build and deploy the examples
-
If you have not yet installed Maven, see the Maven Getting Started Guide for details.
-
If you have installed Maven, you can check the version by typing the following in a command prompt:
mvn --version
-
-
The JBoss Data Grid server distribution ZIP.
- For information on how to install and run JBoss Data Grid, refer to the product documentation located on the Customer Portal here: https://access.redhat.com/site/documentation/en-US/JBoss_Data_Grid/.
-
The JBoss EAP distribution ZIP.
- For information on how to install and run JBoss, refer to the product documentation located on the Customer Portal here: https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/.
-
You can also use JBoss Developer Studio or Eclipse to run the quickstarts.
The root folder of each individual quickstart contains a README file with specific details on how to build and run the example. In most cases you do the following:
Quickstarts demonstrating the remote protocols will also need a running JBoss Data Grid Server.
See the README file in each individual quickstart folder for specific details and information on how to run and access the example.
Note: If you do not configure the Maven settings as described here, Configure Maven, you must pass the configuration setting on every Maven command as follows: -s QUICKSTART_HOME/settings.xml
In most cases, you can use the following steps to build the application to test for compile errors or to view the contents of the archive. See the specific quickstart README file for complete details.
- Open a command prompt and navigate to the root directory of the quickstart you want to build.
- Use this command if you only want to build the archive, but not deploy it:
-
If you have configured the Maven settings :
mvn clean install
-
If you have NOT configured settings Maven settings:
mvn clean install -s QUICKSTART_HOME/settings.xml
-