Script:
Owner:
Subdir:
Blog ID: 75809171
Group ID: User ID:
Sphere Journal Online — October 2011
Sep 14, 2011 7:26 AM CDT


IN THIS ISSUE...

BPM in a Governed SOA Environment

...OSGi Makes it Easy to Find the Answers

Migrating Publish/Subscribe to WMB V7


QUICK LINKS...

Global WebSphere
Community

Last Month's Journal

GWC Newsletter


FROM THE PUBLISHER'S DESK...

Dear WebSpherian,

After a brief, 3-month hiatus, The Sphere Journal Online is back! Read The Sphere Journal Online each month for opinion, news, and technical information on how to use WebSphere products more effectively and get insight to help you make more informed decisions about WebSphere products you should be deploying in your organization.

Here’s what you can look forward to in this issue:

In November we will highlight WebSphere Application Server (WAS) V8.5 Alpha, released just this week! Send me any questions you have about WAS 8.5 features and benefits and we’ll include answers to those questions in next month’s issue.

All this content is powered by the Global WebSphere Community (GWC). Most readers of The Sphere Journal Online are members of the GWC. Membership is free and you can join this community at www.WebSphereUserGroup.org. You can access all content from The Sphere Journal Online as well as thousands of blogs, articles, podcasts, and presentations that will help you do your job better using WebSphere technology.

Best Regards,

Julia Weisman, Editor and Publisher
The Sphere Journal Online

BPM in a Governed SOA Environment

By Claus T. Jensen

The Need for Agile Transformation

In an age of agile change, IT boundaries are becoming obstacles to business success. There was a time where isolation and encapsulation of functionality was required to manage IT complexity. In today’s world it is rather the complexity of business change and the need for business agility that requires IT focus. Interestingly, Cloud will drive this transformation at a faster pace due to the ability to rapidly source business and IT resources, thereby eliminating a significant part of the advantage of having a large legacy portfolio.

Consequently IT must evolve. Boundaries must be dulled. BPM capabilities (process design, execution, etc) must align with SOA, and the lifecycle of processes and services must be effectively coordinated. The alignment of BPM and SOA governance processes provide enterprises with a more streamlined ability to identify and support opportunities for change, to redesign business processes and to compose those processes based on well defined enterprise services. All of which results in lower time to market, reduced time to value and improved return on investment.

Common Stumbling Blocks in BPM Based on SOA

While BPM and SOA are inevitably linked through the notion of processes orchestrating and executing services, there are some common stumbling blocks that any enterprise should be aware of. In an immature BPM and SOA environment, one or more of the symptoms in the list below are commonly seen:

  • Processes drive creation of services … but now we have 10 different services doing roughly the same thing
  • I want to see if there is an existing service that I can reuse … but I don’t know where to look
  • We have created a new version of the process … but we are not quite sure which version of a key service to use
  • We need a new service (to be used by 3 different processes) … but we can’t figure out who should pay for it, so it is not being built
  • We want to invest in a good catalog of reusable services … but we don’t know where to begin
  • We don’t want to build software services until we need them … but we can’t wait for services to be “negotiated” once we have a process that needs them
  • I keep getting change requests to my reusable service … so I don’t want anyone else to use it anymore

Some of these symptoms occur due to lack of asset management, others are due to lack of ownership and yet others occur due to lack of an appropriate funding model. Yet across all of them, a common root cause is lack of up front architectural consideration and ultimately lack of good (enough) SOA Governance.

Creating Synergy Between BPM and SOA Governance

In the industry there is a lot of talk about SOA Governance but little on how SOA Governance matters to BPM. Some might say that a choice between a service centric viewpoint or a process centric viewpoint must be made.

(Click to enlarge image)

While the BPM and SOA viewpoints are different, the two are not really in conflict. On the contrary, processes and services are both key elements of a combined BPM and SOA environment, each having an independently managed lifecycle in its own right. Yet while independent, these two lifecycles also have important coordination points – after all, it will not do to have a process deployed to production if the services upon which it depends are not also production ready.

(Click to enlarge image)

At the Storyboard stage of a process, focus is on identifying new services or finding existing ones that map to business activities. Even at this early stage, expectations must be managed in terms of service capabilities that can be brought to bear.

