Tuesday, 20 September 2016

programmatically extracting performance metrics of OSB Proxy Service via the ServiceDomainMBean

Hi,

I was looking for understanding performance statics of OSB proxy and business services.

I am successful by enabling the monitoring of proxy service and business service components from sbconsole.
I was looking for how to extract performance metrics of OSB ProxyService programmatically through scripts.

I have found the article very helpful and thought of sharing.

Please find the sample demonstration I have created here.

It still has one open issue:

"Most of the information that is shown in the Service Monitoring Details page can be retrieved via the ServiceDomainMBean. This does not apply to the Action Metrics (unfortunately)."

Thursday, 15 September 2016

OSB Service virtualization & Error Recovery & Location Transparency

There are couple of times I was unclear while trying to understand OSB load balancing & Error recovery algorithms. So thought of collecting them in a post.


Service Virtualization:
When an external service has hosted on more than one host, the OSB business Service component will route the requests/load on active hosts.

There are couple of load balancing algorithms to support this.

Load balancing Algorithms:
The order in which the business service calls or retries the endpoints controlled by load-balancing algorithm.

- Round Robin:
This dynamically orders the URLs that we enter in Endpoint URI field.

- Random:
This randomly orders the list of URLs that we enter in Endpoint URI field.

- Random-weighted:
This randomly orders the list of URLs that we enter in Endpoint URI field but some retried more than others based on value that we enter in Weight filed.

- None:
No load balancing occurs. The first URI Endpoint is always used unless it is unavailable.



Error recovery options:

- retry count: The retry option specifies for maximum number of times a business service can attempt the URI provided.
If the value 0, business service never retries after failure.

- retry count interval: wait time in minutes after retring all endpoints per count

Using preferences/properties/constants in SOA or OSB

I was looking to create a property and access across all SOA composites.

I have found below components,

1. DVM : Can be used across all SOA composites and can be changed through soa composer. While exploring a bit more, the understanding is it has a lot of performance impact.

2. bpel preferences: Can be defined only at a BPEL level and can be modified from EM.

<property name="bpel.preference.myPreference" type="xs:string" many="false">1</property>

So my requirement falls under 3 category and ended up with below work around.

3. Define a system property at JVM level and use across SOA (java Embedding activity) or OSB (java callout activity).
- Create a variable: sysProp, type:String

- Create a java Embedding activity and copy below code.

String sysProp = System.getProperty("sysProp");

if(sysProp != null && sysProp.equalsIgnoreCase("true")) {
setVariableData("sysProp","true");
}  else {
setVariableData("sysProp","false");
}

Friday, 2 September 2016

Import and export OSB projects using WLST python or jython scripts

OSB Administration using WLST
-----------------------------

1.
download script files from below URL:

2.
unzip import-export.zip

3.
change export.properties, import.properties with our server details.

4.
set environment homes to use WLST.
my option: source $DOMAIN_HOME/bin/setDomainEnv.sh

export.py :- provides how to export OSB projects.
import.py :- provides how to import OSB projects.

5.All set to export and import
export all projects:
java weblogic.WLST /oracle/learn/osb/wlst/import-export/export.py export.properties

export Specific project:
DemoAnyXml :- project name
export.properties :- configuaraitons
java weblogic.WLST /oracle/learn/osb/wlst/import-export/export.py export.properties DemoAnyXml

import OSB jar.
java weblogic.WLST /oracle/learn/osb/wlst/import-export/import.py import.properties

import osb jar with customizing speicific project
java weblogic.WLST /oracle/learn/osb/wlst/import-export/import.py import.properties DemoAnyXml

Thursday, 1 September 2016

Setting SOA Audit level from Jdev

Composite:
<property name="auditLevel" type="xs:string" many="false" override="may">Production</property>

Bpel:
<property name="bpel.config.auditLevel">Production</property>