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
- In the Workload Deployer dashboard, under Virtual Application Patterns, click the Refresh button to refresh the list of patterns. AjaxHelloWeb appears in the list.
- Select AjaxHelloWeb.
- Click Open to open the application in the Virtual Application Builder.
- In the Virtual Application Builder, under the Assets pane, expand OSGi Components if it is not already expanded.
- 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
- In the properties pane for the new component, observe the EBA File field is blank. Leave it and the other controls as they are.
- 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.
- 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.
- 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
- 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
The wizard detects two components in the virtual application pattern:
- Component
Web Applicationexisted in Rational Application Developer before, and remains associated to project AjaxHello_WEB. - Component
OSGi Applicationis new to Rational Application Developer, and does not yet have an associated project.
- Component
- Select OSGi Application.
- 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.
- Select HelloWorld.app.
- Click OK to return to the Reacquire Cloud Application Wizard.
- 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.
- 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]. - In the Workload Deployer dashboard, under Virtual Application Patterns, select AjaxHelloWeb.
- Click the Open button to open the application in the Virtual Application Builder.
- 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.
- Select component OSGi Application if it is not already selected.
- In the properties pane, observe that the EBA File field now has a value.
- Close the Virtual Application Builder without saving.





