org.jboss.net.axis
Class Deployment

java.lang.Object
  extended byorg.jboss.axis.deployment.wsdd.WSDDConstants (src) 
      extended byorg.jboss.axis.deployment.wsdd.WSDDElement (src) 
          extended byorg.jboss.axis.deployment.wsdd.WSDDDeployment (src) 
              extended byorg.jboss.net.axis.Deployment
All Implemented Interfaces:
EngineConfiguration (src) , WSDDEngineConfiguration (src) , WSDDTypeMappingContainer (src)

public class Deployment
extends WSDDDeployment (src)

This subclass represents a wsdd deployment with scoped typemappings and service-specific classloading features. It may also serve as a place to statically register some other jboss-specific implementation classes in the axis package.

WSDDDeployment is used by Axis in two respects: Two parse a deployment descriptor and to host the accumulated configuration data. We use that circumstance to build up an additional deployment scope in jboss.net - services are registered in the central registry/engine but still pertain their relation (especially wrt typemapping delegation) to their original deployment. We do that by annotating the scope deployments in the service options.

This design is IMHO more clever and needs less overhead than the original approach of mapping services to classloaders. Furthermore, it allows us to introduce some JSR109 related deployment concepts without global effect.

Since:
09.03.2002

Field Summary
protected  java.lang.ClassLoader deploymentLoader
          holds the classloader related to this deployment which is the thread context classloader at creation time
protected  boolean tmrCreated
          whether our registry has already been built
protected  java.util.List typeMappings
          these are our local typemappings
 
Fields inherited from class org.jboss.axis.deployment.wsdd.WSDDConstants (src)
ATTR_ATTACHMENT_FORMAT, ATTR_CLASS, ATTR_CLASSNAME, ATTR_DESERIALIZER, ATTR_ENCSTYLE, ATTR_INHEADER, ATTR_LANG_SPEC_TYPE, ATTR_LOCKED, ATTR_MODE, ATTR_NAME, ATTR_ONEWAY, ATTR_OUTHEADER, ATTR_PIVOT, ATTR_PROVIDER, ATTR_QNAME, ATTR_RETHEADER, ATTR_RETQNAME, ATTR_RETTYPE, ATTR_SERIALIZER, ATTR_SOAPACTORNAME, ATTR_STREAMING, ATTR_STYLE, ATTR_TYPE, ATTR_USE, ATTR_VALUE, BEAN_DESERIALIZER_FACTORY, BEAN_SERIALIZER_FACTORY, ELEM_WSDD_BEANMAPPING, ELEM_WSDD_CHAIN, ELEM_WSDD_DEPLOY, ELEM_WSDD_DOC, ELEM_WSDD_ELEMENTMAPPING, ELEM_WSDD_ENDPOINTURL, ELEM_WSDD_FAULT, ELEM_WSDD_FAULTFLOW, ELEM_WSDD_GLOBAL, ELEM_WSDD_HANDLER, ELEM_WSDD_JAXRPC_CHAIN, ELEM_WSDD_JAXRPC_HANDLERINFO, ELEM_WSDD_JAXRPC_HEADER, ELEM_WSDD_JAXRPC_ROLE, ELEM_WSDD_NAMESPACE, ELEM_WSDD_OPERATION, ELEM_WSDD_PARAM, ELEM_WSDD_REQFLOW, ELEM_WSDD_RESPFLOW, ELEM_WSDD_SERVICE, ELEM_WSDD_TRANSPORT, ELEM_WSDD_TYPEMAPPING, ELEM_WSDD_UNDEPLOY, ELEM_WSDD_WSDLFILE, NS_PREFIX_WSDD, NS_PREFIX_WSDD_JAVA, PROVIDER_BSF, PROVIDER_COM, PROVIDER_CORBA, PROVIDER_EJB, PROVIDER_HANDLER, PROVIDER_MSG, PROVIDER_RMI, PROVIDER_RPC, QNAME_BEANMAPPING, QNAME_BSF_PROVIDER, QNAME_CHAIN, QNAME_COM_PROVIDER, QNAME_CORBA_PROVIDER, QNAME_DEPLOY, QNAME_DOC, QNAME_EJB_PROVIDER, QNAME_ELEMENTMAPPING, QNAME_ENDPOINTURL, QNAME_FAULT, QNAME_FAULTFLOW, QNAME_GLOBAL, QNAME_HANDLER, QNAME_HANDLER_PROVIDER, QNAME_JAVAMSG_PROVIDER, QNAME_JAVARPC_PROVIDER, QNAME_JAXRPC_HANDLERINFO, QNAME_JAXRPC_HANDLERINFOCHAIN, QNAME_JAXRPC_HEADER, QNAME_JAXRPC_ROLE, QNAME_NAMESPACE, QNAME_OPERATION, QNAME_PARAM, QNAME_REQFLOW, QNAME_RESPFLOW, QNAME_RMI_PROVIDER, QNAME_SERVICE, QNAME_TRANSPORT, QNAME_TYPEMAPPING, QNAME_UNDEPLOY, QNAME_WSDLFILE, URI_WSDD, URI_WSDD_HANDLER, URI_WSDD_JAVA, URI_WSDD_WSDD_BSF, URI_WSDD_WSDD_COM
 
