SCA Details for Your SOA Environment
At WebSphere Technical Exchange 2006, Eric Erpenbach--Advisiory Software Engineer working on WebSphere Process Server Development--spoke about how SCA is implemented in WPS.
Service Component Architecture Review
- Core component model for SOA applications
- COnsistent way of describing components as services
- Consistent client programming model
- SCA runtime environment in WebSphere Process Server and WebSphere ESB
- Component wiring supports both synchronous and asynchronous invocation
- Impl in WPS and WESB is IBM's, not Apache Tuscany
- Tuscany will be in the SOA Feature Pack
SCA Implementation in WPS
Component Options
- Components can be called and can call other components
- Exports provide services
- Imports indicate external service dependencies
- Deployment unit is a module
- Binding/wiring options
- SCA
- JMS
- Web services
- JCA
- SLSB (import only)
- Component references
- Component types
- Process (BPEL)
- Huamn Task
- Business Rule Group
- Business State Machine
- Java
- Mediation (ESB)
- Questions asked:
- JMS format? Depends on your application
- JCA adapters? We know IBM's work with SCA, other vendors' may not.
- Limitations on parameter/return types of imports/exports? Defined by XSD, represented by an SDO. WPS supports anything SDO does.
- Handles XSD choice? Probably in runtime, perhaps not in WID tooling.
- Requirement to have everything in one EAR? Only if components are in one module.
- How would you call a component from a Portlet? Through a binding of the export, such as the Web services binding.
- Why not an SLSB export binding? Doesn't make sense for an SCA to act as an EJB home/bean.
SCA Quality of Service
- Qualifiers provide configurations options
- Local or global transaction
- When request and/or response should expire
Component Invocation Patterns
- Synchronous
- Pseudo Synchronous
- Export has asynchronous API, invokes component synchronously (Service Activator)
- Asynchronous
- Callback
- Import has a synchronous API, waits asynchronously for a response
SCA Message
- Contains data between service consumer and provider
- SOAP message
- SCA message header
- SCA system headers
- Interaction header: Source, destination, and interaction type
- Async header: Asynchronous interaction info
- QoS headers
- SCA message body
- Business Objects/Busines Graph/SDO or Java objects
- Exception details
SCA to Runtime Artifact Mapping
| Type |
Module |
Export |
Component |
Import |
| J2EE |
EAR |
remote SLSB, opt MDB |
local SLSB |
EJB or service client, opt MDB |
- queued messaging: similar, but with different JNDI bindings
SCA Invocation Styles
- Synchronous Intra-Module: SCA messages are passed by reference within the same module
- Synchronous Inter-Module (1 server): SCA messages are passed by value between modules, even within the same server
- Synchronous Inter-Module (2 servers): SCA messages are passed by value between modules/servers using RMI-IIOP
- SCA Asynchronous Intra-Module: SCA message is put in Component 1's import queue, forwarded to Component 2's request queue, received by Component 2's MDB
- SCA Asynchronous Inter-Module (1 server): SCA message is put in Import's import link queue for Module 1, forwarded to Module 2's export link queue, forwarded to Export's request queue, received by Export's MDB
- SCA Asynchronous Inter-Module (2 servers): Similar, communication between servers is between two SIBus messaging engines
- Questions:
- Can we have two BPEL components in the same module? In 6.0.2, yes, but keep long running processes in their own module to make upgrading the process easier.
- 6.0.1 merges an asynchronous connection to an import with an asynchronous connection to an export. They're effectively one asynchronous connection, not two.
SCA Failures
Events, ntoficaions, and exceptions
- Business exception
- Sync
- Async request/response
- System exception
- Recovery service handles most errors
Recovery service for failed invocations
- WPS has built-in recovery services
- Custom SIBus destinations for exceptions, MDBs for processing them
- If MDB cannot process message, moves it to exception destination, Failed Events DB
- Failed Event Manager: admin console provides inspection, modification, resubmission, deletion
- Q: Is this in Tuscany/SOA Feature Pack? No, added value of WPS.
Import/export Bindings
Web services binding for import/export
- Web service asynchronous request to an import is short-circuited to sync (as of 6.0.1.1)
- Web service receive, external consumer invokes WS binding on module export
- Async between export and component is short-circuited
JMS binding for import/export
- Method binding available for operations
- Import puts JMS message on specifid destination
- Async wiring to import is short-circuited
Future
- 6.0.2 has native WMQ support
- Additional bindings can easily be added
- SCA is fundemental for SOA
That was the end of the talk.