Saturday, May 28, 2011

WAIT activity performs differently in a SOA Suite 11g cluster

Let's say you have a 2-node cluster of Oracle SOA Suite 11g and are running an asynchronous BPEL process. If the first node crashes, typically the instance will resume on the other node. This is normal cluster behavior.

However, this did not happen in one of the tests that I performed, and this was due to a WAIT activity in the BPEL process.


Test Performed

1. A BPEL process was instantiated and confirmed that it was running on "host2".

This was confirmed by running the following SQL statement while the instance was running:
SELECT create_cluster_node_id, cikey, creation_date, modify_date, state, composite_name
FROM cube_instance
WHERE TO_CHAR(creation_date, 'YYYY-MM-DD HH24:MI') >= '2011-04-25 15:40'

CREATE_CLUSTER_NODE_ID CIKEY CREATION_DATE MODIFY_DATE STATE COMPOSITE_NAME
host2-soa_domain_soacluster 410003 25-APR-11 03.43.55.685000000 PM 25-APR-11 03.43.55.702000000 PM 1 TestLongRunningProcess
2. While this long running BPEL process was being executed, we killed the Unix process for "soa_server2" on "host2":
kill -9 21409
4. The "soa_server2" managed server on "host2" began to restarted automatically.

5. While "soa_server2" was starting up, the BPEL process was still in the "Running" state.

6. After 16 minutes, the process basically completes successfully after "soa_server2" is brought back online.


Behavior of a SOA Suite 11g Cluster
  • If an asynchronous transaction is running, and the SOA server crashes, the instance resumes execution on the active node. This behavior is consistent for both BPEL and Mediator.
  • If the BPEL process is using a WAIT or ONALARM BRANCH OF PICK activities, the instance will not failover to the active node, and will only resume when the server on which it crashed on is restarted.

References:

  • http://download.oracle.com/docs/cd/E17904_01/relnotes.1111/e10133.pdf#page=243

Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.4)


Ahmed Aboulnaga

Monday, May 23, 2011

Performance comparison of audit levels in SOA Suite 11g

I ran multiple tests to compare the performance of various audit level settings in Oracle SOA Suite 11g.

The two parameters tested are:
  • Audit Level
  • Capture Composite Instance State
To access these settings, log in to the EM console and navigate to SOA --> (right-click on) soa_server1 --> SOA Administration --> Common Properties.


Test #
Audit
Capture Composite Instance State
Min (ms)
Max
(ms)
Avg
(ms)
1
Off
n/a
27
519
50
2
Off
n/a
27
551
51
3
Off
n/a
27
325
49
4
Production
Disabled
77
825
128
5
Production
Disabled
63
420
104
6
Production
Disabled
62
697
108
7
Production
Enabled
75
475
153
8
Production
Enabled
85
649
149
9
Production
Enabled
82
1057
147


Results:
  • Audit=Off yields the best performance
  • Audit=Production is approximately 56% slower in performance than Audit=Off
  • Setting CaptureCompositeInstanceState=Disabled yields an additional 24% performance improvement

Recommendations:
  • Settings Audit=Development is unacceptable in a production environment due to the high performance overhead incurred
  • Setting Audit=Off, despite the drastic performance improvement, is unacceptable since absolutely no metadata is logged in the database and you have zero visibility into your instances
  • Set Audit=Production in a production environment
  • Consider setting CaptureCompositeInstanceState=Disabled, as you obtain this data by querying the tables in the database
  • Performing database tuning can improve performance of Audit=Production by at least 30%, so engage your DBAs

Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.4)

Monday, May 9, 2011

Demo of Ant scripts for Oracle SOA Suite 11g code deployment

I've written some great Ant script wrappers that simplify the deployment, undeployment, and management of code in bulk for Oracle SOA Suite 11g.

