Hi,

I am sure you have been discussing about this problem in the past but I
couldn't find the relevant thread.
I apologize in advance if I am describing a known problem.

I am currently building a service on top of AXIS2. This service is using
classes that are conflicting with the classes distributed with the Axis2
web app.
The service is deployed as an aar file in the service directory of the
axis2 web application.

My question is simple: how can I ensure that the ClassLoader tries to
load first the classes packaged in my lib directory from the aar instead
of looking at the 'lib' directory of the axis2 webapp.

|_WEB-INF
  |_lib
    |_foo.jar
  |_services
    |_myService.aar
      |_lib
        |_foo.jar

I want to ensure that my service looks first for the
myService.aar/lib/foo.jar
As a workaround I tried to set the following with no luck before
invoking the Skeleton:

ClassLoader previous = Thread.currentThread().getContextClassLoader();
ClassLoader loader = msgContext.getAxisService().getClassLoader();
Thread.currentThread().setContextClassLoader(loader);

Thanks,

Arnaud
        

Reply via email to