Config for SCA binding extension
kcbabo Feb 11, 2013 4:36 PMI'm looking to implement binding.sca this release and also replace our use of binding.remote with extensions to binding.sca. In a nutshell, binding.sca allows communication between services and references within a domain. The content model for binding.sca is empty, so there's no additional configuration specific to this binding type. I want to add extensions to allow the following to be configured:
- Target name : this would be used by references that wish to wire to services in other applications within a domain. Target is a QName which identifies the namespace and local name of the target service, which means that the reference qualified name (local and/or namespace) can be be different from the service's qualified name.
- Clustering enabled : indicate whether the endpoint should be used within a SY cluster. For services, this indicates the endpoint should be published in the cluster's distributed service registry. For references, this indicates that destination endpoints should be resolved from the clustered service registry.
- Load balancing : specifies the load balancing behavior for clustered service invocations. This only applies to references and can either be a standard load balance policy (e.g. "round-robin", "random-robin", etc.) or a custom, user-supplied implementation.
With that configuration in mind, here's a snip of a possible XML representation. I put namespace prefixes in there to distinguish between the standard SCA definition (sca:) and our extensions (sy:).
Reference binding with wiring and no clustering:
<sca:binding.sca> <sy:endpoint target="ns:foo"/> </sca:binding.sca>
Service binding with clustering:
<sca:binding.sca> <sy:endpoint> <sy:cluster/> </sy:endpoint> </sca:binding.sca>
Reference binding with wiring, clustering, and custom load balance strategy
<sca:binding.sca> <sy:endpoint target="ns:foo"> <sy:cluster> <sy:loadBalance strategy="custom" class="org.example.MyStrategy"/> </sy:cluster> </sy:endpoint> </sca:binding.sca>
Feedback is most welcome!
thanks,
keith