org.apache.axis2.osgi.deployment
Class OSGiServerConfigurator

java.lang.Object
  extended by org.apache.axis2.deployment.DeploymentEngine
      extended by org.apache.axis2.osgi.deployment.OSGiServerConfigurator
All Implemented Interfaces:
DeploymentConstants, AxisConfigurator

public class OSGiServerConfigurator
extends DeploymentEngine
implements AxisConfigurator

This is the heart of the OSGi deployment.


Field Summary
 
Fields inherited from class org.apache.axis2.deployment.DeploymentEngine
axisConfig, configContext, DEPLOYMENT_TASK_RUNNING, hotDeployment, hotUpdate, moduleDeployer, modulesDir, modulesPath, repoListener, scheduler, serviceDeployer, servicesDir, servicesPath, webLocationString, wsToDeploy, wsToUnDeploy
 
Fields inherited from interface org.apache.axis2.deployment.DeploymentConstants
ATTACHMENTS_LIFECYCLE_MANAGER, ATTRIBUTE_ACTIVATE, ATTRIBUTE_CLASS, ATTRIBUTE_DEFAULT_VERSION, ATTRIBUTE_LOCKED, ATTRIBUTE_NAME, ATTRIBUTE_NAMESPACE, ATTRIBUTE_PACKAGE, ATTRIBUTE_SCOPE, ATTRIBUTE_WSADDRESSING, AXIS2_CONFIGURATION_RESOURCE, AXIS2_CONFIGURATION_XML, AXIS2_REPO, BOOLEAN_FALSE, BOOLEAN_TRUE, DEPLOYER, DIRECTORY, DIRECTORY_AXIS2_HOME, DIRECTORY_CONF, EXTENSION, MAPPING, META_INF, MODULE_DRI_PATH, MODULE_PATH, MODULE_XML, POLICY_NS_URI, PROPERTY_TEMP_DIR, RESOURCE_MODULES, SCHEMA, SCHEMA_ELEMENT_QUALIFIED, SCHEMA_NAME_SPACE, SEPARATOR_COLON, SEPARATOR_DOT, SERVICE_DIR_PATH, SERVICE_PATH, SERVICES_XML, SUFFIX_JAR, SUFFIX_MAR, SUFFIX_WSDL, TAG_AFTER, TAG_ALLOWOVERRIDE, TAG_ANTI_JAR_LOCKING, TAG_APPLIES_TO, TAG_AXISCONFIG, TAG_BEFORE, TAG_CLASS_NAME, TAG_CLUSTER, TAG_CONTENT_TYPE, TAG_CONTEXT, TAG_DEFAULT_MODULE_VERSION, TAG_DEFAULTS, TAG_DESCRIPTION, TAG_DISPATCH_ORDER, TAG_DISPATCHER, TAG_EXCLUDE, TAG_EXCLUDE_OPERATIONS, TAG_EXCLUDE_PROPERTIES, TAG_EXPOSE, TAG_EXTRACT_SERVICE_ARCHIVE, TAG_FLOW_IN, TAG_FLOW_IN_FAULT, TAG_FLOW_OUT, TAG_FLOW_OUT_FAULT, TAG_HANDLER, TAG_HOT_DEPLOYMENT, TAG_HOT_UPDATE, TAG_INCLUDE_PROPERTIES, TAG_LABEL, TAG_LIST_ID, TAG_LISTENER, TAG_MAPPING, TAG_MEP, TAG_MESSAGE, TAG_MESSAGE_BUILDER, TAG_MESSAGE_BUILDERS, TAG_MESSAGE_FORMATTER, TAG_MESSAGE_FORMATTERS, TAG_MESSAGE_RECEIVER, TAG_MESSAGE_RECEIVERS, TAG_MODULE, TAG_MODULE_CONFIG, TAG_NAMESPACES, TAG_NODE_MANAGER, TAG_OBJECT_SUPPLIER, TAG_OPERATION, TAG_ORDER, TAG_PACKAGE_NAME, TAG_PACKAGE2QNAME, TAG_PARAMETER, TAG_PHASE, TAG_PHASE_FIRST, TAG_PHASE_LAST, TAG_PHASE_ORDER, TAG_POLICY, TAG_POLICY_ATTACHMENT, TAG_POLICY_REF, TAG_QNAME, TAG_REFERENCE, TAG_REPLICATION, TAG_SERVICE, TAG_SERVICE_GROUP, TAG_STATE_MANAGER, TAG_SUPPORTED_POLICY_NAMESPACES, TAG_TARGET_RESOLVER, TAG_TARGET_RESOLVERS, TAG_THREAD_CONTEXT_MIGRATOR, TAG_THREAD_CONTEXT_MIGRATORS, TAG_TIMEOUT, TAG_TRANSACTION, TAG_TRANSACTION_CONFIGURATION_CLASS, TAG_TRANSPORT, TAG_TRANSPORT_RECEIVER, TAG_TRANSPORT_SENDER, TAG_TRANSPORTS, TAG_TYPE, TARGET_NAME_SPACE
 
