Wednesday, November 9, 2011

Oracle SOA Suite 10g to 11g Migration – Migrating XREF Runtime Data.

Oracle SOA Suite 10g to 11g Migration – Migrating XREF Runtime Data:


If you have Oracle SOA Suite 10g cross reference (XREF) runtime data in an Oracle database (oraesb.XREF_DATA) then the same needs to be migrated to Oracle SOA Suite 11g (SOAINFRA.XREF_DATA).

The utility is required, as the XREF database schema table (XREF_DATA) has changed for Oracle Fusion Middleware 11g.
We had around 12 million records in our 10g environment and used the utility 

Upgrade10gXrefTo11gXref.sql provided by oracle to migrate the data.
This utility is using the DBLINK to get the data from 10g database because of this the migration was taking more time and could not able to complete.

We have done some modification to the SQL utility based our requirement and we were able to migrate the data successfully within 9hrs of time.
Instead of using the DBLIINK, we have used the Oracle DataPump Utility to transfer the data from Oracle SOA 10g database to Oracle SOA 11g database schema(SOAINFRA –Where the 11g XREF data is available ) and used the local table in the utility script.

The steps to execute the script:

- Using Oracle DataPump Utility, transfer the data from the table oraesb.XREF_DATA of SOA 10g source database to SOA 11g destination database table SOAINFRA.XREF_DATA_MIGRATION (the schema where the 11g XREF data is available).
- Change the MDS location 'oramds: /apps/EAIMetaData/Xref/' in the script, location where the XREF meta data has stored, with your value.
- Log in to Oracle database that hosts the Oracle SOA 11g XREF data as the SOAINFRA user and execute the script.
@Upgrade10gXrefTo11gXref.sql

All the corrupted/duplicated data will be inserted into the table XREF_DATA_CORRUPTED.
Refer the script attached with this blog

Upgrade10gXrefTo11gXref.sql


Sunday, November 6, 2011

Oracle SOA Suite - Abstract WSDL - Resolving the composite dependency issue during deployment and server restart.

Oracle SOA Suite - Abstract WSDL - Resolving the composite dependency issue during deployment and server restart:


Dependency order is not recorded in SOA Suite for composites. So, during server start-up, there might be multiple retries before all composites are loaded to the server if a wrong dependency order is followed by the server.
This does not necessarily mean the composites are not loaded at all, but server may end up trying to load a composite multiple times before it is finally succeeds after restart. This results in multiple errors in logs and also overall time taken for restart. E.g., as seen in the diagram below, if the server tries to load A before B and C are deployed then the composite loading fails. This can also happen during deployment time if there is a circular dependency between composites.


Solution to this problem is isolating design time and runtime dependencies. This can be done by moving WSDL dependencies to abstract WSDL’s. We can store the abstract copies of all such WSDL’s in MDS.
Consider the XML snippets below which can be found in composite.xml.
<reference name="SubmitOrderToCOMPASSRS" ui:wsdlLocation="http://eaidev2:8004/soa-infra/services/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl">

<binding.ws port="******" location="http://eaidev2:8004/soa-infra/services/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM.SubmitOrderToCOMPASSRS_ep?WSDL" soapVersion="1.1">


ui:wsdlLocation signifies design time and binding.ws stands for runtime.
So, we need to change the value in ui: wsdlLocation, so that it refers to MDS rather than the deployed component through http. The changed value should look something similar as below to point it to MDS.
oramds:/apps/EAIMetaData/Abstract/WSDL/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl
By following the approach, during compile time the compiler finds all the references it needs and the runtime engine does not bother about the abstract WSDL’s once it is loaded. So for both initial deployment and subsequent server restarts this approach helps in avoiding design time dependencies.


Friday, November 4, 2011

Oracle SOA Suite 11g – Enabling the Test button in EM Console for the Composites initiated by the Polling Adapters (MQ, DB).

Oracle SOA Suite 11g – Enabling the Test button in EM Console for the Composites initiated by the Polling Adapters (MQ, DB).


In 11g the Test button in EM Console for the Composites initiated by the Polling Adapters like DB and MQ (Components that are initiated by DB/MQ Pollers) are not enabled by default but in 10g it was enabled by default.


In some scenarios we may need to test these (Composite initiated by polling) composites manually from EM console instead of polling the data from target.
By following the below steps the test button in EM console can be enabled for the Composites initiated by Poller.
1. Open the Composite.xml design view in JDeveloper.
2. Drag and drop web service from service Adapters to the Exposed Services section of the Composite.xml



