Mediator

Installing Oracle SOA Suite 12c


Hi All,

As you all know that the Oracle 12c is out now… this is the first Major release where oracle has now combined the Oracle Service Bus with the SOA Suite Install… and its apparently only a 30 min single installation…

So firstly download the soa suite  from http://download.oracle.com/otn/nt/middleware/12c/121300/fmw_12.1.3.0.0_soaqs_Disk1_1of1.zip

This contains

SOA Suite 12.1.3 Size: 2.97 GB, Check Sum: 1579850769

Note: The generic SOA Suite Quick Start Installer for developers is used on all platforms. It allows you to quickly install a development or evaluation environment on a single host computer. It includes Oracle BPEL Process ManagerOracle Human WorkflowOracle Business Rules, Oracle Mediator, Oracle Service BusTechnology Adapters Oracle Enterprise Scheduler, SOA Spring Component, Enterprise Manager Fusion Middleware Control, Oracle JDeveloper with SOA IDE extensions and an integrated WebLogic Server and Java DB.

You can see the official quick start guide at http://docs.oracle.com/middleware/1213/core/SOAQS/integrated.htm#BEIJCGGE

Few things to note are

It needs JDK 1.7 so I downloaded (64 Bit) that from http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-windows-i586.exe

Next Set your JAVA_HOME

SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_60

For Linux

JAVA_HOME=$HOME/top_level_folder_jdkversion
export JAVA_HOME

Now we are all set to go….Open Command Prompt.

 IMPORTANT: It needs you to run that in admin mode.

Search for cmd.exe in the Start menu. Right-click the cmd.exe and select Run as Administrator.

In the command prompt, use the Java executable from the JDK on your system. Your command may look like this:

%JAVA_HOME%\bin\java -jar fmw_12.1.3.0.0_soa_quickstart.jar I did this and got the error in the screenshot… soa8
Note by default windows installs to Program files location which has a space so I had to use “” with “JAVA_HOME” and then it fired just fine. C:\Nitin\SOA\SOA12c>”%JAVA_HOME%”\bin\java -jar fmw_12.1.3.0.0_soa_quickstart.jar

soa7

soa6

soa5

soa4

soa3

That’s it now it’s time to sit back and relax….

soa2

soa1

soa11

Once you hit finish it launches Jdeveloper for the first time… Prompts to select the role I chose the studio role and allowed to import preferences from my previous installs which is optional.

soa10

soa9


ALL DONE…. Happy Developing….

Please leave your feedback in comments.

Running Mediator instances issue


We encountered an issue with one of our clients when the SOA Purge wasn’t being very effective due to the running mediator instances even though the rest of the flow trace had completed, This wasn’t an issue for business as such however in most cases caused them to fall out of the criteria for Purge due to the state in which these mediator instances were in.

This should not cause much of a problem to clients who have are low on volumes, however for any of the larger clients where the daily volumes runs into Millions this can be a big problem.

As always the first step to solving a problem lies in the identification of the root cause so we wrote the following query to identify any running Mediator instances when the composite itself has completed.

Query to be run on the SOA Infra DB (SOA 11g).

SELECT comp.*
FROM mediator_instance mi,
 composite_instance comp,
 cube_instance ci
WHERE mi.composite_instance_id = comp.id
AND mi.composite_creation_date > (sysdate - 12) -- select the number of days you want to run this for
AND comp.CREATED_TIME > (sysdate - 12) -- select the number of days you want to run this for
AND comp.state IN (1,3,9,11,17,19,21,23,25,27,29,31)
AND mi.component_state IN (1,2,8)
AND ci.cmpst_id = comp.id
AND ci.creation_date > (sysdate - 12)
AND ci.state IN (4,5,6,7,8,9,10)
ORDER BY comp.created_time;

For a list of what these states mean and stand for refer to my earlier post https://nitinaggarwal.wordpress.com/2013/06/12/soa-11g-soa-infra-db-states-for-soa-composites-and-components/