At the Experience stage of a process, stakeholder ‘Playbacks’ of the process will seed the service specification lifecycle phase with business requirements.

At the Manage stage of a process, as business processes are tailored to the desired end-user experience and process performance is optimized, supporting services will begin the realization phase of their lifecycle. Especially important is that as processes mature, the requirements on scalability and flexibility of the underlying services will increase.

At the Integrate stage of a process, integration will involve testing and certification against functional and non-functional requirements that are captured in the service SLAs.

Finally at the Deploy stage of a process, a “snapshot” or version of the Process Application is deployed into production; at the same time the services consumed by that snapshot must become operational in the deployment environment.

Obviously without predefined governance processes to coordinate the lifecycle touch points, the above sync points will not be managed, nor will there be any guarantee that the resulting process performs as expected in the operational environment.

Conclusion

While much focus in the industry has been on SOA governance, there has been less attention on the interaction between BPM and governed services. Nevertheless, at the heart of continuous business optimization is the proper orchestration of well defined enterprise services. In particular, ungoverned change cannot be allowed to deteriorate process effectiveness, or even break process execution.

For many enterprises the typical approach to process and service coordination is to drive service identification and delivery based on the particular BPM solution currently in scope. While certainly viable for short term value and success, such an approach does not scale over time. A more flexible and scalable approach is to leverage the power of BPM and SOA governance together. By coordinating process and services lifecycles, without letting one take control of the other, enterprises can take control of their processes yet at the same time base those processes on a scalable and governed portfolio of enterprise services.

Resources:

 

Claus Jensen is a Senior Technical Staff Member on the Business Process Optimization (BPO) Foundation team and Chief Architect for SOA-BPM-EA technical strategy, driving their alignment and integration both conceptually and practically. The BPO Foundation team has architectural responsibility for all of IBM's software products to ensure that they support the key principles of SOA, Business Process Management (BPM) and Business Agility from a client perspective.


Do You Know What Libraries You’re Using? OSGi Makes it Easy to Find the Answers

By Graham Charters

Some shortcomings of Java and Java EE

The rapid growth in open source projects means that more and more enterprise applications make use of third-party libraries, provided as one or more JAR files providing some runtime capability – libraries for MVC, persistence, dependency injection, logging, testing, Web services, the list goes on.  As organizations seek to improve operational effectiveness and agility, inefficiencies in collaboration around — and re-use of — the assets they develop gain greater focus.

Many organizations use Java EE for deployment of their enterprise applications.  The Java EE approach to deployment requires an assembler to package all the modules (JAR files) used by the application into an EAR or WAR file.  This means that the development, test and operations teams have a single artifact to ship around, but there are still drawbacks.  The deployment artifact is essentially opaque.  Any analysis is an exercise in archaeology; it involves looking inside the deployment artifact to see what JARs it contains, then trying to understand which JARs correspond to which libraries.

What follows are some of the questions that commonly arise when working with Java EE applications.  We then describe a progression of OSGi adoption that addresses the issues outlined.

What libraries does my application package and use?

Many companies deploying enterprise applications have rules governing the use of third-party libraries.  These rules can cover areas such as:

  • pedigree - is the code truly owned by the project?
  • quality - is the code of a suitable quality?
  • license - is the code provided under a license that permits it to be used in the way the organization wants to use it?
  • openness – is the code from a project that is open to requirements and contributions to enable an organization to contribute to it, should the need arise?

For any reasonably-sized Java EE IT operation, it can be very difficult to keep on top of all the dependencies they consume.  The opaque nature of the deployment artifacts (EAR and WAR) means organizations don’t necessarily have a good grasp of what they are deploying.  Not having a good understanding of what is being deployed can lead to mistakes and inefficiencies in governing third-party libraries.  Some may be covered multiple times, or worse still, they may be missed completely, resulting in deploying something of dubious heritage or inappropriate license which can have serious business implications.

Which applications are deploying this library?

It is common for multiple applications within an organization to be developed using the same libraries and frameworks: Teams work on multiple applications or share knowledge and skills to achieve improved efficiency and serviceability.  However, because Java EE requires libraries to be packaged inside the deployment artifact, each application contains duplicates.   This results in duplication of disk space, but it also potentially results in duplication of effort if those libraries have to go through some review processes to ensure they’re appropriate for the organization to use.  Worse still, if an organization needs to apply a critical fix to a library, then they need to find each copy and repackage/redeploy each application.  As we have already seen, this is difficult because of the opaque nature of the deployment artifact and the fact that mapping JAR names to libraries and versions (i.e. a specific snapshot or release) may not be obvious.

