Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
Tuscany JAVA SCA Runtime
M2
Service Component Architecture (SCA)
� Servce oriented component model for describing service assemblies
� Technology independent modeling and composition of service networks
� Unified, language-independent way to expose implementations as services (Java, C++, PHP, Ruby, Javascript, BPEL, XSLT, others)
� Binding model for multiple access methods and infrastructure service
� Is not about implementing API’s
� Service components with service interfaces
SCA Specs
� SCA Assembly Model V0.96
� SCA Client and Implementation Model for Java (V0.95) � SCA Client & Implementation for BPEL (V0.95) � SCA Client & Implementation for Spring (V0.95) � SCA Client & Implementation for C++ (V0.95)
� SCA Web Service bindings � SCA JMS Binding � SCA EIS/JCA Bindings � SCA Stateless Session Bean Binding
� SCA Policy Framework
Description Files within an SCA Assembly
� No deployment package specified� ComponentType description could be a side file, annotated code or other
.scdl.componentType
Annotated code
Assembly description
Component Type description
@Service(HelloService.class)public class public class public class public class HelloServiceImpl implements implements implements implements HelloService {public public public public String hello(String message) {
...}
<?xml version="1.0" encoding="ASCII"?><composite xmlns=http://www.osoa.org/xmlns/sca/1.0xmlns:foo=http://foo.com name="AccountServices">
<service name="AccountService"><interface.java interface="foo.AccountService"/><reference>AccountServiceComponent</reference>
</service><property name="complexFoo" type="foo:MyComplexType">
<foo:a>AValue</foo:a><foo:b>InterestingURI</foo:b>
</property><component name="AccountServiceComponent">
<implementation.java class="foo.AccountServiceImpl"/><property name="currency" source="$complexFoo/a"/><reference
name="accountDataService">AccountDataServiceComponent</reference><reference name="stockQuoteService">StockQuoteService</reference>
</component><component name="AccountDataServiceComponent">
<implementation.composite name="AccountDataServiceComposite"/></component><reference name="StockQuoteService">
<interface.java interface=“stock .StockQuoteService"/></reference>
</composite>
<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"><service name="HelloService"><interfaceinterfaceinterfaceinterface.java interfaceinterfaceinterfaceinterface="services.hello.HelloService"/></service>
...</componentType>
SCA Assembly
referenceservice
composite
wire wire wire
Binding
Web Service
SCA
JCA
JMS
…
Interface
Java Interface
WSDL PortType
…
… ……
component component
Binding
Web Service
SCA
JCA
JMS
…
Interface
Java Interface
WSDL PortType
…
property setting
properties
Implementation
Java, PHP
C++, Ruby,
Javascript,
BPEL, XSLT,
Composite,
…
componentType
Bootstrap process
host
host-api
Launcher
DeployerBootsptrapper
RuntimeComponent
SCA API
.scdl + .componentType(s) + business logic (services)
SCA Assemblies
System Application
BootBootBootBoot---->>>>DeployDeployDeployDeploy---->>>>
� Bootstrap process is controlled by Host environment
� Runtime is itself an SCA Assebmbly (“System”)
Deployment
Component
DefinitionComponent
Definition
component
load
buildconnect
component
component
run
deploy
assemblies
repository
composite
SCDL
� Deployment initiates evaluation of an assembly and wiring� Deploy composites or single artifacts (component, service or reference)
Loading Process
SCA assembly package
Represented byAn Object Model
referenceservice
composite
wire wire wire
component component
property setting
properties
in-memory Configuration Model
Loaders (keyed by QName)
spi.modelspi.modelspi.modelspi.modelSCA assembly model
LoaderRegistry
composite description (.scdl)+ assets
scdl
STAX/Instrospectioncreate
Building Process
Builders
BuilderRegistry
Set points for dependency injection(properties, references, services, constructor)
Implementation of the components with a set of stubs that need to be
connected to other components
in-memory Configuration Model
WiringInvocation chains
(one per operation)InboundWire OutboundWire
WireInvocationHandler
Invocation
TargetInvokerassociated with the operation
Payload
interceptors
DataBindingInterceptor
WebService Binding
ServletContainer
WebappRuntime
JDK
StandaloneRuntime
WebServiceBindingWebServiceBindingLoader
wsdl (url)
Axis2BindingBuilder
Axis2Service
ServiceClient
Axis2ServiceServlet
Axis2TargetInvokerAxiomDataBinding
load
Axis2Reference
buildbuild
<binding.ws…
Backup Info
Partial spi. model Class Diagram
Loaders
� Core� ComponentLoader, ComponentTypeElementLoader, PropertyLoader,
ReferenceLoader, ServiceLoader, InterfaceJavaLoader, DataTypeLoader, ImplementationCompositeLoader, DependencyLoader, CompositeLoader
� System: SystemBindingLoader, SystemImplementationLoader, SystemComponentTypeLoader, SystemCompositeComponentTypeLoader
� Java: InterfaceJavaLoader, JavaComponentTypeLoader, JavaImplementationLoader
� Extensions� Binding: WebServiceBindingLoader, RMIBindingLoader
OSGiBindingLoader, JSONRPCBindingLoader� Implementation: JavaScriptImplementationLoader,
RubyImplementationLoader, SpringImplementationLoader� ComponentType: JavaScriptComponentTypeLoader,
RubyComponentTypeLoader� IDL: InterfaceWSDLLoader
Some Builders
� Core
� CompositeBuilder, CompositeBindlessBuilder
� System: SystemBindingBuilder, SystemComponentBuilderSystemCompositeBuilder
� Java: JavaComponentBuilder
� Extensions
� Binding: Axis2BindingBuilder, RMIBindingBuilder, ExternalJbiServiceBuilder
� Implementation: JavaScriptComponentBuilder, RubyComponentBuilder, SpringCompositeBuilder