Wednesday, November 2, 2011

Oracle SOA Suite 11g - Common adf-config.xml to deploy all the composites to different environments through ANT.

Oracle SOA Suite 11g - Common adf-config.xml to deploy all the composites to different environments through ANT.


The common adf-config.xml file can be used to deploy all the composites instead of using the adf-config file from the individual composite applications.
The adf-config file configurations can be changed at runtime through ant script to deploy the composites to different environments.

By this approach, we can reduce the maintenance of individual adf-config files also by using the same adf-config file the composites can be deployed to different environments.

1. Copy.adf folder from any of the Composite application to the common location.


2. Change the contents of the adf-config.xml with below contents (change the file according to your requirement.)
<?xml version="1.0" encoding="windows-1252" standalone="no"?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:adf="http://xmlns.oracle.com/adf/config/properties" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:sec="http://xmlns.oracle.com/adf/security/config">
<adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
<defaults useBindVarsForViewCriteriaLiterals="true"/>
<startup>
<amconfig-overrides>
<config:Database jbo.locking.mode="optimistic"/>
</amconfig-overrides>
</startup>
</adf-adfm-config>
<sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
</sec:adf-security-child>
<adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
<mds-config xmlns="http://xmlns.oracle.com/mds/config">
<persistence-config>
<metadata-namespaces>
<namespace metadata-store-usage="mstore-usage_2" path="/apps/EAIMetaData"/>
<namespace metadata-store-usage="mstore-usage_3" path="/soa/shared"/>
</metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage id="mstore-usage_2">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="jdbc-userid" value="@db.user@"/>
<property name="jdbc-password" value="@db.password@"/>
<property name="jdbc-url" value="@db.url@"/>
<property name="partition-name" value="@partition@"/>
</metadata-store>
</metadata-store-usage>
<metadata-store-usage id="mstore-usage_3">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="jdbc-userid" value="@db.user@"/>
<property name="jdbc-password" value="@db.password@"/>
<property name="jdbc-url" value="@db.url@"/>
<property name="partition-name" value="@partition@"/>
</metadata-store>
</metadata-store-usage>
</metadata-store-usages>
</persistence-config>
</mds-config>
</adf-mds-config>
</adf-config>


Tuesday, November 1, 2011

Oracle SOA Suite 10g to 11g Migration - Unable to access the following endpoint : REPLACE_WITH_ACTUAL_URL

Unable to access the following endpoint : REPLACE_WITH_ACTUAL_URL:


The invocation of the synchronous web service from the composite has failed with the following error after migrating the code to Oracle SOA Suite 11g.

"Unable to access the following endpoint : REPLACE_WITH_ACTUAL_URL"

After a long struggle ,we have identified the issue .The issue was with the callback interface was wrongly configured with the value same us interface during the migration in the composite.xml and the component files of the composite that invokes the web service(synchronous) that doesn't support any callback .

Composite.xml with callback configured as same as interface:


Component file with callback configured as same as interface:




Oracle SOA Suite 10g to 11g Migration - Unable to register a service endpoint for a defined reference callback

Unable to register a service endpoint for a defined reference callback:

The invocation of the asynchronous web service from the composite has failed with the following error after migrating the code to Oracle SOA Suite 11g.

"Unable to register a service endpoint for a defined reference callback. Please ensure the WSDL and reference configuration are correct".

After a long struggle ,we have identified the issue .The issue was with the callback interface was wrongly configured with the value same us interface(no separate callback port is defined in the WSDL) during the migration in the composite.xml and the component files of the composite that invokes the asynchronous web service that doesn't have any callback defined.

Composite.xml with callback configured:



Component file with callback configured:





Oracle SOA Suite - Viewing Performance Metrics Using Fusion Middleware Control(EM)

Oracle SOA Suite - Viewing Performance Metrics Using Fusion Middleware Control (EM)

If you encounter a problem, such as an application that is running slowly or is hanging, you can view more detailed performance information, including performance metrics.

Oracle SOA Suite 11g:


Monitoring the performance of an Oracle WebLogic Server
1. Login to the EM console - domain.
2. Select the server to monitor.
3. The Managed Server home page is displayed.
4. From the WebLogic Server menu, choose Performance Summary
5. The Performance Summary page is displayed. 



6. To see additional metrics, click Show Metric Palette and expand the metric Categories in the right side panel.
7. To view the metrics about data source select the Data Source Metrics and the data source that need to be monitored and the required metrics data from the right panel, the metrics details will be displayed in left panel.