Pages

Translate

Tuesday, February 3, 2009

Oracle BPEL Remote Deployment using Ant

In the last post, we have seen how to compile & deploy the Oracle BPEL & ESB processes in the local OAS (Oracle Application Server on SOA Suite 10.1.3.3) using automated Ant build scripts. In this blog, I will try to explain the remote server deployment of Oracle BPEL processes.

This essentially means that we will be able to run the Ant build script on local machine & deploy the compiled code on to remotely located servers on the network. To explain this with a practical scenario, we can have a build server which has the completed build setup with 2 build scripts - One which will run at regular time intervals (Daily) to check for the integrity of builds & another which can be triggered at desired time to deploy on to test environments.

The following segment of code must be added on to the build script which does the remote server deployments.

Step 1:
Download the classes here and place them in the following location;

$Oracle_SOA_Home\bpel\system\classes\com\collaxa\cube\ant\taskdefs

Step 2:
Add the following task definition to your Ant build script.

<taskdef classname="com.collaxa.cube.ant.taskdefs.RemoteDeployOverHttp"
name="deploySuitcase">


Step 3:

Compile all the required BPEL processes, so that the corresponding jar files are generated in the output folders.

Step 4:

Add a target element in the Ant build script as shown below, which takes care of deploying the compiled BPEL processes to the remote Oracle SOA @ the domain specified.

<target name="deploy">
<deploySuitcase host="$host_ip" port="$SOA_port"
domain="default" password="$SOA_pwd">
<fileset dir="${basedir}">
<include name="bpel_Process1_1.0.jar"/>
</fileset>
</deploySuitcase>
</target>

The host_ip, SOA_port, SOA_pwd are parameters that will be extracted from the external properties file during run-time.

The <deploySuitcase> is the custom Ant task which takes care of deploying the jar files of compiles BPEL processes defined within the <fileset> element. You can included any number of BPEL jars that will be deployed to the remote server specified.

Courtesy: Clemen's SOA Blog

4 comments :

  1. I unzipped the files on my laptop at SOA_HOME\bpel\system\classes\com\collaxa\cube\ant\taskdefs
    But I still get this error,
    taskdef class com.coll
    axa.cube.ant.taskdefs.RemoteDeployOverHttp cannot be found.

    ReplyDelete
  2. I added the classpath attribute to taskdef and it found the class. Now I am getting specific deploySuitcase error.

    [deploySuitcase] log4j:WARN No appenders could be found for logger (org.collaxa.
    thirdparty.apache.commons.httpclient.HttpClient).
    [deploySuitcase] log4j:WARN Please initialize the log4j system properly.
    [deploySuitcase] login failed! Check password and domain attributes.
    [deploySuitcase] Unable to login to the default domain.

    ReplyDelete
  3. Hi,

    In your Ant build file, check whether you have provided the valid username & password of your SOA login. Seems like the login has failed due to a pwd /domain attributes mismatch.

    ReplyDelete
  4. you have a nice site. thanks for sharing this valuable resources. keep it up. anyway, various kinds of ebooks are available here

    http://feboook.blogspot.com

    ReplyDelete