Here is an example of the CustomProcessList.txt, which is merely a list of composites I would want to deploy, undeploy, start, or stop:
CreateItem,inventory,1.0,true,inventory/CreateItem
UpdateItem,inventory,1.0,true,inventory/UpdateItem
UpdateEmployee,hr,1.0,true,hr/UpdateEmployee
What this says is that there are 3 composites you want to manage. If you choose to deploy them, 2 of them will be deployed to the inventory partition, and the last one to the hr partition.


This is how to detokenize the 3 composites above:
oracle@build:/home/oracle> cd ant
oracle@build:/home/oracle/ant> export ORACLE_HOME=/u01/app/oracle
oracle@build:/home/oracle/ant> export ANT_HOME=$ORACLE_HOME/middleware/modules/org.apache.ant_1.7.1
oracle@build:/home/oracle/ant> export PATH=$ANT_HOME/bin:$PATH
oracle@build:/home/oracle/ant> export JAVA_HOME=$ORACLE_HOME/jdk1.6.0_21
oracle@build:/home/oracle/ant> export CURRENT_FOLDER=`pwd`
oracle@build:/home/oracle/ant> ant -f build.soa.xml detokenizeComposites -Dtargetenv=dev
Buildfile: build.soa.xml
detokenizeComposites:
     [echo]
     [echo] ======================================================================
     [echo] DETOKENIZE COMPOSITE #1: CreateItem
======================================================================
     [echo]
   [delete] Deleting: /home/oracle/ant/code/inventory/CreateItem/SCA-INF/classes/META-INF/adf-config.xml
     [copy] Copying 1 file to /home/oracle/ant/code/inventory/CreateItem/SCA-INF/classes/META-INF
  [replace] Replaced 11 occurrences in 6 files.
     [echo]
     [echo] ======================================================================
     [echo] DETOKENIZE COMPOSITE #2: UpdateItem
======================================================================
     [echo]
   [delete] Deleting: /home/oracle/ant/code/inventory/UpdateItem/SCA-INF/classes/META-INF/adf-config.xml
     [copy] Copying 1 file to /home/oracle/ant/code/inventory/UpdateItem/SCA-INF/classes/META-INF
  [replace] Replaced 6 occurrences in 3 files.
     [echo]
     [echo] ======================================================================
     [echo] DETOKENIZE COMPOSITE #3: UpdateEmployee
======================================================================
     [echo]
   [delete] Deleting: /home/oracle/ant/code/hr/UpdateEmployee/SCA-INF/classes/META-INF/adf-config.xml
     [copy] Copying 1 file to /home/oracle/ant/code/hr/UpdateEmployee/SCA-INF/classes/META-INF
  [replace] Replaced 24 occurrences in 3 files.

BUILD SUCCESSFUL
Total time: 2 seconds

This is how to deploy the 3 composites above:
oracle@build:/home/oracle> cd ant
oracle@build:/home/oracle/ant> export ORACLE_HOME=/u01/app/oracle
oracle@build:/home/oracle/ant> export ANT_HOME=$ORACLE_HOME/middleware/modules/org.apache.ant_1.7.1
oracle@build:/home/oracle/ant> export PATH=$ANT_HOME/bin:$PATH
oracle@build:/home/oracle/ant> export JAVA_HOME=$ORACLE_HOME/jdk1.6.0_21
oracle@build:/home/oracle/ant> export CURRENT_FOLDER=`pwd`
oracle@build:/home/oracle/ant> ant -f build.soa.xml deployComposites -Dtargetenv=dev

     [echo] ======================================================================
     [echo] PACKAGE COMPOSITE #1: CreateItem
======================================================================
     [echo]
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

clean:
     [echo] deleting /home/oracle/ant/code/inventory/CreateItem/deploy/sca_CreateItem_rev1.0.jar
   [delete] Deleting: /home/oracle/ant/code/inventory/CreateItem/deploy/sca_CreateItem_rev1.0.jar

init:

