Deployment Module
Requirements
- Provide Service hot deployment.
- service hot update.
- service hot un deployment.
Service Deployment
- When new service is deploying deployment module should create the execution chain for that service.
- If the service has references to one or more modules then, those modules should be loaded.
- If there is a reference to a module then that modules should already have been deployed.
- All the handlers belong to those modules act as global handlers to that service.
- All the other handlers belong to that service will be ordered according to phases rules.
- The order of the phases should be specify in the server.xml .
Wish List
Sub Components
- WSDD implementation
- Server Deployment
- Services
- Extensions Modules
- Hot deployment
- Service Isolation and sandboxing
WSDD
The deployment will be specified by the three types of Descriptors.
- One server.xml DD
- zero or more module.xml DD
- zero or more service.xml DD
Deployment descriptors the value overridden by the Server/Module/Service order.
The work area of Axis
META-INF/
server.xml
modules/
m1.aar
META-INF/module.xml
lib/
classes/
m2.aar
META-INF/module.xml
lib/
classes/
services/
s1.aar
META-INF/service.xml
lib/
classes/
s2.aar
META-INF/service.xml
lib/
classes/
WEB-INF/
lib/
classes/
Deployment Descriptors
Common constructs
<parameter/> ::= <parameter name= locked=xsd:boolean> xsd:any</parameter>
<handler/> ::= <handler ref="xs:anyURI">
| <handler (name="xs:anyURI" class="...")>
<order (before="xs:anyURI" after="xs:anyURI")
| phase="xs:anyURI"
phaseFirst="xs:boolean" phaseLast="xs:boolean"/>
<parameter/>*
</handler>
<inflow/> ::= <inflow> <handler/>*</inflow>
<outflow/> ::= <outflow> <handler/>*</outflow>
<faultflow/> ::=<faultflow><handler/>*</faultflow>
<typemapping/> ::= <typemapping type=xsd:string xmlname=xsd:qname
[serializer=xsd:string deserializer=xsd:string] | encoder=xsd:string />
(how about the encoder here ???)
Server Deployment
<server name=xsd:qname>
<parameter/>*
<handler/>*
<module ref=../>*
<phaseOrder>
<phase name="xs:anyURI"/>+
</phaseOrder>
</server>
Services
Service has two options
- Each service only implements one WSDL interface/portType. This is consistent with WSDL 2.0 directions.
- The core elements of the deployment descriptor are in a common Axis namespace and Java-specific, C++-specific stuff is in their own namespaces.
<service path=xs:string <!-- Desired path to the service relative to deployment of Axis -->
interface=xs:QName <!-- QName of WSDL portType supported by the service -->
xmlns="http://ws.apache.org/axis2/deployment">
<!-- Java implementation description -->
<java:implementation
provider="xs:string" <!-- Name of provider class or special string .. like now -->
class="xs:string" <!-- Fully-qualified name of implementation class -->
xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
<!-- service specific handlers -->
<inFlow> <handler .../>+ </inFlow> ?
<outFlow> <handler .../>+ </outFlow> ?
<faultFlow> <handler .../>+ </faultFlow> ?
<!-- operation-specific info -->
<operation name="xs:qname" ... what else goes here ...>
<!-- enable operation specific modules -->
<module ref="uri">
<parameter ../>*
</module>
<!-- operation specific handlers -->
<inflow/>?
<outflow/>?
<faultlow>?
</operation>
... Extensibility elements such as wsp:policies ...
</service>Axis will have three types of resources Axis Core resources Module based resources Service based resources
Each servce will have #1 by default and the #2 if the service refer to them and the #3 only if the service is itself or service refers to that service
Extensions Modules
Module Consist of handlers, WSDL reading/writing code, deployment management code, supporting classes and it Operates within a given phase.
<module ref="xs:anyURI" | (name="xs:anyURI" class="...")>
<parameter/>*
<typeMapping>*
<inflow/>?
<outflow/>?
<faultflow/>?
</module>
Hot deployment
- Plan is to have a single jar or
- What do we want to deploy?
- Globally across the entire system:
- type mappings
- handlers
- modules
- configuration extensions (Sam's suggestion)
A single service consists of:
- type mappings
- handlers
- modules
- WSDL, policies.
Transport in the server.xml/cleint.xml
<transportReceiver name="http">
<parameters/>
<faultFlow/>
<outFlow/>
<inFlow/>
</transportReceiver>
<transportSender name="http" class="org.apache.axis.transports.http.Sender">
<parameters/>
<faultFlow/>
<outFlow/>
<inFlow/>
</transportSender>