Why is my application using an old version of this library when I packaged a newer one with it?

Java EE defines class loading to follow a parent delegation model.  What this means is that rather than load classes from the module you deployed, the runtime first delegates to the parent class loaders to see if they have the classes available and only if classes are not available does it load them from the deployed module.

Referring back to the “rapid growth in open source”, many Java EE runtimes also use the same open source projects in their implementation and so it is not uncommon for applications to pick up classes from the runtime that they expected to get from their module.  If the runtime uses a different version of the library from the one packaged in the application, then this can lead to problems that are difficult to track down.  One explanation may be that an application that worked for a long time breaks simply because a service upgrade to the runtime updated the runtime’s copy of a library to a newer version.

What version of this library is my application using?

The previous questions have alluded to library “versions”, but versions are not a native Java concept.  It is therefore often difficult to determine what version of a library an application is using.  One library may use a naming convention to describe its version, whereas another uses a file in the JAR.  The JAR files themselves are just packaging artifacts and therefore cannot be relied upon from one release to the next. In fact, the JAR files can be different for different copies of the same library.  In the “critical fix” scenario we mentioned earlier, it is not sufficient to find all copies of a particular library as the fix may only apply to a specific version of the library.

How WebSphere OSGi applications addresses these shortcomings

What follows are a few pointers regarding how OSGi — and the way its use has been enabled in WebSphere and Rational products — can help address the problems outlined above.  It’s worth noting that this is not a Java EE vs. OSGi discussion; OSGi leverages many Java and Java EE technologies, such as servlets, JSP, JPA, JMX while addressing the issues outlined above.

OSGi gives your artifacts identity

OSGi is the dynamic module system for Java, defined by the OSGi Alliance.  One of the key concepts of OSGi is the Bundle.  An OSGi Bundle is essentially a JAR file plus some module meta-data.  That meta-data is held in the JAR manifest and is described using headers defined by the OSGi Alliance.

Example OSGi Bundle Manifest for a Logging library

Two headers to note here are the Bundle-SymbolicName and Bundle-Version.  Together these identify the bundle, so it should never be the case that two JARs with the same symbolic name and version are different (i.e. contain different code or resources).

The first thing we can immediately see is that with OSGi, we can uniquely identify what’s contained in the JARs that make up the libraries that we use.  We can therefore answer any questions regarding the identity of the modules packaged in the application by looking inside each module’s manifest.

OSGi applications are assembled based on identities

Giving your artifacts identity does not address the problem that Java EE applications are still defined in terms of a zip of packaging artifacts (JARs or WARs within an EAR), rather than the real module identities that they are logically made up of.  What WebSphere’s OSGi application model does is define an application in terms of a set of requirements for modules based on their identity.  Better still, these identity requirements can allow for ranges of versions, thus enabling fixes to be applied to an application without having to create a whole new application definition.  You no longer need to create a new application that is functionally identical to the existing one just to apply a fix.  Below is an example OSGi application definition.  This shows that applications have an identity, defined by the symbolic name and version.  The application contents are also listed and allow a range of versions to be used (signified by the OSGi version range syntax “[x, y]”).

Example OSGi Application Definition

Once your applications are defined in terms of module identities, you can administer them around these identities and have a far better understanding of what you’re using.  The screenshot below shows an example of a deployed OSGi application that lists the identities of the deployed content bundles.

Example OSGi application content bundle identities

We can see from the above screenshot that when using the OSGi application model, it is very easy to determine the libraries and their versions that an application uses in its content.  The screenshot shows how it is also possible to update the versions of the modules being used by using a “pull-down” to select version 1.3.1 of the logging bundle.

Bundle repositories enable a single source

Having an application definition that refers to identities rather than contained artifacts means you can be flexible when choosing where you source the actual artifacts.  You may opt to include them in an application archive (OSGi applications use a zip file with an .eba extension), or, instead you could devolve responsibility for owning the artifacts to some other entity in the deployment process, such as a repository.  By not requiring all application archives to contain the artifacts, you open up the possibility to have a single place from which to source each artifact.  This means that you don’t need to ship around duplicate copies of the same artifact with each application that uses it.

