Upload
raastech
View
31
Download
0
Embed Size (px)
Citation preview
COMPILING BPEL PROJECTS WITH ANT A White Paper prepared by Raastech
Author
Ahmed Aboulnaga
Copyright
Raastech 2009
COMPILING BPEL PROJECTS WITH ANT
Raastech White Paper 2 / 7
INTRODUCTION
This document describes deployment considerations and procedures for BPEL projects to simplify and automate code promotion. In specific, it describes how to configure your IDE (i.e., JDeveloper) to enable deployment via Ant, thus simplifying
This white paper is applicable to Oracle SOA Suite 10g (10.1.3.x) and Oracle JDeveloper 10g (10.1.3.3 or higher).
BPEL BUILD PROPERTIES
Every BPEL project should include the steps detailed in this section to support ant deployments. Developers can create a generic build.xml file following the steps below which would then be imported to every BPEL project.
1. In your main build.xml under your BPEL process, locate the line:
<target name="process-deploy" depends="validateTask, compile,
deployProcess, deployTaskForm, deployDecisionServices" />
Replace ‘compile’ with ‘compiletarget’:
<target name="process-deploy" depends="validateTask, compiletarget,
deployProcess, deployTaskForm, deployDecisionServices" />
2. Add the following 3 lines immediately before the <target name="compile"> line:
<target name="compiletarget">
<ant dir="${process.dir}/bpel"/>
</target>
3. Create a new build.xml under the /bpel directory (e.g., $bpel.home/bpel/build.xml). Customizable configuration is highlighted in red.
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="bpel.deploy" default="compile" basedir=".">
<target name="compile">
<bpelc input="${basedir}/bpel.xml"
out="${process.dir}/output"
rev="${rev}"
home="${bpel.home}">
<customize>
COMPILING BPEL PROJECTS WITH ANT
Raastech White Paper 3 / 7
<partnerLinkBinding name="PartnerLink_1">
<property name="wsdlLocation">
CustRegServiceSoapHttpRef.wsdl
</property>
<property name="location">
http://cpllc.info:7777/cust/CustRegServiceSoapHttp?wsdl
</property>
</partnerLinkBinding>
</customize>
</bpelc>
</target>
</project>
BPEL ANT DEPLOYMENT
Typically, deployment is performed by either the administrator or the Release Coordinator. However, developers must be comfortable with the process in order to support them as needed.
1. In the top level BPEL process deploy directory (e.g., c:\bpeldeploy), create property files per environment. For example:
ant-orabpel-dev.properties
ant-orabpel-test.properties
ant-orabpel-prod.properties
All parameters listed below need to be updated according to your environment. The format of the property file is:
################################################################################
## ##
## PRODUCTION ENVIRONMENT PROPERTY FILE ##
## ##
################################################################################
## ##
## This property file is based off of; refer to it for documentation: ##
## $ORACLE_HOME/bpel/utilities/ant-orabpel.properties ##
## ##
## This file is intended to be environment (e.g., dev, test, prod) specific. ##
## ##
################################################################################
#----------------------------------------
COMPILING BPEL PROJECTS WITH ANT
Raastech White Paper 4 / 7
# Use cluster/virtual hostname
#----------------------------------------
hostname = cpllc.info
#----------------------------------------
# Port
#----------------------------------------
http.port = 7777
#----------------------------------------
# Use local hostname
#----------------------------------------
j2ee.hostname = cpllc.info
#----------------------------------------
# Cluster
#----------------------------------------
cluster = false
#----------------------------------------
# Use OC4J container in non-cluster, use opmn cluster group for cluster (e.g.,
default_group)
#----------------------------------------
oc4jinstancename = oc4j_soa
#----------------------------------------
# Parameters usually requiring no change
#----------------------------------------
platform = ias_10g
http.hostname = ${hostname}
soapServerUrl = http://${hostname}:${http.port}
#----------------------------------------
# Use 'opmnctl status -l' to get RMI port for container
#----------------------------------------
rmi.port = 23791
#----------------------------------------
# Check 'opmn.xml' for the port request value
#----------------------------------------
opmn.requestport = 6003
#----------------------------------------
# Admin username/password
#----------------------------------------
admin.user = oc4jadmin
admin.password = welcome1
#----------------------------------------
# Default domain
#----------------------------------------
domain = default
#----------------------------------------
# Revision for BPEL process
#----------------------------------------
rev = 1.0
COMPILING BPEL PROJECTS WITH ANT
Raastech White Paper 5 / 7
#----------------------------------------
# Verbose
#----------------------------------------
verbose = false
#----------------------------------------
# For deploymnent of J2EE applications (e.g., ear/war files)
#----------------------------------------
apps = c:\SOASuite10g\j2ee\oc4j_soa\applications
default-web-app.dir = c:\SOASuite10g\j2ee\oc4j_soa\applications\..\default-web-app
#----------------------------------------
# Type $ORACLE_HOME/bpel/bin/obversion.sh to get values
#----------------------------------------
bpel.version = 10.1.3.1.0
bpel.build = PCBPEL_10.1.3.1.0_GENERIC_061009.0802
#----------------------------------------
# BPEL Home
#----------------------------------------
bpel.home = c:\SOASuite10g\bpel
#----------------------------------------
# Oracle Home
#----------------------------------------
oracle.home = c:\SOASuite10g\bpel\..
#----------------------------------------
# J2EE HOME Home
#----------------------------------------
j2ee.home = c:\SOASuite10g\bpel\..\j2ee\home
#----------------------------------------
# ias_10g appserver specific jndi.url
#----------------------------------------
jndi.url = opmn:ormi://cpllc.info:6003:oc4j_soa
#----------------------------------------
# ias_10g appserver specific jndi.InitialContextFactory
#----------------------------------------
jndi.InitialContextFactory = com.evermind.server.rmi.RMIInitialContextFactory
#----------------------------------------
# BPEL username/password/connect string
#----------------------------------------
orabpel.db.user = orabpel
orabpel.db.password = welcome1
orabpel.db.connect_string =
(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1
521)))(CONNECT_DATA=(SERVICE_NAME=cpdb.info)))
#----------------------------------------
# CLASSPATH
#----------------------------------------
client.classpath =
c:\SOASuite10g\bpel\..\j2ee\home\oc4jclient.jar;c:\SOASuite10g\bpel\..\j2ee\home\..\..\lib
\xml.jar;c:\SOASuite10g\bpel\..\j2ee\home\rmic.jar;c:\SOASuite10g\bpel\..\j2ee\home\..\..\
lib\dms.jar;c:\SOASuite10g\bpel\..\j2ee\home\oc4j.jar;c:\SOASuite10g\bpel\..\j2ee\home\lib
COMPILING BPEL PROJECTS WITH ANT
Raastech White Paper 6 / 7
\jmxri.jar;c:\SOASuite10g\bpel\..\j2ee\home\lib\javax77.jar;c:\SOASuite10g\bpel\..\j2ee\ho
me\admin_client.jar;c:\SOASuite10g\bpel\lib\orabpel.jar;c:\SOASuite10g\bpel\lib\orabpel-
common.jar;c:\SOASuite10g\bpel\lib\orabpel-thirdparty.jar
2. Update the bpel/build.xml file in the BPEL process and update any WSDL locations.
3. Set the environment:
set ORACLE_HOME=c:\SOASuite10g
set LD_LIBRARY_PATH=%ORACLE_HOME%\lib
set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\opmn\bin;%PATH%
set JAVA_HOME=%ORACLE_HOME%/jdk
set PROPERTY_DIR=c:\bpeldeploy
set BPEL_PROCESS=c:\bpeldeploy\SVN\BPELProcess1
4. Build and deploy the process (the steps below are 2 commands):
cd %BPEL_PROCESS%
%ORACLE_HOME%/ant/bin/ant -lib %ORACLE_HOME%/jdk/lib -propertyfile
%PROPERTY_DIR%\ant-orabpel-prod.properties
About Raastech:
Raastech specializes in information technology development and systems integration. Founded in 2009, Raastech provides management consulting, systems development, and integration to both federal agencies and commercial organizations. We provide value to our clients by being innovative and dependable partners in achieving their objectives. For more information, please visit http://www.raastech.com.
About the Author:
Ahmed Aboulnaga is a Technical Director at Raastech and has extensive experience in Oracle Fusion Middleware. He has been involved in the architecting and implementation of large scale systems involving middleware technologies such as Oracle SOA Suite, Oracle Application Integration Architecture, Oracle Data Integrator, Oracle Integration B2B, Oracle Identity Management, and numerous other Oracle middleware technologies.
COMPILING BPEL PROJECTS WITH ANT
Raastech White Paper 7 / 7
Raastech White Paper: Overview of the Oracle AIA Foundation Pack PIP Auditor September 2010
Raastech Headquarters: 2201 Cooperative Way, Suite 600 Herndon, VA 20171
www.raastech.com Copyright © 2010 Raastech, Inc. All rights reserved.