Custom Search SOABYTE here

Thursday, February 25, 2010

11g Fault Policy Java Handler/Where to add custom classes and jars

Im trying to use fault policies in 11g and in fault policies want to catch the remote faults and pass it to a custom java handler.
in Custom Handler use IFaultRecoveryJavaClass and also BPELFaultRecoveryContextImpl , i want to pick fault information
and pass store it in DB...

i placed the client jar file in \user_projects\domains\base_domain\lib

Duuring runtime the server is able to Pick the IFaultRecoveryJavaClass but not BPELFaultRecoveryContextImpl
is there anything im missing ?

To have your custom classes access to the classes in orabpel.jar you have to do the following steps.

1. Go To /soa/soa/modules/oracle.soa.bpel_11.1.1
2. Take a backup of oracle.soa.bpel.jar and Un Jar it.
3. It will have only the MANIFEST.MF which has all the classes needed for BPEL Engine
4. Edit the Class-Path Attribute in the Manifest file to have your custom Jar as Below
Class-Path: ./bpel1-1-xbeans.jar ./orabpel-common.jar ./orabpel.jar ./
bpel_coherence_config.jar ./orabpel-exts.jar ./thirdparty.jar ./bpm-a
nalytics.jar ./orabpel-thirdparty.jar ./wsif-binding.jar ./orabpel-va
lidator.jar ./../../../../../Custom/lib/SoaExtensions.jar (*It should be relative path to the jar file*)
5. Jar it again with only the MANIFEST.MF in it. (Command: jar -cvfm oracle.soa.bpel.jar ./META-INF/MANIFEST.MF)
6. Restarting Managed Server alone will do, But to be Kind enough restart Admin and Managed Servers.

Then your classes are loaded by the same classloader.
Our method of using this fix is to "drop" the custom compiled jar into the same directory and just add the ./$compiledLibraryName.jar to the manifest classpath
As an altenative apporach to the above, a simpler approach can be adopted to save having to unjar / manually edit SOA jar files. A SOA Extension library has been provided in /soa/modules/oracle.soa.ext_11.1.1 to allow for custom jars and classes to be loaded. This is documented in (Section 13.3 - Adding Custom Classes and JAR Files)

To implement this approach:

1) cd to /soa/modules/oracle.soa.ext_11.1.1
2) Copy in your custom fault handler jar file
3) run ant against this directory. This will run the build.xml file located in teh above directory
4) Restart the Server

A "readme" file, within the above directory, provides the instructions that will add the custom jar to manifest of oracle.soa.ext.jar that is picked up the class loader for all user defined custom jars.



Anonymous said...

what if there is no build.xml file under oracle.soa.bpel_11.1.1?

Mervin Parmar said...

I'am planning to join Oracle certified course. I want some expert advice whether i should go for it or not.
oracle training in chennai|oracle training institutes in chennai|FITA Chennai


Post a Comment

Blogger Profile