WebSphere’s OSGi application support comes with a built-in internal bundle repository capability and also allows configuration of external repositories, based around the OSGi Bundle Repository (OBR) specification.  When an OSGi application is deployed to WebSphere, these repositories are used to find the corresponding JARs for the module identity requirements listed in the application.

Identification of JARs to deploy for an OSGi application
(Click to enlarge image)

WebSphere keeps track of the applications that use bundles from bundle repositories.  This information is held in its bundle cache.  This gives administrators a place to immediately determine which repository bundles are in use and by which applications.  Now if you need to apply a fix to an application, it is extremely easy to tell which applications need to be updated, and putting the fixed bundle in a repository provides a single place from which to apply that fix.

Administrative view of bundles in use by applications
(Click to enlarge image)
Administrative view showing the applications that use a
specific library bundle
(Click to enlarge image)

Bundle repositories enable governance and collaboration

Earlier, I described the common need for third-party library governance to ensure libraries are appropriate for an organization to use. I also explained how having duplicate copies of these libraries scattered across a number of opaque applications can make it very difficult to ensure these governance rules are adhered to.  I also described how this duplication results in wasted effort because different application teams perform due diligence on the same libraries, or ones which are subtly different when the same one would suffice.

Making bundle repositories available to the application development and operations teams helps address the duplication of effort but also provides a focal point around which governance can be applied and teams can collaborate.  Bundles can be added to a repository and then taken through a life-cycle that indicates whether the bundles are considered experimental, pending approval, approved for production…or basically whatever process suits the way your organization works.  Users of the repository can also collaborate around the bundles.  For example, they could rate the bundles, request enhancements, report problems, ask and answer questions, and so on.

Enabling this form of governance and collaboration increases re-use by enabling the discovery of assets and the conversations that help shape their future.  Increased re-use results in improved quality because fewer components are used by more consumers.  It also reduces duplication of effort because increased awareness and the ability to influence existing libraries means teams are far less likely to create their own.

Rational Asset Manager (RAM) is on a path to provide such a governed, collaborative bundle repository.  RAM 7.5.1 (Milestone 3 at the time of writing) has added OSGi bundles as one of the types of assets it understands.  These bundle assets inherit the governance and collaboration capabilities that RAM provides for all asset types.  RAM also has client integration into Eclipse and Rational Application Developer (RAD), enabling developers to search for bundles stored in RAM and download them, all from within their development environment.  Finally, RAM 7.5.1 has added the ability to generate OBR repository definitions and can therefore be configured into WebSphere as an external bundle repository for application provisioning.

The diagram below shows an example RAM repository populated with a number of OSGi bundles.  You can see that each bundle has a life-cycle state, a version, and can be rated. Package and service assets are also shown.  These are automatically found in the bundles when they are added to the repository and linked to their providing bundle.  This makes it very easy to search for packages and services to use (during development or deployment) and then find a corresponding bundle that provides them.  RAM also provides the ability to comment on assets and create discussion forums (not shown in the diagram).

RAM 7.5.1 populated with OSGi Bundles
(Click to enlarge image)

Summary

In the introduction I identified a number of questions that development and operations teams often need to answer, as well as how Java and Java EE’s development and deployment models make answers to these questions difficult to find.  I have explained how OSGi gives libraries an identity and how WebSphere’s OSGi application support leverages these identities to bring clarity and flexibility to application development and deployment.  Finally, I have shown you how bundle repositories enable governance and collaboration around shared modules, thus improving quality, removing duplication of resources, and improving time-to-value.

So, if you’re deploying Java EE applications, struggling with development and operational inefficiencies, and not able to easily answer questions about the libraries you use, maybe it’s time to take a look at OSGi.

Graham Charters is a Senior Technical Staff Member in the IBM WebSphere Application Server development organization. He is responsible for the OSGi Applications feature of the Application Server and a committer and PMC member of the Apache Aries OSGi programming model project. He is also the IBM technical lead in the OSGi Alliance Enterprise Expert Group.


Migrating Publish/Subscribe to WMB V7