Fields inherited from interface org.jboss.axis.EngineConfiguration (src)
PROPERTY_NAME
 
Constructor Summary
protected Deployment(org.w3c.dom.Element e, java.lang.ClassLoader loader)
          Constructor for Deployment.
 
Method Summary
 void deployService(WSDDService (src)  service)
          Put a WSDDService into this deployment, replacing any other WSDDService which might already be present with the same QName.
 void deployToRegistry(WSDDDeployment (src)  arg0)
           
 void deployTypeMapping(WSDDTypeMapping (src)  typeMapping)
          overwrite to equip with options
 java.util.Iterator getDeployedServices()
          Get an enumeration of the services deployed to this engine
protected static Deployment (src) getDeployment(WSDDService (src)  service)
          return the scoped deployment for this service
protected  java.lang.ClassLoader getDeploymentLoader()
          return the deployment loader of this deployment
 SOAPService (src) getService(QName (src)  serviceName)
          retrieve an instance of the named service
 SOAPService (src) getServiceByNamespaceURI(java.lang.String arg0)
          Get a service which has been mapped to a particular namespace
 TypeMappingRegistry (src) getTypeMappingRegistry()
          Retrieve the TypeMappingRegistry for this engine
protected  void installTypeMappingWithOptions(TypeMapping (src)  nextMapping)
          this helper serves to install typemappings with additional options
static Deployment (src) makeSafeDeployment(org.w3c.dom.Element e, java.lang.ClassLoader loader)
          the safe "constructor"
 
Methods inherited from class org.jboss.axis.deployment.wsdd.WSDDDeployment (src)
addHandler, addService, addTransport, configureEngine, deployHandler, deployTransport, getDeployment, getElementName, getEngine, getGlobalConfiguration, getGlobalOptions, getGlobalRequest, getGlobalResponse, getHandler, getServices, getTransport, getTypeMapping, getTypeMappings, getWSDDService, registerNamespaceForService, removeNamespaceMapping, setGlobalConfiguration, undeployHandler, undeployService, undeployTransport, writeEngineConfig, writeToContext
 
Methods inherited from class org.jboss.axis.deployment.wsdd.WSDDElement (src)
getChildElement, getChildElements, getDocumentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deploymentLoader

protected java.lang.ClassLoader deploymentLoader
holds the classloader related to this deployment which is the thread context classloader at creation time


typeMappings

protected java.util.List typeMappings
these are our local typemappings


tmrCreated

protected boolean tmrCreated
whether our registry has already been built

Constructor Detail

Deployment

