Post on 06-Mar-2018
S319117 - WEBSERVICE BASED
BUSINESS COMPONENTS
Aino Andriessen
Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
AMIS
• Systems integrator
• Co-sourcing
• Maintenance
• Oracle, Java, Open Source, ADF, DBA, SOA
• AMIS technology school
• APS
• http://www.amis.nl
• http://technology.amis.nl/blog/
AINO ANDRIESSEN
Technical Consultant
Technical Architect
Java, ADF, PL/SQL, XML, ...
SOA , Integration
Software engineering
Quality management
Agile development
aino.andriessen@amis.nl
http://www.fttech.net
S319117 - WEBSERVICE BASED
BUSINESS COMPONENTS
Aino Andriessen
Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
ADF BUSINESS COMPONENTS 2
Application Modules
ViewObjects
Entities
Stored Procedures
Tables and views
ADF BC's
Database
ADF BUSINESS COMPONENTS 1
• ORM
• Entities
– An entity object represents a row in a database table and
simplifies modifying its data by handling all data manipulation
language (DML) operations for you.
– CRUD
• ViewObjects
– A view object represents a SQL query and simplifies working
with its result.
– CRUD
• Application Modules
– An application module is the transactional component that UI
clients use to work with application data. It defines an
updatable data model and top-level procedures and functions
(called service methods) related to a logical unit of work
related to an end-user task.
CHALLENGE - 10G
• The standard option is to base ADF BC's on database
objects (tables, views).
• Programmatic BC's allow other sources.
– webservices, ref cursor, properties, etc.
– but you must do all the work yourself
– guidelines are available
CHALLENGE - 11G
• Programmatic BC's
• ADF BC's can be, natively, based on webservices
– but only if they have a so-called service interface
• avaliable with ADF BC based webservices
– SDO
– very new feature
DEMO EXPLANATION
• A Webservice that provides access to jobs information.
• An ADF application to manage employees, that needs the
jobs information to translate the jobId (AD_PRES) to a
description (President).
WS Consumer
WS Producer
EmpJob
Job
UI
WEBSERVICE PRODUCER
• Standard ADF BC's
• Remote interface
• AM client interface method
– objects must be serializable
• Pojo's
• Deploy
WEBSERVICE CONSUMER
• webservice proxy
– standard client to access webservice
– can easily be generated
ADF app / WS Consumer
ACCESS WEBSERVICE
WS Producer
JobGenerated Proxy
DataAccess
JobEO JobsVw
ProgrammaticResultSet
Pojo
• BaseClasses
– Overriden methods
– General methods
• Utility classes
– Hold retrieved data
– Conversion
– Service access via proxy
BASECLASSES
JobEOinsertRow()updateRow()deleteRow()getCurrentRow()
JobsVwgetProgrammaticResultSet()
EntityBasedoDML()doSelect()
VOBasecreate()executeQueryForCollection()hasNextForCollection()createRowFromResultSet()getQueryHitCount()releaseUserDataForCollection()
DAJobs
DataAccess
OVERRIDE METHODS
• Entity
– doSelect()
– doDML()
• ViewObject
– create()
– executeQueryForCollection()
– hasNextForCollection()
– createRowFromResultSet()
– getQueryHitCount()
– releaseUserDataForCollection()
• viewlinkaccessors
CONVERTERS
• Generic code
– to support multiple objects
• Represent data in tabular form (rows, colums)
– ProgrammaticResultSet
SHORT WRAP UP
• Producer
• Consumer
– ws proxy
– programmatic BC's
– override a few standard methods
– lot of custom code, especially for conversion
SERVICE INTERFACE PRODUCER
• Special webservice
– Business Components service interface
• Create on top of BC's
– Create BC's
– Enable service interface
• VO's are published as SDO's
– compare to custom POJO in 10g impl.
– extends from org.eclipse.persistence.sdo.SDODataObject
• Service is also available as EJB
• Support for relations
SERVICE INTERFACE CONSUMER
• Create Entity
– Service Interface entity
• Base VO on entity
• Include common jar from
producer (with object
definitions)
• Configure connection
<DataSource
DataSourceClass="oracle.jbo.datasource.svc.SIEODataSourceImpl"
Type="ServiceInterface">
<ServiceInterface
ServiceName="{/nl/amis/demo/wsbc/jobprod/model/ams/common/}JobSDOService"
SDOName="{/nl/amis/demo/wsbc/jobprod/model/queries/common/}JobsVwSDO"
SVIName="Jobs"
CreateOpName="createJobs"
UpdateOpName="updateJobs"
GetOpName="getJobs"
FindOpName="findJobs"/>
</DataSource>
SERVICE DATA OBJECT
• Service Data Objects is a technology that allows
heterogeneous data to be accessed in a uniform way.
– The SDO specification was originally developed in 2004 as a
joint collaboration between BEA and IBM and approved by
the Java Community Process.
– Version 2.0 of the specification was introduced in November
2005 as key part of the Service Component Architecture.
• Java standaard
• Disconnected
ISSUES
• Connection either via SOAP or EJB
• Configuration
• In webapp:
– Only EJB works
– SOAP will work in the next JDev version
• Very new feature
SERVICE BASED WEBSERVICE
INTERACTION
• WS datacontrol
• WebService proxy
– WSDL
• Custom interaction
– REST
• Jersey Client
• Commons HTTPClient
• Business Components can be based on webservices but it's
not a trivial exercise and requires a lot of work
• Others have done it before so don't invent the wheel again.
• It's much easier to use 11g service interface BC's, but they
requires service interface webservices and are still under
development, although almost done.
S313467 - ADF BUILD PROCESS WITH
MAVEN AND HUDSON
Aino Andriessen
Thursday, September 23, 11:00 | Hotel Nikko, Peninsula