scac-validate:
     [echo] Running scac-validate in /home/oracle/ant/code/inventory/CreateItem/composite.xml
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

scac:
     [scac] Validating composite "/home/oracle/ant/code/inventory/CreateItem/composite.xml"
     [scac] INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.
     [scac] warning: in CreateItem.mplan: Case "Case_1_UpdateCustomerProfile" doesnt have any payload transformation Please make sure source and target message part name are same and of same type. Otherwise, target reference may fail to execute with error message like "Input sourcelike Null" or "Part not found"
     [scac] warning: in CreateItem.mplan: Case "UpdateEmployee.CreateCustomerProfile" doesnt have any payload transformation Please make sure source and target message part name are same and of same type. Otherwise, target reference may fail to execute with error message like "Input sourcelike Null" or "Part not found"

package:
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

compile-source:
    [mkdir] Created dir: /home/oracle/ant/code/inventory/CreateItem/dist
     [copy] Copying 10 files to /home/oracle/ant/code/inventory/CreateItem/dist
     [copy] Warning: /home/oracle/ant/code/inventory/CreateItem/src not found.
     [copy] Warning: /home/oracle/ant/code/inventory/CreateItem/SCA-INF/src not found.
      [jar] Building jar: /home/oracle/ant/code/inventory/CreateItem/deploy/sca_CreateItem_rev1.0.jar
   [delete] Deleting directory /home/oracle/ant/code/inventory/CreateItem/dist
     [echo]
     [echo] ======================================================================
     [echo] DEPLOY COMPOSITE #1: CreateItem
======================================================================
     [echo]
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..

deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/home/oracle/ant/code/inventory/CreateItem/deploy/sca_CreateItem_rev1.0.jar
[deployComposite] Adding sar file - /home/oracle/ant/code/inventory/CreateItem/deploy/sca_CreateItem_rev1.0.jar
[deployComposite] INFO: Creating HTTP connection to host:dev.raastech.com, port:8001
[deployComposite] INFO: Received HTTP response from the server, response code=200
[deployComposite] ---->Deploying composite success.
     [echo]
     [echo] ======================================================================
     [echo] PACKAGE COMPOSITE #2: UpdateItem
======================================================================
     [echo]
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

clean:
     [echo] deleting /home/oracle/ant/code/inventory/UpdateItem/deploy/sca_UpdateItem_rev1.0.jar
   [delete] Deleting: /home/oracle/ant/code/inventory/UpdateItem/deploy/sca_UpdateItem_rev1.0.jar

init:

scac-validate:
     [echo] Running scac-validate in /home/oracle/ant/code/inventory/UpdateItem/composite.xml
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

scac:
     [scac] Validating composite "/home/oracle/ant/code/inventory/UpdateItem/composite.xml"
     [scac] INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.

package:
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

compile-source:
    [mkdir] Created dir: /home/oracle/ant/code/inventory/UpdateItem/dist
     [copy] Copying 10 files to /home/oracle/ant/code/inventory/UpdateItem/dist
     [copy] Warning: /home/oracle/ant/code/inventory/UpdateItem/src not found.
     [copy] Warning: /home/oracle/ant/code/inventory/UpdateItem/SCA-INF/src not found.
      [jar] Building jar: /home/oracle/ant/code/inventory/UpdateItem/deploy/sca_UpdateItem_rev1.0.jar
   [delete] Deleting directory /home/oracle/ant/code/inventory/UpdateItem/dist
     [echo]
     [echo] ======================================================================
     [echo] DEPLOY COMPOSITE #2: UpdateItem
======================================================================
     [echo]
     [echo] oracle.home = /u01/app/oracle/middleware/Oracle_SOA1/bin/..

deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/home/oracle/ant/code/inventory/UpdateItem/deploy/sca_UpdateItem_rev1.0.jar
[deployComposite] Adding sar file - /home/oracle/ant/code/inventory/UpdateItem/deploy/sca_UpdateItem_rev1.0.jar
[deployComposite] INFO: Creating HTTP connection to host:dev.raastech.com, port:8001
[deployComposite] INFO: Received HTTP response from the server, response code=200
[deployComposite] ---->Deploying composite success.
     [echo]
     [echo] ======================================================================
     [echo] PACKAGE COMPOSITE #3: UpdateEmployee
======================================================================
     [echo]
     [echo] oracle.home = /l01/apps/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

clean:
     [echo] deleting /home/oracle/ant/code/hr/UpdateEmployee/deploy/sca_UpdateEmployee_rev1.0.jar
   [delete] Deleting: /home/oracle/ant/code/hr/UpdateEmployee/deploy/sca_UpdateEmployee_rev1.0.jar

init:

scac-validate:
     [echo] Running scac-validate in /home/oracle/ant/code/hr/UpdateEmployee/composite.xml
     [echo] oracle.home = /l01/apps/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

scac:
     [scac] Validating composite "/home/oracle/ant/code/hr/UpdateEmployee/composite.xml"
     [scac] INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.

package:
     [echo] oracle.home = /l01/apps/oracle/middleware/Oracle_SOA1/bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

compile-source:
    [mkdir] Created dir: /home/oracle/ant/code/hr/UpdateEmployee/dist
     [copy] Copying 10 files to /home/oracle/ant/code/hr/UpdateEmployee/dist
     [copy] Warning: /home/oracle/ant/code/hr/UpdateEmployee/src not found.
      [jar] Building jar: /home/oracle/ant/code/hr/UpdateEmployee/deploy/sca_UpdateEmployee_rev1.0.jar
   [delete] Deleting directory /home/oracle/ant/code/hr/UpdateEmployee/dist
     [echo]
     [echo] ======================================================================
     [echo] DEPLOY COMPOSITE #3: UpdateEmployee
======================================================================
     [echo]
     [echo] oracle.home = /l01/apps/oracle/middleware/Oracle_SOA1/bin/..

deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/home/oracle/ant/code/hr/UpdateEmployee/deploy/sca_UpdateEmployee_rev1.0.jar
[deployComposite] Adding sar file - /home/oracle/ant/code/hr/UpdateEmployee/deploy/sca_UpdateEmployee_rev1.0.jar
[deployComposite] INFO: Creating HTTP connection to host:dev.raastech.com, port:8001
[deployComposite] INFO: Received HTTP response from the server, response code=200
[deployComposite] ---->Deploying composite success.
     [echo]
     [echo] **************************************************************
     [echo] *
     [echo] *  ANT TARGET NAME:  deployComposites
     [echo] *  FAILED PROCESS:   (none)
     [echo] *
     [echo] **************************************************************
     [echo]

BUILD SUCCESSFUL
Total time: 32 seconds

To get a copy of these scripts for Windows, check out the following link:

Sunday, May 8, 2011

Ant scripts for Oracle SOA Suite 11g code deployment (Windows)

This blog post provides Ant scripts that simplify the deployment, undeployment, and management of code to Oracle SOA Suite 11g. These scripts are designed for Windows (will release the Linux instructions soon). For those familiar with it, I do not use the configuration plan (long story).

Who these scripts are designed for:
  • Developers who want an automated approach to deploy/undeploy/manage code
  • App Admins who want to manage code from a Windows-based operating system

What you can do with the scripts:
  • Deploy multiple composites using a single Ant command
  • Undeploy multiple composites using a single Ant command
  • Start multiple composites using a single Ant command
  • Stop multiple composites using a single Ant command
  • List deployed composites
  • Tokenize and detokenize code
  • Import artifacts (XSDs, DVMs, WSDLs, fault policies) to the MDS
  • Export the entire MDS (for backup or browsing purposes)

To see how these scripts work, check out:


One-time Setup and Configuration

1. Download ant_soa11g_windows.zip from here