Constructor Summary
OSGiServerConfigurator(org.osgi.framework.BundleContext context)
           
 
Method Summary
 void engageGlobalModules()
          Engages the global modules specified in the configuration
 AxisConfiguration getAxisConfiguration()
          OSGiServerConfigurator will create an specifict AxisConfiguration based on axis2.xml which is available in org/apache/axis2.osgi/deployment directory.
 void loadServices()
          Method to deploy services from the repository
 AxisConfiguration populateAxisConfiguration(InputStream in)
          To get AxisConfiguration for a given inputStream this method can be used.
 
Methods inherited from class org.apache.axis2.deployment.DeploymentEngine
addDeployer, addNewModule, addServiceGroup, addWSToDeploy, addWSToUndeploy, buildModule, buildService, buildServiceGroup, cleanup, doDeploy, engageModules, fillServiceGroup, getAxisConfig, getAxisServiceName, getDeployer, getDeployers, getFileList, getModule, getModuleDeployer, getModulesDir, getRepoListener, getRepositoryDir, getRepositoryPath, getServiceDeployer, getServicesDir, getWebLocationString, isDeploymentTaskRunning, isHotUpdate, isServiceGroupReadyToDeploy, loadDefaultMessageReceiver, loadFromClassPath, loadRepository, loadRepositoryFromURL, loadServiceGroup, loadServicesFromUrl, populateService, prepareRepository, removeDeployer, setClassLoaders, setConfigContext, setDeployers, setDeploymentFeatures, setWebLocationString, startSearch, unDeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.axis2.engine.AxisConfigurator
cleanup
 

Constructor Detail

OSGiServerConfigurator

public OSGiServerConfigurator(org.osgi.framework.BundleContext context)
Method Detail

getAxisConfiguration

public AxisConfiguration getAxisConfiguration()
                                       throws AxisFault
OSGiServerConfigurator will create an specifict AxisConfiguration based on axis2.xml which is available in org/apache/axis2.osgi/deployment directory. This axis2.xml doesn't contain any listeners. Listeners should be added as services to AxisConfiguration service.

Specified by:
getAxisConfiguration in interface AxisConfigurator
Returns:
AxisConfiguration; an instance of AxisConfiguration is return
Throws:
AxisFault; - AxisFault will be thrown wrapping any of IOException
AxisFault

engageGlobalModules

public void engageGlobalModules()
                         throws AxisFault
Description copied from interface: AxisConfigurator
Engages the global modules specified in the configuration

Specified by:
engageGlobalModules in interface AxisConfigurator
Throws:
AxisFault

populateAxisConfiguration

public AxisConfiguration populateAxisConfiguration(InputStream in)
                                            throws DeploymentException
Description copied from class: DeploymentEngine
To get AxisConfiguration for a given inputStream this method can be used. The inputstream should be a valid axis2.xml , else you will be getting DeploymentExceptions.

First creat a AxisConfiguration using given inputSream , and then it will try to find the repository location parameter from AxisConfiguration, so if user has add a parameter with the name "repository" , then the value specified by that parameter will be the repository and system will try to load modules and services from that repository location if it a valid location. hot deployment and hot update will work as usual in this case.

You will be getting AxisConfiguration corresponding to given inputstream if it is valid , if something goes wrong you will be getting DeploymentException

Overrides:
populateAxisConfiguration in class DeploymentEngine
Parameters:
in - : InputStream to axis2.xml
Returns:
a populated AxisConfiguration
Throws:
DeploymentException - : If something goes wrong

loadServices

public void loadServices()
Description copied from interface: AxisConfigurator
Method to deploy services from the repository

Specified by:
loadServices in interface AxisConfigurator
Overrides:
loadServices in class DeploymentEngine


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.