GS == "XAP9NET" || GS == "XAP9" || GS == "XAP9NET")


  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation


Section Summary: How to access the GigaSpaces Data Grid, Messaging Grid and Compute Grid using the Spring Framework, and deploy Spring applications and POJOs using the Service Grid.

Deprecated in GigaSpaces 6.0

  • GigaSpaces Spring framework integration is supported in version 5.1 and onwards.
  • If you are using version 6.0 and onwards, it is recommended to use Open Spaces with GigaSpaces instead of Spring.

Overview – Simplifying Business Logic Abstraction

The GigaSpaces Spring integration plays a major part in GigaSpaces Write Once Scale Anywhere roadmap. It allows you to write your POJO once using Spring and scale it anywhere using GigaSpaces middleware. Spring provides a framework for implementing the application business logic, while GigaSpaces implements the middleware and service framework for executing this business logic efficiently, in a scalable fashion.

GigaSpaces Spring Architecture

Expand this...

Middleware Abstraction

GigaSpaces maps specific Spring interfaces to the relevant GigaSpaces middleware component – the Data Grid, the Messaging Grid and the Parallel Processing engine (Compute Grid). This allows Spring-based applications to benefit from the performance, dynamic scalability and clustering capabilities of the GigaSpaces middleware without a complex development phase.

The middleware abstraction transparently converts POJOs to space Entries, and provides a transaction abstraction layer:

Expand this...

Data Grid Abstraction

There are two ways to access the Data Grid via Spring: the JavaSpaces and GigaSpaces templates, which map existing objects to the space and allow JavaSpaces operations to use the Spring abstraction behavior; and the JDBC template which allows users to write code using standard SQL syntax.

JavaSpaces and GigaSpaces Templates

Expand this...

JDBC Template

Expand this...

Messaging Abstraction

GigaSpaces Spring integration provides messaging abstraction in two forms: a JMS template, which allows GigaSpaces to behave just like a standard JMS provider, and a remoting interface, which can be used to invoke a variety of pluggable transport implementations, including the powerful space-based remoting implementation.

JMS template

Expand this...


Expand this...

Parallel Processing Abstraction

A special use for the remoting interface mentioned above is for parallel processing, in a similar way to the master-worker pattern used with the space.

In this case, each method call is a task, and each return value is a return on the task. Tasks can be executed by multiple service instances: each can be running on a different machine, leveraging its CPU power to increase processing capacity for serving that service. The end-user or client believe they are interacting with a single service.

Execution balancing is achieved through the space pull model: services block for requests, and if a worker is under load it simply pulls less requests; if it is underloaded, or is running on a more powerful machine, it simply pulls more requests.

Service Abstraction – Turning POJOs Into Distributed Services

Using the Service Grid, you can select a bean from a Spring bean descriptor file and deploy it onto the grid, scaling it dynamically by adding more instances of that service. You can also manage failover scenarios – for example, if one instance fails, the Service Grid automatically detects this and re-deploys it on another Container running at a different machine. It also automates the deployment procedure, selecting a machine that has the necessary Spring support out of the pool of available machines. If such a machine is not available, the Service Grid postpones deployment and re-deploys the service it as soon as one becomes available (for more details, see Developing and Deploying POJOs into Service Grid).

Section Contents

  • About Spring FrameworkAn overview, architecture and basic usage scenarios of the Spring Framework (from Spring Reference Documentation).
  • Spring Configuration FilesA sample application context file; attributes of the POJO's DAO definition; transaction configuration; supported operations and code sample for POJO primary key setting.
  • Spring Data Grid IntegrationExamples of the JavaSpaces Spring Template and JDBC Spring Template, two ways to access the Data Grid via Spring.
  • Spring Infrastructure ServicesGigaSpaces automatically converts POJOs to space Entries, and provides Spring support for local and distributed transactions.
  • Spring Integration ImplementationDescription of GigaSpaces Spring implementation classes: the factory bean; the Spring template; an extension of the JavaSpacesTemplate; and a local transaction factory bean.
  • Spring Messaging Grid IntegrationAn example of a JMS application working with Spring in GigaSpaces.
  • Spring Parallel Processing IntegrationSample implementation showing how to perform remote invocation for business logic of parallel processing units.

Wiki Content Tree

Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at Please provide a link to the wiki page you are referring to.