Package java classes (WSIF calls) in BPEL suitcase

Harm Verschuren

Introduction

Is it possible to package java classes which are invoked through WSIF along with the BPEL Suitcase generated by bpelc?

I’ve noticed that when generating and deploying the suitcase using JDeveloper (10.1.3.x) – the class files are compiled to the output directory and packaged in the suitcase, but when I run the same build.xml via Ant (ant deploy-process), the class files are missing in the output directory and thus missing in the suitcase

So, the question is what causes the difference and how can I achieve packaging the class files using Ant without Jdeveloper.

Apparently, the bpelc tasks can have nested elements of type zipfileset. (See the Ant documentation about this type). In here is the solution. Because there Oracle forgot to document and publish anything about the bpel ant tasks, I’ve decompiled the orabpel.jar package into it’s source files. By browsing through the files (Bpelc.java), you can find out what (command line) options are valid and what they are capable of (sort of).

Here is a how-to

You have to change the jdeveloper generated build.xml.

1st you have to add a “javac” task (if not already there) like below, and add it to build.xml:

<target name="java-compile" description="Compile Java source files">
   <echo>
--------------------------------------------------------------
| Compiling java source files
--------------------------------------------------------------
   </echo>
   <javac destdir="${process.dir}/output" encoding="UTF-8" source="1.5" target="1.5">
     <src path="src"/>
   </javac>
</target>

2. Extend target “process-deploy” to depend it on target “java-compile”.

It is important that the java gets compiled before the bpelc is executed. Like so:

<target name="process-deploy"
        depends="validateTask, java-compile, compile, deployProcess, deployTaskForm, deployDecisionServices" />

3. Change the bpelc task by including a nested classes element that includes your class files, like so:

<bpelc input="${process.dir}/bpel/bpel.xml"
       out="${process.dir}/output"
       rev="${rev}"
       home="${bpel.home}">
   <classes dir="${process.dir}/output" includes="**/*.class"/>
</bpelc>

When you run target “process-deploy”, the class files are added to the bpel suitcase.

Further notice

Naturaly, if your class files are so generic that there can be used in other BPEL processes as well, the better option would be to jar the classes separately and put them in the $BPEL_HOME/lib directory where they are usable to all BPEL processes on the instance. This is instead of redundantly packaging the same classes in each BPEL suitcase.

Next Post

Used port numbers by the Oracle OEM agent

This is definitly a post worthy as one of the members of the BAAG. The work was extensive (setup, config, install, checking) and afterwards the outcome could have been predicted, but I definitly know now what portnumbers are allocated by the Oracle Enterprise Manager Agent version 10.2.0.3.0 for SUSE 9.2 ES Linux (I386, 32bit).I was wondering what those portnumbers were. In a customer enviroment, which uses multiple segments between (V)LAN's, firewall rules are being applied. So imagine multiple LAN's within a company which are defined by different ranges and trafic between them are controlled by multiple firewall rules / settings.My Oracle Enterprise Manager Grid control, version 10.2.0.3.0, must be able to contact it's OEM agents on one off those different network segments. I could not get this working so I asked the responsible network administratorfor advise. He didn't had the time for it, to setup and / or trace it properly; therefore left the problem for me to solve ('it's Oracle stuff anyway" - "aren't you be able to read it somewhere in one of the Oracle manuals"). Long story short...Which port numbers have to be defined in the firewall to enable traffic between the Oracle Management Server and the Oracle Enterprise Manager Agent?