By Vivek Grover

As a Tech support person, I often work with customers who are trying to move to WebSphere Message Broker (WMB) V7 from the older releases of the product. WMB V7 brings a major change in the way publish/subscribe, one of the crucial components of Message Broker, works. The purpose of this article is to establish a conceptual understanding of publish/subscribe and its migration to WebSphere Message Broker V7.

Introduction

A publish/subscribe system enables delivery of a single message to multiple users. A publisher does not know the destination of the information that it sends, similarly, a subscriber does not know the source of the information that it receives. A publish/subscribe application typically has one or more publishers that publish messages to a broker and a group of subscribers that have subscribed to those messages. Messages are published on a certain topic in the broker and delivered to the subscribers that have subscribed to this topic. The publish/subscribe system matches the publications to the subscribers and ensures that all the messages are delivered to all the subscribers in a timely manner.

Traditionally, the interactions between the publishers and subscribers were completely controlled by the message broker. The message broker contained the publish/subscribe engine that received messages from the publishers and subscription requests from the subscribers, stored the information in the broker database, and routed the published data to the target subscribers.

WebSphere Message Broker V7 brings with it some changes and enhancements. WebSphere Message Broker V7 now uses WebSphere MQ V7.0.1 to handle the publish/subscribe requests. The publish/subscribe engine in the queue manager receives messages from the publishers and subscribers and routes the published data to the target subscribers.

Subscribers have the option for content-based subscription, i.e. they may choose to get all the messages from publishers or selected messages based on desired criteria. While the WebSphere MQ V7.0.1 engine now enables filtering of the Message Properties, WebSphere Message Broker V7 still supports the filtering on the entire message, including the body of the message. Figure 1 below shows the coupling between WebSphere MQ and WebSphere Message Broker from the publish/subscribe standpoint.

Figure 1    Coupling between WMQ and WMB from
publish/subscribe standpoint

Since WebSphere MQ is being used as the backbone for message delivery, all the benefits and features of WebSphere MQ are inherited. The integration of publish/subscribe capabilities not only lead to simplification in the workings between WebSphere MQ and WebSphere Message Broker but also ends up simplifying the internal architecture of WebSphere Message Broker, thus reducing the administration overhead for the users.

WebSphere MQ V7.0.1 made significant enhancements to its publish/subscribe engine, covering a majority of the aspects of publish/subscribe messaging. The publish/subscribe engine in WebSphere MQ V7.0.1 handles all the functionalities that were traditionally handled by the publish/subscribe engine in WebSphere Message Broker. Table 1 shows the publish/subscribe functionalities of WebSphere Message Broker V7, which now uses WebSphere MQ V7.0.1 for publish/subscribe messaging, and WebSphere Message Broker V6.x.

Table 1    Publish/Subscribe functionalities

WebSphere Message Broker Version 6.x provided the ability to define topic trees in WebSphere Message Broker Toolkit but did not have the capability to set specific attributes for individual topics in a topic tree. WebSphere MQ Version 7.0.1 supports the concept of topic objects and allows you to set specific, non-default attributes for a topic.

It may be noted that although the internals have changed, it does not affect the external workings of WebSphere Message Broker MQ-based publish/subscribe. This means that if you are already a user of publish/subscribe, you can continue to use your current message flow configurations even after upgrading to WebSphere MQ V7.0.1 and Message Broker V7, without having to make extensive changes to your applications or configuration.

Migration

Since publish/subscribe messaging is now handled by WebSphere MQ, the publish/subscribe migration involves:

A. Migration of subscriptions, subscription points, streams, retained publications
B. Migration of Access Control Lists (ACLs)

This information exists in the broker database in WebSphere Message Broker V6.x. It is migrated to the SYSTEM as temporary objects in the WebSphere MQ queue manager. The supported publish/subscribe migration paths include migration from WebSphere Message Broker V6.0 (FP09 or later) and V6.1 (FP03 or later) to V7. You may refer to WebSphere Message Broker V7.1 Information Center for details. Migration is backward compatible.

Migration of the publish/subscribe configuration should be performed with complete broker migration. You can migrate the publish/subscribe configuration without migrating the whole message broker, but the broker may not be usable unless it is migrated too.

The migration is typically performed in three phases:

