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.
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.
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.
Add Comment