0% found this document useful (0 votes)
71 views9 pages

Order MGMT 2

This document discusses techniques for managing the lifecycle of SOA composite applications. It describes deploying a composite application from JDeveloper using a configuration plan to customize values for different environments. It also covers compiling, packaging, and deploying the composite from the command line using ANT scripts. Finally, it discusses deploying the composite from the Enterprise Manager console.

Uploaded by

vinchooo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views9 pages

Order MGMT 2

This document discusses techniques for managing the lifecycle of SOA composite applications. It describes deploying a composite application from JDeveloper using a configuration plan to customize values for different environments. It also covers compiling, packaging, and deploying the composite from the command line using ANT scripts. Finally, it discusses deploying the composite from the Enterprise Manager console.

Uploaded by

vinchooo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

End-2-end-105-PO-Processing

B Managing the lifecycle of a SOA


composite application

B.1 Introduction to SOA lifecycle

This lab exercise will give you a brief introduction to various techniques that can be
used to manage the lifecycle of SOA composite applications.
Oracle SOA Suite provides multiple facilities to help in this area:
 Variety of deployment methods:
o JDeveloper, the development environment
o Enterprise Manager, the management & monitoring environment
o Command line, in an interactive fashion
o ANT or Python scripts
 Ability to simultaneously deploy multiple versions of a given composite,
and specify a default version
 Configuration plans to customize environment-specific values (ex: a web
service URL that is different in the test environment than in the production
environment)
 Built-in support in JDeveloper for version control systems such as
Subversion.

B.2 Lab overview


In this lab you will create a configuration plan which surfaces a property that can
take on different values. This simulates the process of deploying with different
values to your different environments: Development, Test and Production.

Section B.1 Managing the lifecycle of a SOA composite application B-1


End-2-end-105-PO-Processing

B.3 DEVELOPMENT environment

B.3.1 Surfacing binding properties at the composite level

1. In JDeveloper, open your previously completed POProcessing composite (or


the prebuilt solution for chapter 9).
2. Open composite.xml
3. Select the WriteApprovalResult external reference.
4. View the properties using the Property Inspector in the lower-right pane.
You may need to enlarge or scroll the pane to see all of the sections. If you
do not see the Property Inspector, select it from the View menu in the
toolbar.
5. Using the Property Inspector, we are going to add a binding property. Scroll
to the Binding Properties section and select the Add icon (green plus sign).

B-2 Managing the lifecycle of a SOA composite application Section B.3


End-2-end-105-PO-Processing

6. Select FileNamingConvention from the drop-down menu for the property


Name and enter test_%SEQ%.xml for the Value.
7. Click OK.

8. Check the source (click Source tab) of composite.xml to see that you have
surfaced a binding property in composite.xml.

Section B.3 Managing the lifecycle of a SOA composite application B-3


End-2-end-105-PO-Processing

9. Save All

B.3.2 Generating and validating a deployment plan

10. From the Projects Explorer, select composite.xml


11. Right-click on composite.xml and choose Generate Config Plan
12. Name your plan POProcessing_dev_cfgplan.xml
13. Click OK. The plan should automatically open in text mode in JDeveloper.
14. Locate the reference for WriteApprovalResults and edit the
FileNamingConvention property to orderoutput_%SEQ%.xml

15. In addition, in the wsdlAndSchema section, add the PhysicalDirectory jca


property. This is the directory that you configured for the file adapter to
write to. Enter another directory, for instance: “/home/oracle/tmp/out”.

Note that you can restrict the scope of this global replace to a single file by only
leaving WriteApprovalResults_file.jca in the list of files to consider for this search &
replace.
Now it is time to validate your new config plan to ensure it works as expected:

B-4 Managing the lifecycle of a SOA composite application Section B.3


End-2-end-105-PO-Processing

16. Save All.


17. Right-click on composite.xml
18. Select Validate Config Plan
19. Select OK in the Composite Configuration Plan Validator dialog.
20. The report.log opens automatically. You should see the following:

21. Finally, deploy from JDeveloper and attach this deployment. Give this new
deployment a different revision ID like 2.0. See that your configuration plan
is automatically selected, at the right side of the window, for use:

Section B.3 Managing the lifecycle of a SOA composite application B-5


