|
|
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.
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"))