Package org.apache.axis2.deployment
Class WarBasedAxisConfigurator
java.lang.Object
org.apache.axis2.deployment.DeploymentEngine
org.apache.axis2.deployment.WarBasedAxisConfigurator
- All Implemented Interfaces:
DeploymentConstants,AxisConfigurator
Processes the init parameters for the AxisServlet.
This allows the location of the axis2.xml and the module repository to be different from the default locations.
The init parameters support alternate file, or URL values for both of these.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the init parameter (axis2.repository.path) that when specified indicates the path to thestatic final StringThe name of the init parameter (axis2.repository.url) that when specified indicates the url to be usedstatic final StringThe name of the init parameter (axis2.xml.path) that can be used to override the default location for the axis2.xml file.static final StringThe name of the init parameter (axis2.xml.url) that when specified indicates the axis2.xml should be loaded using the URL specified as the value of this init parameter.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, wsToUnDeployFields 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, 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_DESCRIPTION_ALT, 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_ATTACHMENT, TAG_QNAME, TAG_REFERENCE, TAG_REPLICATION, TAG_SERVICE, TAG_SERVICE_BUILDER_EXTENSION, 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
ConstructorsConstructorDescriptionWarBasedAxisConfigurator(jakarta.servlet.ServletConfig servletConfig) Default constructor for configurator. -
Method Summary
Modifier and TypeMethodDescriptionvoidEngages the global modules specified in the configurationGets the axis configuration object by loading the repository.voidLoads the services within the repository.voidsetConfigContext(ConfigurationContext configContext) 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, loadFromClassPath, loadRepository, loadRepositoryFromURL, loadServiceGroup, loadServicesFromUrl, populateAxisConfiguration, prepareRepository, removeDeployer, setClassLoaders, setDeployers, setDeploymentFeatures, setWebLocationString, startSearch, unDeployMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.axis2.engine.AxisConfigurator
cleanup
-
Field Details
-
PARAM_AXIS2_XML_PATH
The name of the init parameter (axis2.xml.path) that can be used to override the default location for the axis2.xml file. When both this init parameter, and the axis2.xml.url init parameters are not specified in the axis servlet init-parameter, the default location of ${app}/WEB-INF/conf/axis2.xml is used. The value of this path is interpreted as a file system absolute path. This parameter takes precedence over the axis2.xml.url init parameter.- See Also:
-
PARAM_AXIS2_XML_URL
The name of the init parameter (axis2.xml.url) that when specified indicates the axis2.xml should be loaded using the URL specified as the value of this init parameter. If the axis2.xml.path init parameter is present, this init parameter has no effect.- See Also:
-
PARAM_AXIS2_REPOSITORY_PATH
The name of the init parameter (axis2.repository.path) that when specified indicates the path to the- See Also:
-
PARAM_AXIS2_REPOSITORY_URL
The name of the init parameter (axis2.repository.url) that when specified indicates the url to be used- See Also:
-
-
Constructor Details
-
WarBasedAxisConfigurator
public WarBasedAxisConfigurator(jakarta.servlet.ServletConfig servletConfig) throws DeploymentException Default constructor for configurator. This determines the axis2.xml file to be used from the init parameters for the AxisServlet in the web.xml. The order of initialization is according the the following precedence:- If the parameter axis2.xml.path is present, the value is webapp relative path to be used as the location to the axis2.xml file.
- Otherwise, if the parameter axis2.xml.url is present, the URL is used as the location to the axis2.xml file.
- Otherwise, when both of the above init parameters are not present, file is attempted to be loaded from <repo>/WEB-INF/axis2.xml.
- When none of the above could be found, the axis2.xml is loaded from the classpath resource, the value of DeploymenConstants.AXIS2_CONFIGURATION_RESOURCE.
- Parameters:
servletConfig- the ServletConfig object from the AxisServlet. This method is called from the init() of the AxisServlet.- Throws:
DeploymentException
-
-
Method Details
-
getAxisConfiguration
Gets the axis configuration object by loading the repository. The order of initialization is according the the following precedence:- If the parameter axis2.repository.path is present, this folder is used as the location to the repository.
- Otherwise, if the parameter axis2.repository.url is present, the URL is used as the location to the repository.
- Otherwise, when both of the above init parameters are not present, the web applications WEB-INF folder is used as the folder for the repository.
- Specified by:
getAxisConfigurationin interfaceAxisConfigurator- Returns:
- the instance of the AxisConfiguration object that reflects the repository according to the rules above.
- Throws:
AxisFault- when an error occurred in the initialization of the AxisConfiguration.
-
loadServices
public void loadServices()Loads the services within the repository. When the axis2.repository.path init parameter was present, we just call loadServices() in the deployment engine.
When the axis2.repository.url init parameter was present we load services from the respective URL value of the init parameter.
Otherwise, try to load the services from the /WEB-INF folder within the web application.- Specified by:
loadServicesin interfaceAxisConfigurator- Overrides:
loadServicesin classDeploymentEngine
-
engageGlobalModules
Description copied from interface:AxisConfiguratorEngages the global modules specified in the configuration- Specified by:
engageGlobalModulesin interfaceAxisConfigurator- Throws:
AxisFault
-
setConfigContext
- Overrides:
setConfigContextin classDeploymentEngine
-