Once you have identified the various composites you can then look the details up using the EM or writing further DB queries.

In most cases the problems lies in the way the code is written and hence needs to be fixed.

In certain scenarios we noticed that if for instance a Bpel calls a mediator (sequentially) and there is a fault in that mediator calling a reference.

Due to the fault policies the bpel would re try as configured which would then initiate another call to the mediator and might recover in this case if the root cause is resolved.

As a result of the above the composite will be marked as completed however that did not update the status of the mediator instances and left them either running or one of the other non purgeable states.

There isn’t much you can do in this scenario as with SOA 11.1.1.4 there isn’t an option to abort specific components and you can’t abort a composite which is already completed.

Having speaking to my contacts I found out that there is another similar bug in SOA 11.1.1.7 product and a fix will be made available as part of early patches to the 11.1.1.7 release.

One work around for such a scenario is to Un-deploy or Re-deploy the composite which will mark all the instances as stale and thus make them eligible for purging.

For most other cases we implemented some code changes that got rid off any such occurrences.

Also implemented a lot of performance tuning changes to the engine settings which helped us a lot, but the details for those will come in a later post.

SOA 11g SOA Infra DB states for SOA Composites and Components


I found this extremely useful list of states for SOA 11g composites and various components in the SOA INFRA DB which we have benefited greatly in various engagements, so I thought it was worth sharing with you all.

 

COMPOSITE_INSTANCE States

State Description

0

Running

1

Completed

2

Running with faults

3

Completed with faults

4

Running with recovery required

5

Completed with recovery required

6

Running with faults and recovery required

7

Completed with faults and recovery required

8

Running with suspended

9

Completed with suspended

10

Running with faults and suspended

11

Completed with faults and suspended

12

Running with recovery required and suspended

13

Completed with recovery required and suspended

14

Running with faults, recovery required, and suspended

15

Completed with faults, recovery required, and suspended

16

Running with terminated

17

Completed with terminated

18

Running with faults and terminated

19

Completed with faults and terminated

20

Running with recovery required and terminated

21

Completed with recovery required and terminated

22

Running with faults, recovery required, and terminated

23

Completed with faults, recovery required, and terminated

24

Running with suspended and terminated

25

Completed with suspended and terminated

26

Running with faulted, suspended, and terminated

27

Completed with faulted, suspended, and terminated

28

Running with recovery required, suspended, and terminated

29

Completed with recovery required, suspended, and terminated

30

Running with faulted, recovery required, suspended, and terminated

31

Completed with faulted, recovery required, suspended, and terminated

32

Unknown

64

Any value in the range of 32 to 63 indicates that the composite instance state has not been enabled, but the instance state is updated for faults, aborts, etc.

CUBE_INSTANCE States

State Description

0

STATE_INITIATED

1

STATE_OPEN_RUNNING

2

STATE_OPEN_SUSPENDED

3

STATE_OPEN_FAULTED

4

STATE_CLOSED_PENDING_CANCEL

5

STATE_CLOSED_COMPLETED

6

STATE_CLOSED_FAULTED

7

STATE_CLOSED_CANCELLED

8

STATE_CLOSED_ABORTED

9

STATE_CLOSED_STALE

10

STATE_CLOSED_ROLLED_BACK

 

MEDIATOR_INSTANCE

STATE Description
 0  No faults but there still might be running instances
 1  At least one case is aborted by user
 2  At least one case is faulted (non-recoverable)
 3  At least one case is faulted and one case is aborted
 4  At least one case is in recovery required state
 5 At least one case is in recovery required state and at least one is aborted
 6 At least one case is in recovery required state and at least one is faulted
 7 At least one case is in recovery required state, one faulted and one aborted
 >=8 and < 16  Running
>= 16  Stale

 

Referenced from https://blogs.oracle.com/dasoa/entry/list_of_all_states_from