Friday, April 27, 2012

Tuesday, April 24, 2012

OSB Alerts Data File Location

So I won't forget it again, OSB alerts are stored in a binary file

./servers/WLS_OSB1/data/store/diagnostics/WLS_DIAGNOSTICS000000.DAT

when it grows big, the OSB console takes long time to show alerts. You need to purge this file periodically.

A Few BPEL Java Embedding Notes

1. Error: SCAC-50012
    check \SCA-INF\classes\scac.log file to find more details.

    Common issues:

    #1.1) check that you added the proper import at the top of .bpel file
     
     for example (right after <:process ...> element, and before partner links   
     <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.math.*"/>
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="oracle.xml.parser.v2.*"/>   
    <bpelx:exec import="com.foo.bar.*"/>
    <bpelx:exec import="com.collaxa.cube.ws.wsif.providers.java.*"/>

     #1.2) check your syntax carefully. When in doubt, comment out as much as you can.

2. incorparte your own special classes and jars
    create your class jar file, place it under "SCA-INF/lib" folder

3. get/set your variables
    For simple string variables, it's straight forward. If you need to process the XML payloads, use forms like this:
 oracle.xml.parser.v2.XMLElement targetElem =
    (oracle.xml.parser.v2.XMLElement) getVariableData("myVarName", "payload",  "/ns3:foo/ns3:bar/ns3:car");  where "ns3" is defined precisely as it appears at the top of your .bpel file.

you can manipulate this element with functions, here are a few common functions: "getParentNode, getTextContent, cloneNode, setTextContent, insertBefore" etc.

4. if you need to debug, add some log entries using "addAuditTrailEntry".

Monday, April 9, 2012

OSB coherence cache localhost configuration

I have a standard localhost SOA 11.1.1.4 install. I have global result caching enabled (default) and i enabled result caching for my business service. However, the result is not cached.

I have checked coherence configure files under C:\Oracle\Middleware\user_projects\domains\soa_domain\config\osb\coherence, but I couldn't tell what's wrong.

I did some search and this link turned up: http://docs.oracle.com/cd/E17904_01/core.1111/e10106/ha_soa.htm

Here is the section (5.14.9) of the doc I followed to get mine to work:
  1. Log into Oracle WebLogic Server Administration Console. In the Change Center, click Lock & Edit.
  2. In the Domain Structure window, expand the Environment node.
  3. Click Servers. The Summary of Servers page appears.
  4. Click the name of the server (represented as a hyperlink) in the Name column of the table. The settings page for the selected server appears.
  5. Click the Server Start tab.
  6. Enter the following for WLS_OSB1 (on a single line, without a carriage returns):
    -DOSB.coherence.localhost=osbhost1vhn1 -DOSB.coherence.localport=7890 
    -DOSB.coherence.wka1= osbhost1vhn1 -DOSB.coherence.wka1.port=7890 
    -DOSB.coherence.wka2= osbhost2vhn1 -DOSB.coherence.wka1.port=7890
    
Except step 6 is not 100% clear, it should say to put the value into the "arguments" field. See screen shot.

I also adjusted the value for my specific case (by default, my OSB server is "osb_server1"):

-DOSB.coherence.localhost=localhost -DOSB.coherence.localport=7890 -DOSB.coherence.wka1= localhost -DOSB.coherence.wka1.port=7890 -DOSB.coherence.wka2= localhost -DOSB.coherence.wka1.port=7890

After that I restarted OSB server, and it worked.

BTW, you may need to adjust the port#. I think the number should match the config files under your_domain/config/osb/coherence/