2. Unzip ant_soa11g_windows.zip to your local c:\ drive (it should exist as c:\ant)

3. Edit setEnvironmentVars.bat and modify the following:
CODE_FOLDER  <-- top-level directory where your code exists (e.g., c:\ant\code)
ORACLE_HOME  <-- directory of JDev 11g (e.g., c:\jdev11g)
JAVA_HOME    <-- ensure that the JDK path is correct
4. Edit soa-environment.properties and modify only the following variables:
wn.bea.home=C:/jdev11g              <-- directory of JDev 11g (similar to ORACLE_HOME above)
tmp.output.dir=c:/ant/temp          <-- temp directory for MDS generation, default is c:\ant\temp
local.mds.repository=c:/ant/apps    <-- location of local MDS copy (for MDS imports)
local.mds.export=c:/ant/apps.backup <-- location of local MDS backup folder (for MDS exports)
5. Double-click on winInstall.bat so that it copies the necessary JARs to the appropriate directories

6. For every SOA Suite 11g environment, create the following 3 files.
For example, if you have a DEV, TEST, and PROD environments, then create the following 9 files:
soa-build-dev.properties
soa-build-test.properties
soa-build-prod.properties
soa-cfgplan-dev.xml
soa-cfgplan-test.xml
soa-cfgplan-prod.xml
soa-token-dev.properties
soa-token-test.properties
soa-token-prod.properties
The ant_soa11g_windows.zip file includes samples for a DEV environment, so just make copies of those files for your other environments.
7. Edit all soa-build-*.properties and soa-token-*.properties files and modify the following:
USERNAME    <-- weblogic username (e.g., 'weblogic')
PASSWORD    <-- weblogic password
SOAHOST     <-- hostname or IP address of SOA Suite 11g server
SOAPORT     <-- port for the soa_server1 managed server (e.g., 8001)
DBUSERNAME  <-- MDS database username (e.g., 'dev_mds')
DBPASSWORD  <-- MDS database password
DBHOST      <-- database host
DBPORT      <-- database port
DBSID       <-- database name

Deploy, Undeploy, Start, Stop, and Detokenize Composites

1. Define the CustomProcessList.txt (see Define the Custom Process List below)

2. Open a command prompt window and type the following
cd c:\ant
call setEnvironmentVars.bat
call ant -f build.soa.xml <target> -Dtargetenv=<env>
Where <target> is deployComposites, undeployComposites, startComposites, stopComposites, or detokenizeComposites. This will loop through and perform the action against all the composites listed in the CustomProcessList.txt file.
Where <env> is your dev, test, or whatever environments you configured earlier.

List Composites

1. Open a command prompt window and type the following
cd c:\ant
call setEnvironmentVars.bat
call ant -f build.soa.xml listComposites -Dtargetenv=<env>
Where <env> is your dev, test, or whatever environments you configured earlier.

Export MDS

1. Open a command prompt window and type the following
cd c:\ant
call setEnvironmentVars.bat
call ant -f build.soa.xml exportMDS -Dtargetenv=<env>
Where <env> is your dev, test, or whatever environments you configured earlier.
2. The export file will be saved to c:\ant\apps.backup in the format of MDSbackup.<env>.YYYY-MM-DD-HHMI.jar (e.g., MDSbackup.dev.2011-01-20_1140.jar)


Import Artifacts to MDS

1. Define the CustomMDSList.txt (see Define the Custom MDS List below)

2. Add all the schemas, WSDLs, DVMs, fault policies, to the c:\ant\apps\<application> directory.
For example:
c:\ant\apps\App1MetaData\dvm\Currency.dvm
c:\ant\apps\App1MetaData\dvm\Country.dvm
c:\ant\apps\App1MetaData\config\fault-bindings.xml
c:\ant\apps\App1MetaData\config\fault-policies.xml
c:\ant\apps\App1MetaData\schemas\shared\Types.xsd
c:\ant\apps\App1MetaData\schemas\hr\Account.xsd
3. Open a command prompt window and type the following
cd c:\ant
call setEnvironmentVars.bat
call ant -f build.soa.xml importMDS -Dtargetenv=<env>
Where <env> is your dev, test, or whatever environments you configured earlier.

