How does a module add services along with the module archive file?

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By Deepal Jayasingha
  • 28 Jun, 2006

A: A module can add services when they deploy in Axis2. Module mar file can contain any number of service archive files. So when the module is present in modules directory Axis2 will make all the available services in it (if there are any). This is somewhat similar to module adding operations, but the difference being that you can put services archive files. Any of the libs or resources available in a module is visible to the services, because parent class loader of all the services in a module are module class loaders. How do you add module services:

  • You need to add folder called "aars" in the same level as META-INF
  • Need to list all the services in module archive file adding aars.list
  • Then put all the services archives files into "aars"

So module with services will look like below:

myModule.mar
META-INF
module.xml
org
apache
lib
aars
aars.list
service1.aar
service2.aar

The corresponding aars.list file will look like below:

    service1.aar
service2.aar

Applies To:

Apache Axis2/Java versions/nightly builds above 1.0