End-2-end-105-PO-Processing

22. Click OK to start deployment.


23. Use Enterprise Manager to test your application to ensure that the file
adapter now writes all message to /home/oracle/tmp/out with a name
orderoutput_<number>.xml.

B.4 TEST environment

B.4.1 Compiling and packaging from the command-line with ANT


Administrators typically do not want to work with IDEs and prefer to operate from
the command line or with scripts. Let’s take the role of an administrator in this
section and exclusively work from the command line.
24. First, open a terminal window (on the desktop:
Applications/Accessories/Terminal) and set your environment for command
line deployment via ANT.

export PATH=/home/oracle/Middleware/modules/org.apache.ant_1.7.0/bin:$PATH

export JAVA_HOME=/home/oracle/Middleware/jdk160_11

B-6 Managing the lifecycle of a SOA composite application Section B.4


End-2-end-105-PO-Processing

25. Navigate to the following directory


cd /home/oracle/JDevHome/jdeveloper/bin

26. Look at the available ANT commands and explore ANT help:
ls ant-sca*

ant-sca-compile.xml ant-sca-deploy.xml ant-sca-mgmt.xml


ant-sca-package.xml ant-sca-test.xml ant-sca-upgrade.xml

Use ant –f <command> help (like ant –f ant-sca-package help)


to get usage information for a given command.
27. Compile and package POProcessing using the ant-sca-package command.
This command also sets the version number.
ant -f ant-sca-package.xml
-DcompositeDir=/home/oracle/jdeveloper/mywork/POProcessing/POProcessing
-DcompositeName=POProcessing
-Drevision=6-cmdline
-Dscac.application.home=/home/oracle/jdeveloper/mywork/POProcessing

If successful you should see a “BUILD SUCCESSFUL” message.


28. Check for the [jar] message that will tell you where the script is writing the
resulting SAR file. We’ll need this in the next step.
[jar] Building jar:
/home/oracle/jdeveloper/mywork/POProcessing/POProcessing/deploy/sca_POProcessing_rev6-
cmdline.jar

B.4.2 Deploying from the command line with ANT


Now, we’ll deploy this SAR file from the command-line using ant-sca-deploy.xml.
29. Use ant-sca-deploy.xml to deploy the previously packaged SAR file:
ant -f ant-sca-deploy.xml
-DserverURL=http://localhost:7001
-
DsarLocation=/home/oracle/jdeveloper/mywork/POProcessing/POProcessing/deploy/s
ca_POProcessing_rev6-cmdline.jar
-Doverwrite=true
-Duser=weblogic
-Dpassword=welcome1
-DforceDefault=true
-
Dconfigplan=/home/oracle/jdeveloper/mywork/POProcessing/POProcessing/POProcess
ing_dev_cfgplan.xml

Watch the feedback and look for the “Deploying composite success” message.

Section B.4 Managing the lifecycle of a SOA composite application B-7


End-2-end-105-PO-Processing

B.5 PRODUCTION environment

B.5.1 Deploying from Enterprise Manager


In this section we will explore the deploy options from Enterprise Manager.
In Enterprise Manager, right-click on soa-infra and select the SOA Deployment / Deploy
option:

Point Enterprise Manager to your local SAR file and configuration plan. The local
SAR file is at:
/home/oracle/jdeveloper/mywork/POProcessing/POProcessing/deploy/sca_POProcessing_rev6-cmdline.jar

The configuration plan is at:


=/home/oracle/jdeveloper/mywork/POProcessing/POProcessing/POProcessing_dev_cfgplan.xml

B-8 Managing the lifecycle of a SOA composite application Section B.5


End-2-end-105-PO-Processing

Click Next to proceed.


Click Next again to accept the default target for deployment.
An error message appears indicating that the SAR file is already deployed and that it
needs to be undeployed before it can be deployed. Just click OK. You can use the
Enterprise Manager to undeploy the application (right-click on soa-infra and select
the SOA Deployment / Undeploy option ) and then retry deployment if you have time.
Otherwise, just move on. We trust you understand the spirit of this deployment
exercise using Enterprise Manager.

Section B.5 Managing the lifecycle of a SOA composite application B-9

You might also like