public class ModuleDeployer extends AbstractDeployer
Standard Axis2 Module Deployer which use module.xml file to deploy Modules. ModuleDeployer can be used with Axis2 Module archive (.mar) or exploded directory structure. Some of the example formats given below.
Examples :
Further ModuleDeployer can be used to deploy Modules from a remote repository or load a repository from a JAR file. In this case module files access through URLs. To deploy Modules from a remote repository or JAR file it is expected to present modules/modules.list file which contains names of Modules.
Example :
jar:file:/home/resources/repo.jar!/repo/modules/modules.list may contains following list of service.
There are several approaches available to set repository URL to Axis2 run time. As an example one can provide repository URL as a init-param of AxisServlet. Some of the examples given below.
Example -1 :
<init-param>
<param-name>axis2.repository.url</param-name>
<param-value>http://localhost/repo/</param-value>
</init-param>
Example -2 :
<init-param>
<param-name>axis2.repository.url</param-name>
<param-value>jar:file:/home/resources/repo.jar!/repo/</param-value>
</init-param>
NOTE - It is discouraged to use above services.list based deployment approach because it does not support hot-deployment, hot-update and some of other important deployment features as well.
deploymentFileDataMap
Constructor and Description |
---|
ModuleDeployer() |
ModuleDeployer(AxisConfiguration axisConfig) |
Modifier and Type | Method and Description |
---|---|
void |
deoloyFromUrl(DeploymentFileData deploymentFileData) |
void |
deploy(DeploymentFileData deploymentFileData)
Process a file and add it to the configuration
|
void |
init(ConfigurationContext configCtx)
Initialize the Deployer
|
void |
setDirectory(String directory)
Set the directory
|
void |
setExtension(String extension)
Set the extension to look for
TODO: Support multiple extensions?
|
void |
undeploy(String fileName)
Remove a given file from the configuration
|
addServiceBuilderExtensions, cleanup, executeServiceBuilderExtensions, getServiceBuilderExtensions
public ModuleDeployer()
public ModuleDeployer(AxisConfiguration axisConfig)
public void init(ConfigurationContext configCtx)
Deployer
configCtx
- our ConfigurationContextpublic void deploy(DeploymentFileData deploymentFileData)
Deployer
deploy
in interface Deployer
deploy
in class AbstractDeployer
deploymentFileData
- the DeploymentFileData object to deploypublic void deoloyFromUrl(DeploymentFileData deploymentFileData)
public void setDirectory(String directory)
Deployer
directory
- directory namepublic void setExtension(String extension)
Deployer
extension
- the file extension associated with this Deployerpublic void undeploy(String fileName) throws DeploymentException
Deployer
undeploy
in interface Deployer
undeploy
in class AbstractDeployer
fileName
- name of item to removeDeploymentException
- if there is a problemCopyright © 2004–2019 The Apache Software Foundation. All rights reserved.