WSO2Con 2013 CFP Banner

Starting Axis2 Using a Remote Repository

Discuss this article on Stack Overflow
By Deepal Jayasingha
  • 19 Sep, 2006
  • Level: 
  • Reads: 6909

Usually we use a local repository to start Axis2, but Apache Axis2 has the capability of picking up its configuration from a remote repository as well. This feature is very important in a clustering environment, where we can create multiple servers using one repository.

There are few things that one needs to remember when using Axis2 with a remote repository.

  1. Hot deployment feature will not work.
  2. You need to add two additional files into the repository named "services.list" and "modules.list" under modules and services directory respectively.
    • services.list file needs to list all the services (aar files) that you want to expose.
    • modules.list should list all the modules (mar files) that you want to use.

Let's say that you have two services called "foo.aar" and "bar.aar" in your services directory. Then your services.list file will look like below

services.list
foo.aar
bar.aar

The process is the same for modules as well.

After adding the 2 files your repository will look as follows:

Repository
services
services.list
foo.aar
bar.aar
modules
modules.list
mod1.mar
mod2.mar

Also, If your repository is located in "http://abc.com/axis2/repository" and you want to use axis2.xml file which is also located in "http://abc.com/axis2/axis2.xml", then you can create ConfigurationContext as follows:

ConfigurationContext conficgCtx =
ConfigurationContextFactory.createConfigurationContextFromURIs(
new URL("http://abc.com/axis2/axis2.xml"),

new URL("http://abc.com/axis2/repository"))

Applies To:

Apache Axis2/Java 1.0
WSO2Con 2014 USA