Define the Custom Process List

Before using any of these Ant scripts that are related to code, you must create a CustomProcessList.txt file.

1. Create the c:\ant\CustomProcessList.txt file, using the following format:
<composite_name>,<partition>,<revision>,<default_composite>,<relative_directory_of_code>

For example, the file may look like this:
HelloWorld1,default,1.0,true,hrprojects\employees\HelloWorld1
HelloWorld2,default,1.0,true,hrprojects\employees\HelloWorld2
HelloWorld3,hello99,2.0,false,hrprojects\test\synchronize\HelloWorld3
This says that there are 3 composites to loop through; HelloWorld1, HelloWorld2, and HelloWorld3. If deployed, the first 2 will be deployed to the 'default' partition and a revision of '1.0' while the last one will be deployed to the 'hello99' partition with a revision of '2.0'. The last composite will not be set as the default composite, designated by the value of 'false'.
  
The directory path shown is relative to the %CODE_FOLDER% environment variable set earlier. For example, if %CODE_FOLDER% is set to c:\ant\code, then the three projects above should exist in the following local directories:
c:\ant\code\hrprojects\employees\HelloWorld1
c:\ant\code\hrprojects\employees\HelloWorld2
c:\ant\code\hrprojects\test\synchronize\HelloWorld3

Define the Custom MDS List

Before using any of the Ant targets that are related to the MDS, you must create a CustomMDSList.txt file.

1. Create the c:\ant\CustomMDSList.txt file, using the following format:
<app_name>,false

For example, the file may look like this:
App1MetaData,false
App2MetaData,false
If you run the MDS import script, it will import the following local directory to its relative MDS directory as follows:
c:\ant\apps\App1MetaData  -->  oramds:/apps/App1MetaData
c:\ant\apps\App2MetaData  -->  oramds:/apps/App2MetaData
For example, you may have a combination of XSDs, DVMs, and fault policies as shown: 
c:\ant\apps\App1MetaData\dvm\Currency.dvm
c:\ant\apps\App1MetaData\dvm\Country.dvm
c:\ant\apps\App1MetaData\config\fault-bindings.xml
c:\ant\apps\App1MetaData\config\fault-policies.xml
c:\ant\apps\App1MetaData\schemas\shared\Types.xsd
c:\ant\apps\App1MetaData\schemas\hr\Account.xsd
When you run the MDS import script, because the CustomMDSList.txt file is referencing the local c:\ant\apps\App1MetaData directory, all files under that local directory will be imported to the MDS.

Adding Additional Tokens

The detokenizeComposites target loops through all code in your CustomProcessList.txt file, and detokenizes your code. For example, if your code has the following string @SOAServer@, the command below will replace it with whatever value is specified in the soa-token-*.properties file. This allows you to not hardcode values in your code.

If you want to add additional token variables, say @SomeEndpoint@, you must do the following:

1. Add the new token to the soa-token-*.properties file. For example:
SomeEndpoint = http://dev.raastech.com:7777
2. Edit build.soa.xml and add the token in two separate targets (detokenizeComposites and tokenizeComposites):
<replacefilter token="@SomeEndpoint@" value="${SomeEndpoint}"/> 
<replacefilter token="${SomeEndpoint}" value="@SomeEndpoint@"/>

Friday, May 6, 2011

Flawlessly upgrading to AIA Foundation Pack 11g

The latest release of the Oracle AIA Foundation Pack 11g is 11.1.1.4.

