Using beans to connect to your data grid?
The getting started with Spring sample is provided for a quick introduction to the Spring framework integration. The sample consists of shell and batch scripts that are designed to start a simple grid with very little customization needed. You can create a spring applications and connect to your DataPower XC10 Appliance to cache your bean in the grid.
This sample demonstrates the following concepts:
How to use Spring beans to demarcate eXtreme Scale transactions.
How to create eXtreme Scale plug-ins using Spring beans and wire them together.
To install the sample follow these steps:
Download the WXSSpringCache.zip file from the following downloads section.
Extract the WXSSpringCache.zip file to the <ObjectGrid>/samples directory.
The <ObjectGrid> directory is the directory where the eXtreme Scale trial was extracted, or the ObjectGrid directory within a WebSphere eXtreme Scale product installation.
Running the sample
The WXSSpringCache.zip file contains the SpringCache binary class files and the source files. The sample can be run with the supplied scripts for Windows and UNIX operating systems, or can also be run in Eclipse. For details on running the sample, see the README.txt file in the extracted SpringCache directory. For details on running the sample in Eclipse, see the ECLIPSE_README.txt file also located in the extracted SpringCache directory.
Running the sample as a client for XC10
1. Create a Simple Data Grid and Map on the XC10 console
Sign into the console
Click Data Grid->Simple Data Grid
Click the plus sign for a new Grid.
Give the Grid a Name.
2. Edit your env.bat or env.sh
Change the CATALOGSERVER_HOST and CATALOGSERVER_PORT to point to your XC10 machine.
Change the CATALOG_SERVICE_ENDPOINTS to point to your XC10 machine.
3. Edit your springcontext.xml in the SpringCache/bin directory to point to the endpoints, grid and maps you created on the XC10.
3. Download the prerequisite libraries for the sample. Create a directory called 'lib" under
the <installRoot>/ObjectGrid/samples/SpringCache directory and copy the following
libraries to it:
a. Spring 3.1.1: http://www.springsource.org/about
org.springframework.aop-3.1.1.RELEASE.jar, org.springframework.asm-3.1.1.RELEASE.jar, org.springframework.beans-3.1.1.RELEASE.jar,
org.springframework.context-3.1.1.RELEASE.jar, org.springframework.core-3.1.1.RELEASE.jar, org.springframework.expression-3.1.1.RELEASE.jar
b. Commons-logging: http://commons.apache.org/logging
c. AOP Alliance: http://aopalliance.sourceforge.net/
4. Open a terminal or command-line window:
Windows: set JAVA_HOME=<java home>
UNIX: export JAVA_HOME=<java home>
5. CD <installRoot>/ObjectGrid/samples/SpringCache
6. Run the test client:
The test client shows several operations on the grid including a get, update, and query by
For information on loading and running this client in Eclipse,
refer to the provided ECLIPSE_README.txt file. You can use the Eclipse environment
to update and compile the sample and run the sample programmatically.
This sample also includes commands and source code that can be used to create catalog and container servers separately from the XC10.
Post any feedback on this sample as a comment on this page.