protected Deployment(org.w3c.dom.Element e,
                     java.lang.ClassLoader loader)
              throws WSDDException (src) 
Constructor for Deployment. Is used with server-config.wsdd in order to build the engine configuration. Is used with actual deployment documents to build scoped deployments. After calling the super constructor, we rebuild the typemappings with our typemapping implementation that may contain additional typemapping options. Unfortunately, you will have to do an enclosing Thread.currentThread().setContextClassLoader(loader) because of the f**cked constructor functionality of the super class. Its a 1st grade Java rule, guys! So rather use the static factory method.

Method Detail

makeSafeDeployment

public static Deployment (src)  makeSafeDeployment(org.w3c.dom.Element e,
                                            java.lang.ClassLoader loader)
                                     throws WSDDException (src) 
the safe "constructor"

Throws:
WSDDException (src)

getDeploymentLoader

protected java.lang.ClassLoader getDeploymentLoader()
return the deployment loader of this deployment


getDeployment

protected static Deployment (src)  getDeployment(WSDDService (src)  service)
return the scoped deployment for this service


deployService

public void deployService(WSDDService (src)  service)
Description copied from class: WSDDDeployment (src)
Put a WSDDService into this deployment, replacing any other WSDDService which might already be present with the same QName.

Overrides:
deployService in class WSDDDeployment (src)
Parameters:
service - a WSDDHandler to insert in this deployment

deployTypeMapping

public void deployTypeMapping(WSDDTypeMapping (src)  typeMapping)
                       throws WSDDException (src) 
overwrite to equip with options

Specified by:
deployTypeMapping in interface WSDDTypeMappingContainer (src)
Overrides:
deployTypeMapping in class WSDDDeployment (src)
Throws:
WSDDException (src)

getDeployedServices

public java.util.Iterator getDeployedServices()
                                       throws ConfigurationException (src) 
Description copied from class: WSDDDeployment (src)
Get an enumeration of the services deployed to this engine

Specified by:
getDeployedServices in interface EngineConfiguration (src)
Overrides:
getDeployedServices in class WSDDDeployment (src)
Throws:
ConfigurationException (src)

getService

public SOAPService (src)  getService(QName (src)  serviceName)
                       throws ConfigurationException (src) 
Description copied from interface: EngineConfiguration (src)
retrieve an instance of the named service

Specified by:
getService in interface EngineConfiguration (src)
Overrides:
getService in class WSDDDeployment (src)
Parameters:
serviceName - XXX
Returns:
XXX
Throws:
ConfigurationException (src)

getServiceByNamespaceURI

public SOAPService (src)  getServiceByNamespaceURI(java.lang.String arg0)
                                     throws ConfigurationException (src) 
Description copied from interface: EngineConfiguration (src)
Get a service which has been mapped to a particular namespace

Specified by:
getServiceByNamespaceURI in interface EngineConfiguration (src)
Overrides:
getServiceByNamespaceURI in class WSDDDeployment (src)
Throws:
ConfigurationException (src)

deployToRegistry

public void deployToRegistry(WSDDDeployment (src)  arg0)
                      throws ConfigurationException (src) 
Overrides:
deployToRegistry in class WSDDDeployment (src)
Throws:
ConfigurationException (src)

getTypeMappingRegistry

public TypeMappingRegistry (src)  getTypeMappingRegistry()
                                           throws ConfigurationException (src) 
Description copied from interface: EngineConfiguration (src)
Retrieve the TypeMappingRegistry for this engine

Specified by:
getTypeMappingRegistry in interface EngineConfiguration (src)
Overrides:
getTypeMappingRegistry in class WSDDDeployment (src)
Throws:
ConfigurationException (src)

installTypeMappingWithOptions

protected void installTypeMappingWithOptions(TypeMapping (src)  nextMapping)
                                      throws ConfigurationException (src) 
this helper serves to install typemappings with additional options

Throws:
ConfigurationException (src)