Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Preparing for IBM PureApplication System, Part 5: Developing virtual application patterns for IBM Workload Deployer with Rational Application Developer

Chris Brealey (cbrealey@ca.ibm.com), Senior Technical Staff Member, IBM
Photo of Chris Brealey
Chris Brealey is a Senior Technical Staff Member with IBM Software, Rational Enterprise Architecture, Design and Construction. Chris is based at the IBM Toronto Canada Lab. He is a Chief Architect for Rational Application Developer, with a focus on SOA and SCA, cloud computing, mobile computing, and application lifecycle management. He is a regular mentor on fellowship projects in the Centers for Advanced Studies (CAS). Chris previously led the architecture and delivery of the Rational Application Devleoper Web services tools. Chris joined IBM in 1989 after his graduation from the University of Victoria with a BSc degree in Computer Science.

Summary:  Part 5 of this article series shows how to combine the software development features of IBM® Rational® Application Developer with the virtual application pattern assembly capabilities of IBM Workload Deployer to develop cloud applications. With Workload Deployer, you can assemble virtual application patterns consisting of Java™ EE enterprise applications, Web applications, OSGi applications, and other types of components. However, as an application developer, it is predominantly the source code of the components of the pattern you need to work with the most. The latest integrated features of Rational Application Developer and Workload Deployer will help you develop virtual application patterns from the source code on up.

View more content in this series

Date:  11 Apr 2012
Level:  Intermediate PDF:  A4 and Letter (1701 KB | 40 pages)Get Adobe® Reader®

Activity:  29987 views
Comments:  

Part 7. Changing application patterns

After you have published an application pattern, it is available in the Workload Deployer storehouse for you and possibly others to access or update. For example, you may use the Virtual Application Builder to wire components together or configure policies. A teammate may acquire your application pattern into another Rational Application Developer workspace, then publish updates back to the pattern in the storehouse. Because the development of application patterns and their components is shared between Rational Application Developer and Workload Deployer, Rational Application Developer includes a few features to help keep application patterns synchronized between the Rational Application Developer workspace and the Workload Deployer storehouse.

In this part of the tutorial, you edit the application pattern that you created in Part 5. Creating application patterns in Workload Deployer, detect the change from Rational Application Developer, then reacquire the application pattern into the Rational Application Developer workspace to bring it into sync with the pattern on Workload Deployer.

Edit the application pattern with the Virtual Application Builder

  1. In the Workload Deployer dashboard, under Virtual Application Patterns, click the Refresh button to refresh the list of patterns. AjaxHelloWeb appears in the list.
  2. Select AjaxHelloWeb.
  3. Click Open to open the application in the Virtual Application Builder.
  4. In the Virtual Application Builder, under the Assets pane, expand OSGi Components if it is not already expanded.
  5. Drag and drop the OSGi Application component from the Assets pane onto the canvas as shown in Figure 25.

    Figure 25. Creating a new OSGi Application component
    Creating a new OSGi Application component

  6. In the properties pane for the new component, observe the EBA File field is blank. Leave it and the other controls as they are.
  7. Click Save.

Detect and reacquire the change from within Rational Application Developer

By default, Rational Application Developer checks every 60 seconds for changes to published or acquired virtual application patterns, but you can change or disable this interval, or manually initiate a check.

Note: Rational Application Developer V8.0.4 does not detect changes to the component artifacts of an application pattern.

  1. In Rational Application Developer, in the Servers view, right-click on the Workload Deployer server and select Check Application Synchronization to have Rational Application Developer check the corresponding application pattern on Workload Deployer for any changes.
  2. Once the operation completes, the state and status of the Workload Deployer server and the AjaxHelloWeb application pattern changes to [Stopped, Reacquire].

    The status of Reacquire (Figure 26) indicates that the virtual application pattern has changed in some way on Workload Deployer since the last time it was synchronized with (for example, published from or acquired into) Rational Application Developer. We recommend that you reacquire the application pattern into Rational Application Developer to get it back into sync.



    Figure 26. The Reacquire status
    The Reacquire status

  3. In the Servers view, right-click on AjaxHelloWeb and select Reacquire to open the Reacquire Application and Association wizard as shown in Figure 27.

    Figure 27. Reacquiring an application pattern
    Reacquiring an application pattern

    The wizard detects two components in the virtual application pattern:

    • Component Web Application existed in Rational Application Developer before, and remains associated to project AjaxHello_WEB.
    • Component OSGi Application is new to Rational Application Developer, and does not yet have an associated project.
  4. Select OSGi Application.
  5. Click Edit to open the Edit Association dialog. The dialog shows all available OSGi application projects in your workspace. There should be only one: HelloWorld.app.
  6. Select HelloWorld.app.
  7. Click OK to return to the Reacquire Cloud Application Wizard.
  8. Click Finish.

Republish the application pattern

Like at the end of Part 6. Acquiring application patterns into Rational Application Developer, you have just associated a workspace project to a component, effectively changing the application pattern. Therefore, publish the application pattern with the newly associated OSGi application project back to Workload Deployer.

  1. In the Servers view, right-click on the Workload Deployer server and select Publish.

    Rational Application Developer dispatches a background job to export and publish the updated virtual application pattern to Workload Deployer. After a few moments, the publication job completes normally, and the state and status of the AjaxHelloWeb virtual application pattern change to [Stopped, Synchronized].

  2. In the Workload Deployer dashboard, under Virtual Application Patterns, select AjaxHelloWeb.
  3. Click the Open button to open the application in the Virtual Application Builder.
  4. Due to the publication process from Rational Application Developer, both components of the application pattern (Web Application and OSGi Application) may have been relocated to the upper left corner of the canvas. Drag them away from the corner, and from each other, to better reveal their details.
  5. Select component OSGi Application if it is not already selected.
  6. In the properties pane, observe that the EBA File field now has a value.
  7. Close the Virtual Application Builder without saving.

8 of 16 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere, Rational, Cloud computing
ArticleID=809006
TutorialTitle=Preparing for IBM PureApplication System, Part 5: Developing virtual application patterns for IBM Workload Deployer with Rational Application Developer
publish-date=04112012
author1-email=cbrealey@ca.ibm.com
author1-email-cc=dwu@us.ibm.com