Channels ▼
RSS

Database

Service-Component Architectures

Source Code Accompanies This Article. Download It Now.


Binding

The SCA Model supports communication between Services via Bindings, which exist for a number of technologies. To comply with the specification, all implementations must support an SCA Service Binding and Web Service Binding. Bindings are used by Services and References. Services use Bindings to define how they can be called; References use them to declare how they intend to call a Service. Example 3(b) is a Binding using web services.

Quality of Service: The Policy Framework

To address Quality-of-Service (QoS) and nonfunctional requirements, the SCA Model provides a Policy Framework. Policies can be used to define security, availability, and transactionality, among other requirements. Policies can be associated with each Component. Services and References can have multiple policies to allow alternate means of access. The main elements of the Policy Framework are Intents, Profiles, and Policy Sets.

Intents are abstract statements of QoS constraints on a Component implementation. For example, messaging may need to be confidential. An Intent with name "confidentiality" can therefore be defined as in Example 4(a).

(a)
<intent name="confidentiality" constrains="sca:binding">
<description>
Communication through this binding must prevent
unauthorized users from reading the messages.
</description>
</intent>

(b)
<sca:profile intents="sec.confidentiality rel.reliability"/>

Example 4: (a) Intent declaration; (b) Profile declaration.

Profiles are aggregations of Intent names. Intents referenced in a Profile are mapped to implementations in Policy Sets. Example 4(b) is a Profile declaration.

Policy Sets correspond to the implementation of Intents. They declare technology-specific constraints on elements in the Assembly Model. Example 5 is a Policy Set corresponding to the Confidentiality Intent. This example uses the intentMap element, which indicates alternative implementations for a given Intent.

<policySet name="SecureMessagingPolicies"
provides="confidentiality"
appliesTo="binding.ws"
xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<intentMap provides="confidentiality"
default="transport">
<qualifier name="transport">
<wsp:PolicyAttachment>
   <wsp:AppliesTo>
    <wsa:EndpointReference xmlns:myStore="..." >
 <wsa:Address>http://myStore.example.com/acct
</wsa:Address>
 <wsa:PortType>
myStore:myPortType
</wsa:PortType>
 <wsa:ServiceName>
myStore:InventoryService
</wsa:ServiceName>
    </wsa:EndpointReference>
  </wsp:AppliesTo>
  <wsp:PolicyReference
URI="http://myStore.example.com/policies.xml" />
</wsp:PolicyAttachment>
<wsp:PolicyAttachment>
 ...
</wsp:PolicyAttachment>
</qualifier>
<qualifier name="message">
<wsp:PolicyAttachment>
<!-- policy expression and policy subject for
"message" alternative" -->
 ...
</wsp:PolicyAttachment>
</qualifier>
</intentMap>
</policySet>

Example 5: Policy Set using an intentMap and WS-PolicyAttachment.

Policy Sets contain the specifics of a technology including details for the bindings, sources, and targets. If a Public Key Infrastructure were required, the Policy Set may contain information such as encryption methods, trust relationships, and key stores. WS-Policy and WS-PolicyAttachment are the de facto syntax for Policy Set declarations. However, support for other languages (such as XACML or proprietary languages) are possible and depend on the container implementation.

Intents are attached to components through the Component metadata. Example 6 is an example of attaching authentication and reliability intents to a Service declaration.

<sca:service name="mySpecialService">
<sca:interface.wsdl portType="..." />
<sca:profile intents="sec.authentication rel.reliabilty"/> 
</sca:service>

Example 6: Profile attached to Service.

At this writing, Policy Sets and Intents are maintained in a global definitions file that is referenced in assembly descriptor files through the Intent or Profile.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video