Welcome!

Java Authors: Liz McMillan, Walter H. Pinson, III, Maureen O'Gara, Yakov Werde, Tony Bishop

Related Topics: SOA & WOA

SOA & WOA: Article

Service Versioning For SOA

Policy-based version control for SOA services

Talking about EJB and JNDI, we have to distinguish between service and application types of the versioning models. For applications, version control can be done at the build and deployment stages via, say, Manifest files specified in the application archives (Graham Hamilton of Sun Microsystems offered more information about versioning and dependency mappings for Java applications at the last JavaOne conference). For services, we have no more choices than we discussed before - controls on every invocation or controls at the lookup of the EJB reference (Home interface). Since the former may be ineffective, we'll concentrate on the latter.

The deployment descriptor of an EJB or an RMI service defines a JNDI name that the component reference is bound to. Looking at the name structure, one can easily find that a JNDI name represents a hierarchy of names. This means that a lookup operation performed, for example, by a Service Locator module (see Service Locator pattern) can explicitly navigate along the name-tree instead of making a single call on the composite JNDI name. So the JNDI name may have an immutable version part and a changeable version part. The Home interface or service reference binds to the changeable version part, which is a child of the immutable service part in the naming hierarchy. The example in Figure 2 demonstrates the version name hierarchy for the following versions:


Thus, doing a lookup operation, the client's Service Locator represents the immutable service part of the JNDI name to the PEC. The latter navigates to all the children of the immutable service part - the names in the changeable version part - combines possible version expressions, and challenges them against the VCP. The service reference bound to the first found 'matching' combination of version names is returned. The client's code can cache the reference and reuse it in consecutive RMI service invocations or for narrowing the Home interface reference to the EJB Object interface references.

If a service provider discards an RMI service, the service invocation returns an exception. It's recommended to make at least one attempt at obtaining another RMI reference under the previous VCP before reporting an error (because the service may be redeployed). If the EJB is redeployed under the same JNDI name, narrowing always returns the current reference to the Object interface transparently to the client. If the service invocation fails under the same VCP, it may mean that the previous version isn't supported anymore. So the client has to do a business review of the new version of the service and, if possible, adjust its VCP.

Conclusion
This article promotes the idea of a SOA client viewing a SOA service as a monolithic entity with an easily interpreted compound version. A compound version can hide multiple versions of service components and separate versions of elements of the Web Services representing the service interface. The proposed version model and an approach to the version control based on the client's version policy open a way for flexible version management even for changes in the SOA services that aren't backward compatible. Compound version specification is illustrated for a UDDI and a directory structure. The example shows two ways of applying the policy enforcement mechanism and promoting policy control at the service registry for service lookup operations.

References

More Stories By Michael Poulin

Michael Poulin works as an enterprise-level solution architect in the financial industry in the UK. He is a Sun Certified Architect for Java Technology, certified TOGAF Practitioner, and Licensed ZapThink SOA Architect. Michael specializes in distributed computing, SOA, and application security.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
SOA Web Services Journal News 07/26/06 04:37:47 PM EDT

(Found in a blog, 'Versioning is as inevitable as security.') SOA development practice isn't much different from other software development practices except for design and maintenance. Multiple self-containing and aggregated services that interact with others have their own lifecycle and evolution. The loosely coupling model of SOA services significantly simplifies design but creates additional difficulties in maintenance, especially in the interoperability of different service versions.