Service Associations

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

Summary: Associations provide the capability to specify directed service associations and enforce them in runtime.

Overview

Associations provide the capability to specify directed service associations and enforce them in runtime. Associations define a usage model for services in and across architectures/deployments. Associations are created during the design/modeling phase and enforced during runtime. Associations can be either:

  • Uses – a weak association relationship where if A uses B exists then, then B may be present for A.
  • Requires – a stronger association relationship where if A requires B exists then B must be present for A.
  • Colocated – an association which requires that A be colocated with B in the same JVM. If B does not exist, or cannot be located, A shall not be created without B.
  • Opposed – an association which requires that A exist in a different JVM then B.
New in GigaSpace 5.2
The Requires and the Colocated associations are available in GigaSpaces version 5.2 and onwards.

As Associations are discovered, a service is notified allowing an associated service to be used. If the Association type is Requires and the service
has not been advertised, the service will be advertised. If an associated service connection is broken (as determined by the associated service's Fault Detection Handler) and the Association type is Requires, the service will be unadvertised.

Association declaration is straightforward:

  • An association to a service within the same deployment descriptor. Once discovered, the service will be injected using the setSpace method.
<Association Type="uses" Name="The Space" Property="space"/>
  • An association to a service in an included deployment descriptor, pointed to by the refid. Once discovered, the service will be injected using the setSpace method.
<Association refid="dd.ref" Type="uses"  Name="The Space" Property="theSpace"/>
  • An association to any discovered service which implements the ClassName. Once discovered, the service will be injected using the setSpace method.
<Association Type="uses" Name="The Space" Property="space" ClassName="net.jini.space.JavaSpace" MatchOnName="no"/>
For more details on how the Service Grid handles associations to services which are GigaSpaces spaces, see Space Services Handling in Service Grid Associations.

RELATED TOPICS

Declaring Elements Globally in Deployment Descriptor
Declaring Service UI in Deployment Descriptor
Deployment Descriptor Codebase Element
Deployment Descriptor DeploymentSchedule Element
Deployment Descriptor Parameters and Configuration Elements
Deployment Descriptor SharedComponent Element
Deployment Descriptor SLA Element
deploy - Service Grid CLI
Fixed and Dynamic ServiceBean ProvisionType
Injecting Deployment Descriptor Properties into POJOs
POJO Lifecycle in Service Grid
Proactive Cache
redeploy - Service Grid CLI
Rio OperationalString
Service Associations
Service Deployment Descriptor
Service Grid ClassLoader Hierarchy
undeploy - Service Grid CLI
Using Service Grid to Deploy Partitioned Space
Using Service Grid to Deploy Partitioned Space with Backup
Using Service Grid to Deploy Replicated Space
Using Service Grid to Deploy Space
Using Service Grid to Deploy Spring Applications
Using System Properties for Deployment Descriptor Element Values

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 techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels