Documente Academic
Documente Profesional
Documente Cultură
Part 1 Outline
Composite example
Implementation using Java component implementation
Introduction to SCA concepts
Advanced composition – nested composites
Packaging and deployment
Extension points
Component Implementation types
Spring Framework
BPEL
Demonstrations
Part 2 Outline
Bindings
Web service binding
JMS binding
EJB session bean binding
AccountsComposite
Example SCA assembly External
Banking
Payment Payments
Reference
Service Component
Order
Processing OrderProcessing
Component
Service Accounts
Ledger
Component
EventLog
Component
External
WarehouseComposite Warehouse
Reference
Warehouse
Warehouse Warehouse
Broker
Service Component
Component
EventLog
Reference
Simple Example
bigbank.accountcomposite
Reference
StockQuote
Service
Service AccountService
AccountService Component
AccountData
Service
Component
<component name="AccountServiceComponent">
<implementation.java class="services.account.AccountServiceImpl"/>
<property name=“currency”>EURO</property>
<reference name="accountDataService" target="AccountDataServiceComponent"/>
<reference name="stockQuoteService"/>
</component>
<component name="AccountDataServiceComponent">
<implementation.java class="services.accountdata.AccountDataServiceImpl"/>
</component>
Interface is callable
package org.example.services.account; remotely
eg. as a Web service
@Remotable
public interface AccountService {
public AccountServiceImpl(
@Property("currency") String currency,
@Reference("accountDataService") AccountDataService dataService,
@Reference("stockQuoteService") StockQuoteService stockService) {
this.currency = currency;
this.accountDataService = dataService;
this.stockQuoteService = stockService;
} // end constructor
Defines references
“accountDataService”
and
“stockQuoteService”
accountReport.setStockValues( values );
return accountReport;
} Update the account
} // end class report with the latest
stock values
Component
…
…
References
Implementation
dependency on an
Implementation external service
The implementation code
for the component. In any
one of many languages,
eg. Java, BPEL, C++, PHP,
Composite….
Component Component
…
Interface Binding
Description of business functions of services Access mechanism used by services and
& references. For example, Java interface, references. For example, Web services binding,
WSDL 1.1 portType, WSDL 2.0 interface JMS binding, EJB Session bean binding
bigbank.accountcomposite
Reference
StockQuote
Service
Service AccountService
AccountService Component
AccountData
Service
Component
<component name="AccountServiceComponent">
<implementation.java class="services.account.AccountServiceImpl"/>
<reference name="StockQuoteService"/>
<reference name="AccountDataService"
target="AccountDataServiceComponent/AccountDataService"/>
<property name="currency">EURO</property>
bigbank.accountcomposite
StockQuote
</component>
Reference
StockQuote
Service
Service AccountService
<component name="AccountDataServiceComponent"> AccountService Component
AccountData
<implementation.bpel process=“QName"/> Service
Component
<service name="AccountDataService">
<interface.java interface="services.accountdata.AccountDataService"/>
</service>
</component>
Reuse in SCA
Inclusion
Recursive composition
Implementation reuse through configurable components
Reusable services through composite references
ComponentType
Describes component implementation type details
Services
References
Properties
Extensibility elements
<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<service name="AccountService">
<interface.java interface="services.account.AccountService"/>
</service>
<reference name="accountDataService">
<interface.java interface="services.accountdata.AccountDataService"/>
</reference>
<reference name="stockQuoteService">
<interface.java interface="services.stockquote.StockQuoteService"/>
</reference>
</componentType>
constrainingType Example
<constrainingType name=“myCT” ... >
<service name="MyValueService">
<interface.java interface="services.myvalue.MyValueService"/>
</service>
<reference name="customerService">
<interface.java interface="services.customer.CustomerService"/>
</reference>
<property name="currency" type="xsd:string"/>
</constrainingType>
Recursive Composition
Composites and Implementations look the same
services
references
properties
composites have associated ComponentType
Service AccountService
AccountService Component
AccountData
Service
Component
implements
bigbank.accountdata
Service
AccountData Logging
AccountDataService
bigbank.AccountData Composite
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://example.org"
name="bigbank.AccountData" >
<component name="AccountDataServiceComponent">
<implementation.bpel process=“..."/>
<reference name=“LoggingService"
target=“LoggingServiceComponent"/>
</component>
<component name=“LoggingServiceComponent">
<implementation.spring location=“..."/>
</component>
<composite>
AccountDataService ComponentType
<componentType>
<service name="AccountDataService">
<interface.java
interface="services.accountdata.AccountDataService"/>
</service>
</componentType>
<component name="AccountDataServiceComponent">
<implementation.composite name=“bb:bigBank.AccountData"/>
<implementation.bpel process=“QName"/>
<service name="AccountDataService">
<interface.java interface="services.accountdata.AccountDataService"/>
</service>
</component>
Assigned to be
hosted by SCA
Deployment Java container Assigned to be
hosted by SCA
Mapping CPP container
SCA Domain
bigbank.accountmanagement
bigbank.stockquote
Service Compositions
Extensibility in SCA
Designed for extensibility
Extensible artifacts:
Implementation types
• <implementation.*>
Interface types
• <interface.*>
Binding types
• <binding.*>
Assembly: Summary
SCA Assembly models systems composed of reusable services
construction
assembly
deployment
Heterogeneity
Multiple languages
Metadata driven
OSOA Collaboration | SOA Roadmap
SCA
<component name="AccountServiceComponent">
<implementation.spring location="/spring/application-context/"/>
...
</component>
<bean id=“FirstBean”>
<property name="aPropertyName" ref=“SecondBean"/>
</bean>
<bean id=“SecondBean">
<property name="SQRef" ref="StockQuoteService"/>
<property name="ADRef" ref="AccountDataService"/>
</bean>
<sca:service name="AccountService"
type="bigbank.account.AccountService" target=“FirstBean"/>
<sca:reference name="StockQuoteService"
type="bigbank.account.StockQuoteService"/>
<sca:reference name="AccountDataService"
type="bigbank.account.AccountDataService"/>
<beans>
OSOA Collaboration | SOA Roadmap
SCA
SCA service = partnerLink with single role belonging to the BPEL process
<component name="AccountServiceComponent">
<implementation.bpel process=“myns:Process1"/>
...
</component>
Summary
Demonstrations
IBM Demo:
HelloWorld sample with a callback (SCA V0.95)
Oracle Demos:
Oracle Fusion Middleware (SCA 0.95) Overview
Simple SayHello Example Using Jdeveloper (Synchronous)
Simple HelloWorld Example (Asynchronous)
OrderBooking Application
BEA Demo
Based on the Fabric3 open source SCA implementation
(www.fabric3.org)
Component provisioning in distributed SCA domain across multiple
JVMs
Java SCA 1.0 programming model support
HelloWorldWSClient
JSP
HelloWorldService
Component Reference
Hello Service
Implementation
Binding - Java
Web Service
Service
HelloWorldService
Service Component
Hello Service
Binding
Web Service
<reference name="HelloWorldService">
<interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
interface="http://helloworld#wsdl.interface(HelloWorld)"
callbackInterface="http://helloworld#wsdl.interface(HelloWorldCallback)"
wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
<binding.ws endpoint="http://helloworld#
wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"
location="wsdl/helloworld.wsdl" />
</reference>
</composite>
<service name="hwwsasync">
<interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
interface="http://helloworld#wsdl.interface(HelloWorld)"
callbackInterface="http://helloworld#wsdl.interface(HelloWorldCallback)"
wsdli:wsdlLocation="http://helloworld WEB-INF/wsdl/helloworld.wsdl" />
<binding.ws endpoint="http://helloworld#
wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"
location="WEB-INF/wsdl/helloworld.wsdl" />
<reference>HelloWorldServiceComponent</reference>
</service>
<component name="HelloWorldServiceComponent">
<implementation.java class="helloworld.HelloWorldImpl" />
</component>
</composite>
Service Engines
Scheduler
BPEL Routing Rules
…
Bindings
J2EE + Spring
SayHello
<composite name="SayHello“ ... >
<service name="SoapService1">
Service SayHello <interface.wsdl
SoapService1 Component
interface="http://xmlns.oracle.com/SayHello#
wsdl.interface(SayHello)"/>
<binding.ws
port="http://xmlns.oracle.com/SayHello#
wsdl.endpoint(SoapService1/SayHello_pt)"/>
</service>
<component name="SayHello">
<implementation.bpel src="SayHello.bpel"/>
</component>
Binding
Web Service
<wire>
<source.uri>SoapService1</source.uri>
<target.uri>SayHello/client</target.uri>
Implementation </wire>
- BPEL </composite>
OSOA Collaboration | SOA Roadmap
SCA
EventLogger SelectManufacturer
Component Component Implementation.bpel
binding.ws
ApprovalRequired
Implementation.eventAgent Component Implementation.decision
...
OSOA Collaboration | SOA Roadmap
</composite>
SCA
BEA/Fabric3 Demo
Open source CodeHaus Foundation project (www.fabric3.org)
Apache Licensed
Built around a small embeddable kernel that is highly extensible
Less than 1MB
Extension ecosystem, e.g. Spring, OpenJPA
Focused on
Implementation quality
SCA 1.0 support
“Agile” development experience and SDK
Management of distributed SCA domains
Federated deployment to multiple runtime types
WebLogic
Manage and provision Cluster
components
Servlet
SCA Domain Engine •Domains are heterogenous
Controller
•Fabric3 may be embedded in a
OSGi variety of containers
Other
Containers
BEA/Fabric3 Demo
Instantiate components
Provision components 4
on runtime nodes
3 to multiple runtime
nodes Service Node
SCA Domain
Process the composite,
2 resolve wires and
allocate to runtime
nodes
SCA Composite
Thank you!
Questions?