The AIA product development team has done a good job of ensuring that upgrading from AIA Foundation Pack 2.x to AIA Foundation Pack 11g is smooth. From an infrastructure perspective, this is not an in-place upgrade, so a completely new installation of AIA Foundation Pack 11g is required. Your SOA code will need to be modified accordingly to point to the new AIA Foundation Pack 11g environment and artifacts.

Based on a recent implementation, I can attest that modifying your code to take advantage of the upgraded AIA Foundation Pack 11g features and capabilities resulted in no broken code or rewrites needed.

CAVS Simulator

1. Simply modify the hostname and port from the 10g server to the 11g one. No other changes are needed.
10g:
http://soa10gserver:7777/AIAValidationSystemServlet/asyncrequestrecipient?wsdl

11g:
http://soa11gserver:8001/AIAValidationSystemServlet/asyncrequestrecipient?wsdl

CAVS Test Definitions

1. Log in to the AIA 2.x Console at http://soa10gserver:7777/AIA
2. Under 'Validation System', click "Go"
3. Export your CAVS test definitions
4. Navigate to the AIA 11g Console at http://soa11gserver:8001/AIA
5. Log in as the "weblogic" user (must have the 'AIAApplicationUser' group)
6. Under 'Composite Application Validation System', click on "Go"
7. Under the "Definitions" tab, select "Import", and choose the files to be imported

AIA System and AIA Error Notification

1. Log in to the AIA 2.x Console at http://soa10gserver:7777/AIA
2. Under 'Setup', click on "Go"
3. Click on "System"
4. Note all settings
5. Navigate to the AIA 11g Console at http://soa11gserver:8001/AIA
6. Log in as the "weblogic" user (must have the 'AIAApplicationUser' group)
7. Under 'Setup', click on "Go"
8. Click on "System", click on "Create", and use the values captured from the old environment
9. Click on "Error Notification", click on "Create", and use the values captured from the old environment

Async Error Handling BPEL Process

1. If any SOA code is using the the AIA Async Error Handling BPEL Process, modify the partner link urls as follows:
10g:
http://soa10gserver:7777/orabpel/default/AIAAsyncErrorHandlingBPELProcess/1.0/AIAAsyncErrorHandlingBPELProcess?wsdl

11g:
http://soa11gserver:8001/soa-infra/services/default/AIAAsyncErrorHandlingBPELProcess/client?WSDL
DVMs

1. If your code is using any of the DVMs, simply modify the lookup function and the DVM name as follows:
10g:
orcl:lookup-dvm ("CURRENCY_CODE", "Currency", "USD", "External", "Y")

11g:
dvm:lookupValue ("oramds:/apps/AIAMetaData/dvm/CURRENCY_CODE.dvm", "Currency", "USD", "External", "Y")
AIA Fault Policy

1. Simply add the AIA fault policy and bindings to the composite.xml immediately after the </service> closing element for each composite project you want it to apply to as follows:
<property name="oracle.composite.faultPolicyFile">
  oramds:/apps/AIAMetaData/faultPolicies/fault-policy.xml
</property>
<property name="oracle.composite.faultBindingFile">
  oramds:/apps/AIAMetaData/faultPolicies/fault-bindings.xml
</property>
AIAComponents (EBOs, EBMs, and WSDLs)

1. If you are importing EBOs, EBMs, or WSDLs in your code from AIA Foundation Pack 2.x, then update those references to import those objects from the MDS accordingly. For example:
10g:
<schema import="http://soa10gdev:77777/AIAComponents/EnterpriseObjectLibrary/Core/EBO/CustomerParty/V2/CustomerPartyEBM.xsd">

11g:
<schema import="oramds:/apps/AIAMetaData/AIAComponents/EnterpriseObjectLibrary/Core/EBO/CustomerParty/V2/CustomerPartyEBM.xsd">
XREF

1. Haven't done this, so can't speak to it.


Congratulations to the AIA product development team for making the upgrade flawless.

Ahmed Aboulnaga