Thursday, 15 September 2016

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");
}

No comments:

Post a Comment