Rehearsal phase: This phase creates a migration log, reporting any errors that may be encountered, but does not modify any configurations. It is typically used to observe the potential results of the real migration. It also produces a file (amqmigrateacl.txt) containing the security commands to set up the security environment in the queue manager that is equivalent to the one that existed in the broker.

Initial phase: This phase creates the topic objects in the queue manager based on the Access Control List entries that are defined in the message broker. This phase must be run prior to running the completion phase, and the security command file must be reviewed and changed if needed.

Completion phase: This phase retrieves the existing publish/subscribe definitions from the message broker and uses them to create equivalent definitions in the publish/subscribe component of the queue manager. When the migration is complete, the queue manager publish/subscribe configuration is equivalent to the earlier message broker publish/subscribe configuration.

The detailed migration steps are as follows:

  • Uninstall WebSphere MQ Version 6.x and install WebSphere MQ Version 7.0.1 on the system or upgrade WebSphere MQ V6.x to WebSphere MQ V7.0.1.
  • Install WebSphere Message Broker Version 7.0 on your system.
  • Ensure that the queue manager attribute PSMODE is set to ‘COMPAT.’ If not, change it to ‘COMPAT’.
  • Run the migration process (migmbbrk) with the -r parameter as per following command:

This option rehearses the migration of the publish/subscribe configuration data from the broker to its underlying queue manager without changing either of the configurations. Review the contents of the log file to check what is to be migrated in the actual migration.

  • The above step produces a file (amqmigrateacl.txt) containing setmqaut commands to set up a security environment in the queue manager that is equivalent to the security environment that existed in the broker. For ACL migration, copy the file (amqmigrateacl.txt) that contains the security commands and manually run them from a command console.
  • Run the migration process (migmbbrk) with the -t parameter to initiate migration as per following command:
  • The migration process migrates the publish/subscribe configuration data to the queue manager. This also produces a security file called amqmigrateacl.txt.

Check the contents of the security commands file (amqmigrateacl.txt ) against your backup copy of the file obtained from the rehearsal phase to make sure that nothing ACL-related has changed since you rehearsed the migration. If anything has changed, then you would need to edit your copy of the security commands file.

Edit and manually run the commands from the amqmigrateacl.txt (generated in the previous steps) on the broker queue manager to recreate the topic and subscription security defined in the topic ACLs. This will migrate the ACLs from V6.x message broker to V7.0.1 queue manager.

  • Run the migration process with -c parameter to migrate the subscriptions and complete the migration of publish/subscribe components as per following command:
  • You can now fully migrate the message broker V6.x to V7.
  • Change the queue manager PSMODE attribute to ‘Enabled’ from WebSphere MQ Explorer or by using the runmqsc command: ALTER QMGR PSMODE(ENABLED).
  • Restart the message broker.

If you are migrating a broker collective from WebSphere Message Broker V6 to WebSphere MQ V7.0.1 or later, publish/subscribe clusters need to be created on each of the queue managers associated with the brokers. After that, publish/subscribe information in each of the brokers in the collectives can be migrated to queue managers in the same way as the individual brokers. However, all the brokers in the collective should be migrated at the same time. The subscriptions are required to be re-synchronized with all the queue managers in the publish/subscribe cluster.

Additionally, once the migration to WMB V7.0 is complete, it is advisable to review the post-migration tasks listed in the WMB V7 Information Center.  This would help you analyze and validate your Message Broker environment.

WebSphere Message Broker V7 and WebSphere MQ V7.0.1 together provide a more comprehensive and enhanced publish/subscribe functionality. WebSphere MQ adds the new publish/subscribe capabilities as it hosts the publish/subscribe engine. WebSphere Message Broker further enables the subscribers to perform content-based filtering on the messages.

Finally, if you are looking to migrate to WebSphere Message Broker V7, ensure that the publish/subscribe migration is performed with the entire broker runtime migration. Although the publish/subscribe engine is hosted in WebSphere MQ V7.0.1 as opposed to message broker in the earlier versions of WebSphere Message Broker, the end users are mostly unaffected by this change.

Resources:

 

    Vivek Grover is a Level 2 Technical Support Engineer for Websphere Message Broker(WMB). His responsibilities include troubleshooting customers' real-time problems worldwide and providing resolution.
Comments