Software Development Lifecycle und die Oracle SOA Suite 10g

advertisement
Software Development Lifecycle und die
Oracle SOA Suite 10g
Guido Schmutz
Technology Manager
Principal Consultant / Partner
guido.schmutz@trivadis.com
Basel
·
Baden
·
Bern
·
Lausanne
·
Zürich
·
Düsseldorf
·
Frankfurt/M.
·
Freiburg i. Br.
·
Hamburg
·
München
·
Stuttgart
·
Wien
Introduction
Guido Schmutz
Working for Trivadis for 12 years
Co-Author of different books
Consultant, Trainer Software Architect for Java, Oracle, SOA
and EDA
Member of Trivadis Architecture Board
Trivadis Technology Manager
More than 20 years of software development experience
Contact: guido.schmutz@trivadis.com
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Agenda
Introduction
BPEL Lifecycle Management
ESB Lifecylce Management
Summary
Data are always
part of the game.
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Fusion Middleware – Oracle SOA Suite 10.1.3.4
BPA Suite
MANAGEMENT
&
Analyst
MONITORING
Tools
JDeveloper
BAM
ROUTING
&Business
ORCHESTRATION
Events
Analytics
Monitoring
BPEL Process Manager
Human
Workflow
Native
BPEL
App Dev
Framework
Business
Rules
DATA SERVICES &
MultiCONNECTIVITY
XSLT
Routing
System
GOVERNANCE
Monitoring
Web Services
Manager
Management
Enterprise Service Bus
Protocol
Adapters
Transform
ODI
B2B
Apps DB Bulk ETL Partners
Messaging
Enterprise
Manager
BI
SES
RFID
Security
Metadata
Repository
Registry
Discovery
Policies
J2EE Application Server
Oracle AS, JBoss, WebLogic, WebSphere
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Use Case
DB Connection
Settings
CustomerService
CreditCardService
OrderService
Folder Name
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Web Service
Location
Deployment – The challenge so far (before 10.1.3.4)
Deploying a SOA Project to a different environment (Test,
Development, Production) requires changes to the project
Location of services
Port numbers of services
Location of hosted WSDLs
Location of hosted XSDs
...
Changes have to be made in various files
Changes have to be made manually
Often need a different artifact (BPEL suitcase, ESB suitcase) for
each environment
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Agenda
Introduction
BPEL Lifecycle Management
ESB Lifecylce Management
Summary
Data are always
part of the game.
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
BPEL normal deployment steps
!
"
#
#
Using “Deploy” in JDeveloper
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
compile
deploy
BPEL Suitcase
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Delivery
Queue
Engine
Dehydaration
WSIF Framework
Server
BEPL Project
JDeveloper / Ant Scripts
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Deploying to multiple environments
Deploying a BPEL suitcase to other environments
uses same configuration
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Engine
CustomerService.wsdl
Dehydaration
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
loy
p
de
WSIF Framework
Dev Server
bpel.xml
d
BPEL Suitcase eplo
y
Delivery
Queue
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Engine
Delivery
Queue
Dehydaration
WSIF Framework
Test Server
OrderService.wsdl
JDeveloper / Ant Scripts
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Deploying to multiple environments
Configuration can be
changed, but must
be done manually
Many settings in
many files to change
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
deploy
Software Development Lifecycle und die Oracle SOA Suite 10g
Dehydaration
WSIF Framework
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Filenames are
always different for
each project making
scripting difficult
Results in multiple
suitcases (same
files, different
settings)
Engine
Delivery
Queue
Dev Server
Parterlink WSDL location:
http://testhost:7777/orabpel/CreditService?wsdl
deploy
Engine
Delivery
Queue
Dehydaration
WSIF Framework
Parterlink WSDL location:
http://testhost:7777/orabpel/CreditService?wsdl
Test Server
© 2008
Solution: the Deployment Plan (since 10.1.3.4)
Allows users to develop in one environment (possibly using
JDeveloper) and then – without touching the code – deploy the
suitcase to another environment
Holds configuration for one environment
Instead of managing separate suitcase files, the user generates a
deployment plan from a suitcase and modifies the configuration for
each environment
Eliminates the need to provide customized suitcases for each
environment
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Deploying using Deployment Plan
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Parterlink WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Engine
te
crea
Delivery
Queue
Dehydaration
deploy
WSIF Framework
deploymentPlanDEV.xml
Dev Server
compile
Parterlink WSDL location:
http://testhost:7777/orabpel/CreditService?wsdl
BEPL Project
crea
t
deploymentPlanTEST.xml
e
deploy
Engine
Delivery
Queue
Dehydaration
WSIF Framework
Parterlink WSDL location:
http://testhost:7777/orabpel/CreditService?wsdl
Software Development Lifecycle und die Oracle SOA Suite 10g
Test Server
© 2008
Deployment Plan
You can replace the following attributes and properties
Configuration properties in the BPEL deployment descriptor
(bpel.xml)
Partner link binding property in bpel.xml file
schemaLocation attribute of an import in a WSDL file
location attribute of an include in a WSDL file
schemaLocation attribute of an include, import and refine in an
XSD file
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Creating a Template Deployment Plan
add the following commands to the build.xml ant file that is
build by JDeveloper for the BPEL project
Creates the deployment plan either directly from project files or from a
generated suitcase
<target name="generate_plan_from_project">
<generateplan planfile="${process.dir}/templ-planfile.xml"
verbose="true"
overwrite="true"
descfile="${process.dir}/bpel/bpel.xml"/>
</target>
<target name="generate_plan_from_suitcase">
<generateplan planfile="${process.dir}/templ-planfile.xml"
verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}
_${rev}.jar"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Creating the Deployment Plan (I) – using template
<replace> is used to replace the value of a property within the bpel.xml
<BPELDeploymentPlan xmlns="http://schemas.oracle.com/bpel/deployplan"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/">
<BPELProcess id="BPELBusinessProcess">
<partnerLinkBindings>
<partnerLinkBinding name="client">
<property name="wsdlLocation">
<replace>BPELBusinessProcess.wsdl</replace>
</property>
</partnerLinkBinding>
<partnerLinkBinding name="CustomerService">
<property name="wsdlLocation">
<replace>CustomerService.wsdl</replace>
</property>
</partnerLinkBinding>
<partnerLinkBinding name="CreditCardService">
<property name="wsdlLocation">
<replace>http://devserver:8888/esb/wsil/…CreditCardValidationRS?wsdl
</replace>
</property>
</partnerLinkBinding>
...
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Creating the Deployment Plan (II) – using template
<searchReplace> is used to <search> for a string in WSDL and XSD files and
<replace> it with another string.
...
<wsdlAndSchema name="Order.cdm.xsd|OrderService.wsdl">
<jca:property name="PhysicalDirectory">
<searchReplace>
<search>c:\temp</search>
<replace>c:\temp\devserver</replace>
</searchReplace>
</jca:property>
</wsdlAndSchema>
<wsdlAndSchema name="*">
<searchReplace>
<search>localhost</search>
<replace>devserver</replace>
</searchReplace>
</wsdlAndSchema>
</BPELDeploymentPlan>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Attaching a Deployment Plan to a BPEL Suitcase
add the following commands to the build.xml ant file that is
build by JDeveloper for the BPEL project
This attaches a specific deployment plan to the BPEL suitcase
<target name="attach_plan">
<attachplan planfile="${process.dir}/planfile.xml"
verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}
_${rev}.jar"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Modifying Ant to Use Deployment Plan
to add the attachment of the plan file as part of the regular deploy
process modify the dependency of the process-deploy task
<target name="process-deploy"
depends="validateTask, compile, attach_plan, deployProcess,
deployTaskForm, deployDecisionServices"/>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Descriptor in BPEL console reflects changes
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Unit Testing BPEL
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Agenda
Introduction
BPEL Lifecycle Management
ESB Lifecylce Management
Summary
Data are always
part of the game.
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
ESB normal deployment steps
!
"
#
#
using “Register with ESB” in JDeveloper
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
register
ESB files
WSDLs
XSDs
XSLs
register
ESB Suitcase
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Metadata
Server
Database
WSIF Framework
ESB Server
ESB Project
JDeveloper
Software Development Lifecycle und die Oracle SOA Suite 10g
WebDAV
© 2008
Deploying to multiple environments
Deploying a ESB
suitcase to other
environments
uses the same
configuration
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Metadata
Server
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Same problem as
with BPEL
re
ESB Suitcase
ter
s
i
g
reg
ist
er
WebDAV
Database
WSIF Framework
Dev Server
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Metadata
Server
WebDAV
Database
WSIF Framework
Test Server
JDeveloper
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Solution 1: Location attribute
!
"
#
#
ESB suitcase is deployed normally
Location attribute of Service Endpoints is changed on the ESB
console
Still many manual adjustments necessary, but without having to
touch/change the suitcase
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Solution 2: using Ant Deployment feature (10.1.3.4)
Similar to the BPEL deployment plan
A set of custom ant tasks that can be used for deployment
automation
Enables to deploy, undeploy the metadata to an ESB metadata
(design time) server with and without property substitution
ESB uses no build script by default, have to create your own one
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Ant Deployment feature: deployESBProjects
Can be used to deploy one to many ESB projects to a given ESB
metadata server
Identical behavior to that of JDeveloper “Register with ESB”
function
<target name="DeployESBProjects">
<deployESBProjects
esbMetadataServerHostname="localhost“
esbMetadataServerPort="8888"
userName="oc4jadmin"
password="welcome1">
<esbProject directory="${basedir}"/>
</deployESBProjects>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Ant Deployment feature: undeployESBEntities
Can be used to undeploy one of many ESB entities (systems,
service groups and services)
Entities can be specified in any order
The guid for any ESB entity can be found in corresponding the
.esbsys, .esbgrp or .esbsvc files
<target name="UndeployESBEntities">
<undeployESBEntities esbMetadataServerHostname="localhost"
esbMetadataServerPort="8888"
userName="oc4jadmin"
password="welcome1">
<system guid="67BA4DF1BED411DDBFA873B82343E5E5"/>
<serviceGroup guid="6E6A3020BED411DDBFA873B82343E5E5"/>
<service guid="76597020BED411DDBFA873B82343E5E5"/>
<service guid="C6D58890BED411DDBFA873B82343E5E5"/>
<service guid="A9D47E11C0B211DDBFDA3581D20F8214"/>
</undeployESBEntities>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Ant Deployment feature: extractESBDeploymentPlan
Supports extracting the deployment plan from a JDeveloper ESB
project into the identified Deployment Plan file
ESB project must have been deployed at least once using
JDeveloper’s “Register with ESB” function
<target name="ExtractESBDeploymentPlan">
<delete file="${basedir}/templ-planfile.xml" verbose="true"/>
<extractESBDeploymentPlan sourceDir="${esbProjectToDeploy}"
deploymentPlanFile="${basedir}/templ-planfile.xml"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Ant Deployment feature: deployESBSuitcase
Can be used to deploy one ESB project which is maintained by
JDeveloper with the contents of the designated Deployment Plan
file applied
Provides identical behavior to the Register with ESB function with
the following differences
Application of the deployment plan is not done in Register with ESB
Automatic refresh/resynch is not done with this task
<target name="DeployESBSuitcase" depends="UndeployESBEntities">
<deployESBSuitcase esbMetadataServerHostname="localhost"
esbMetadataServerPort="8888"
sourceDirectory="${esbProjectToDeploy}"
deploymentPlanFilename="${deploymentPlanFilename}"
forcedDeployment=“true"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
ESB deployment plan
<deploymentPlan>
<systemDeploymentPlan qname="SoftwareLifecycleDemo">
<deferredQueueName topicConnectionFactory="OracleASjms/MyXATCF"
numberOfListeners="1">OracleASjms/ESBDeferredTopic</deferredQueueName>
<properties>
<property value="esb" name="clusterName"/>
<property value .../>
</properties>
<serviceGroupDeploymentPlan
qname="SoftwareLifecycleDemo.CreditCardServices">
<parent type="system" qname="SoftwareLifecycleDemo"/>
<serviceDeploymentPlan
qname="SoftwareLifecycleDemo.CreditCardServices.AmexcoCreditCardService"
status="ENABLED">
<parent type="serviceGroup" qname="SoftwareLifecycleDemo.CreditCardServices"/>
<properties>
<serviceDefinition>
<property value="AmexcoCard.wsdl" name="wsdlURL"/>
<property value="http://testserver:8888/event/SoftwareLifecycleDemo/
CreditCardServices/AmexcoCreditCardService" name="soapEndpointURI"/>
</serviceDefinition>
<endpoint>
<property value="http://testserver:8091/AmexcoCardService/"
name="Location"/>
</endpoint>
</properties>
</serviceDeploymentPlan>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Using the Deployment Plan
build.xml
build.DEV.properties
Software Development Lifecycle und die Oracle SOA Suite 10g
build.TEST.properties
© 2008
Unit Testing ESB Services
with SoapUI
SoapUI is the universal Web Services testing tool
Can be used for unit, integration and load testing
GUI and integration with Maven / Ant
Free version available
But should we really
call an external service
in unit testing ?
Mock Services ?
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Mock Services with
SoapUI
Mocking
Amexco
Service
!
Mock Services are created
based on the WSDL of the
“real” service
"
#
#
Different
response
messages
can be
specified
ESB deployed
with different
Deployment
Plan (DEV)
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Deployment Plan with Amexco Mock Service
<serviceDeploymentPlan
qname="SoftwareLifecycleDemo.CreditCardServices.AmexcoCreditCardService"
status="ENABLED">
<parent type="serviceGroup"
qname="SoftwareLifecycleDemo.CreditCardServices"/>
<properties>
<serviceDefinition>
<property value="AmexcoCard.wsdl" name="wsdlURL"/>
<property value="http://devserver:8888/event/SoftwareLifecycleDemo/
CreditCardServices/AmexcoCreditCardService"
name="soapEndpointURI"/>
</serviceDefinition>
<endpoint>
<property value="http://devserver:8088/mockAmexcoCardResourceBinding"
name="Location"/>
</endpoint>
</properties>
</serviceDeploymentPlan>
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Integration Testing BPEL and ESB
SoapUI can be used to do integration testing of BPEL and ESB
together (possibly with the Mock Service in place)
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Agenda
Introduction
BPEL Lifecycle Management
ESB Lifecylce Management
Summary
Data are always
part of the game.
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Summary
Since SOA Suite 10.1.3.4 both BPEL and ESB services can be
build and deployed automatically via Ant
No more manual changes necessary to artifacts prior to
deployment
can be integrated into Continuous Integration (CI) tools
SoapUI can be used to unit test and mock Web Services
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Thank you!
?
www.trivadis.com
Basel
·
Baden
·
Bern
·
Lausanne
·
Zürich
·
Düsseldorf
·
Frankfurt/M.
·
Freiburg i. Br.
·
Hamburg
·
München
·
Stuttgart
·
Wien
#
SOA, ESB in use – a real architecture
Oracle ESB
Oracle BPEL
Process Manager
Oracle Rules
Oracle Data Integrator (ODI)
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Adding BPEL to the mix
Business Process Execution Language (BPEL)
Orchestration
Integration
Platform
ESB
Mediation
Adapter
Mediation
Mediation
Application A
Application B
Application C
Java
Java
Web Service
Facade
Business Logic
PL/SQL
Java
Java
Data Access
PL/SQL
PL/SQL
ORM
Storage
Tables
Tables
Tables
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
The Trivadis Integration Architecture Blueprint
Software Development Lifecycle und die Oracle SOA Suite 10g
© 2008
Download