Practices for Lesson 4 Practices Overview
Practice 4-3: Deploy a Composite with a Configuration Plan Overview
In this practice you modify a configuration plan and deploy the composite with the configuration plan using the Administration interface and Ant command-line tools.
Assumptions
The HelloWorldComposite application has been successfully deployed by performing the steps in the section titled “Practice 4-1: Deploy a Composite Application.”
Tasks
1. Your tasks for this practice are:
• Deploy a composite application with its configuration plan by using the Oracle Fusion Middleware Control Console
• Test the composite and observe the results
• Modify the supplied configuration plan and redeploy the application using the command-line Ant scripts
To complete these tasks, perform the following steps:
2. If required, login to Oracle Enterprise Manager Fusion Middleware Control Console.
Note: Refer to the subsection titled “Logging into the Oracle WebLogic Administration Console” contained in the Common Administrator Tasks part of the Activity Guide.
Deploy a Composite with a Configuration Plan
3. Deploy the LogHelloComposite application by using the SAR file (sca_LogHelloWorldComposite_rev1.0.jar) in the
D:\labs\lesson04\CallHelloComposite\deploy folder. Deploy the new application in the default partition of the SOA infrastructure.
Note: For generic steps to deploy a composite, refer to the section titled “Deploying a Composite Application with a Configuration Plan” in the Common Administrator Tasks part of the Activity Guide. Here are some specific instructions for selecting the SAR file and attaching the configuration plan:
a. On the Deploy SOA Composite > Select Archive page, perform the following steps:
1) In the “Archive or Exploded Directory” section, accept the default selected “Archive is on the machine where this web browser is running” option, and click Browse.
2) In the “Choose file” dialog box, navigate to the
D:\labs\lesson04\CallHelloComposite\deploy folder, select sca_LogHelloWorldComposite_rev1.0.jar, and click Open.
3) In the Configuration Plan section, select the “Configuration plan is on the machine where this web browser is running” option, and click Browse.
4) In the “Choose file” dialog box, navigate to the
D:\labs\lesson04\CallHelloComposite\deploy folder, select CallHelloComposite_cfgplan.xml, and click Open.
Note: The configuration plan contains an intended run-time error that you correct later in this practice after redeploying the composite application with a modified the configuration plan.
Oracle University and (Oracle Corporation) use only.
The run-time error condition is included to highlight that a configuration plan should be modified to suite the deployment environment.
5) Verify your selections by using the following image and click Next.
b. On the Deploy SOA Composite > Select Target page, in the SOA Partition section select default from the drop-down box, and click Next.
c. On the Deploy SOA Composite > Confirmation page, accept the default settings and click Deploy.
Test the Composite
4. On the LogHelloWorldComposite [1.0] home page, click Test.
Note: If the LogHelloWorldComposite [1.0] home page is not already displayed and you are logged into Oracle Fusion Middleware Control, expand the SOA > soa-infra > default node in the Farm navigation tree, and then click the LogHelloWorldComposite [1.0] entry.
5. On the Test Web Service page, accept all default settings. However, you must provide an input string for the test. To provide the input string and test the service:
a. On the Test Web Service page, scroll down until you find the Request tab.
b. On the Test Web Service page > Request tab page, locate the Input Arguments
Oracle University and (Oracle Corporation) use only.
Note: You may need to refresh the Flow Trace page by using the refresh icon (in the top right corner of the page) to ensure you can see the fault instance result.
Answer: On the Flow Trace page, you should be able to observe the fault listed in the Flow Trace page in the Fault section and the Trace tree in the LogHelloBPEL BPEL Component row. For example:
To view the fault message information, perform the following steps:
a. Click the fault entry in the Error Message column of the Faults section to view the error, for example:
b. On the fault information pop up frame, examine the detail and summary information, for example:
Note: You can see that there is a WSDL reading error for the HelloWorldComposite service’s entry point defined in the WSDL and located at the URL
http://myhost.mydomain.com:8001. If you were to using the ping command with the host name myhost.mydomain.com, what result would you get?
Answer: The ping command would inform you that it could not find the host name used. For example:
Oracle University and (Oracle Corporation) use only.
7. What can you do to correct the error condition?
Answer: The possible solutions are:
− Contact the developer or provider of the composite application and provide them the error information so that they can fix the problem in the source code, or
− Redeploy the application with a configuration plan that replaces the incorrect URL with a correct URL for the HelloWorldComposite service entry being referenced by the application. This is the easier solution to implement because you know where the HelloWorldComposite application has been deployed.
8. Close the Flow Trace page for the LogHelloWorldComposite [1.0].
Note: On the LogHelloWorldComposite [1.0] Dashboard page, if you see multiple
occurrences of the same fault information, this is because the SOA Infrastructure retries the service invocation. It could be a situation that the service URL is correct and it is temporarily unavailable. However, while you could create a host name alias entry for the
myhost.mydomain.com in the Window hosts file to solve the problem, in this case you redeploy the application with an updated configuration plan.
In addition, you may need to abort the instance, which is retrying the service invocation. To abort the composite instance:
a. On the LogHelloWorldComposite [1.0] page, click the Instance tab.
b. On the LogHelloWorldComposite [1.0] Instance page, select the row containing faulted instance ID and click Abort.
Note: If you get another Abort confirmation dialog box, click Abort again. The following image shows the results after an instance has been aborted.
Oracle University and (Oracle Corporation) use only.
Modify the Configuration Plan and Redeploy the Composite 9. Using Windows Explorer, navigate to the
D:\labs\lesson04\CallHelloComposite\deploy folder and open the CallHelloComposite_cfgplan.xml file in Notepad.
Hint: Right click the XML file and select Send To > Notepad.
10. In the Notepad window, modify the configuration plan to change the following entries:
a. Locate the XML element <reference name="HelloWorldService">, and in its child <attribute name="location"> element modify host name in the URL of the
<replace> element from myhost.mydomain.com to soa11g.example.com (or localhost). Use the following image as a guide:
b. Locate the XML element <reference name="LogAdapterService">, and in the child element for <property name="hello_logdir"> modify the <replace>
element text to contain D:\temp\hello_logs instead of D:\temp. Use the following image as a guide:
Note: The hello_logdir property is configured by the application developer as a logical name referencing a target folder in which the log files are written to in the deployment environment. The default value for the property is set to D:\temp. You change the folder location value for this practice.
c. Save the changes to the configuration plan file and terminate the Notepad application.
11. Open a Command Prompt window, using the Desktop icon, and execute the following commands to deploy the application with the modified configuration plan:
D:\> cd D:\labs\lesson04\CallHelloComposite\deploy D:\> deploy.cmd sca_LogHelloWorldComposite_rev1.0.jar CallHelloComposite_cfgplan.xml
Note: Use the following image as a guide to verify the command and results indicating that the deployment is successful:
Oracle University and (Oracle Corporation) use only.
Repeat the Composite Test
12. On the LogHelloWorldComposite [1.0] home page, click Test.
Note: If the LogHelloWorldComposite [1.0] home page is not already displayed and you are logged into Oracle Fusion Middleware Control, expand the SOA > soa-infra > default node in the Farm navigation tree, and then click the LogHelloWorldComposite [1.0] entry.
13. On the Test Web Service page, accept all default settings. However, you must provide an input string for the test. To provide the input string and test the service:
a. On the Test Web Service page, scroll down until you find the Request tab.
b. On the Test Web Service page > Request tab page, locate the Input Arguments section with the default Tree View mode. In the request > input field, enter the value:
Another log test, and click Test Web Service.
c. On the Test Web Service > Response page, click the Launch Message Flow Trace link.
Note: You may need to refresh the Flow Trace page using the refresh icon (in the top right corner of the page) to ensure you can see the complete results.
14. On the Flow Trace page, verify that application is completed without faults.
15. Using Windows Explorer, navigate to the D:\temp folder and verify that the hello_logs subfolder exists and contains a log file prefixed with the word “hello” followed by a
sequence number, for example hellomsg_1.log.
Note: If the hello_logs subfolder does not exist, the File Adapter creates it in order to
Oracle University and (Oracle Corporation) use only.
Hint: You can compare the log file contents with the result message in the payload of the callbackClient entry of the LogHelloBPEL component Audit Trail (accessible through the Flow Trace page). For example: