You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Guillaume Sauthier <Gu...@objectweb.org> on 2004/09/29 13:17:25 UTC

Is there a way to reset AxisProperties ?

Hi team

I'v got a new problem with Axis for deployment/redeployment steps.

We are in the JOnAS Classloader hierarchy which is as follow:

commons (include Axis libs, with AxisProperties)
 |
apps (same as tomcat "shared" classloader)
 |
<webapp> (that expose the webservice)

If we deploy a first webapp, Axisproperties is intialized with the 
current ContextClassLoader (get from the Thread), all is working fine 
and the services are deployed.
After, I remove this webapp, so the <webapp> ClassLoader is removed and 
its ClassLoader stopped (we use tomcat as servlet container). But it 
remains a pointer on the Loader in the AxisProperties.loaders field.
Then, I try another deploy of my webapp (another <webapp> loader is 
created), but when AxisServlet want to get it's EngineConfiguration 
instance, it use the AxisProperties object with loaders field unmodified 
from previous deployment!
And all this results in an "Illegal Acces: Classloader has been stopped" 
from Tomcat !!!

This is because loaders field in AxisProperties is assigned only once.

So I am wondering if it is possible to add a static reset method that I 
can use to recreate the loader instance with the rights ClassLoaders .

Regards
Guillaume


Re: Is there a way to reset AxisProperties ?

Posted by Guillaume Sauthier <Gu...@objectweb.org>.
No more problem, I've found a workaroud.
I've created my own ThreadContextClassLoader that delegate to the 
current Context ClassLoader.

Regards
Guillaume

Guillaume Sauthier wrote:

> Hi team
>
> I'v got a new problem with Axis for deployment/redeployment steps.
>
> We are in the JOnAS Classloader hierarchy which is as follow:
>
> commons (include Axis libs, with AxisProperties)
> |
> apps (same as tomcat "shared" classloader)
> |
> <webapp> (that expose the webservice)
>
> If we deploy a first webapp, Axisproperties is intialized with the 
> current ContextClassLoader (get from the Thread), all is working fine 
> and the services are deployed.
> After, I remove this webapp, so the <webapp> ClassLoader is removed 
> and its ClassLoader stopped (we use tomcat as servlet container). But 
> it remains a pointer on the Loader in the AxisProperties.loaders field.
> Then, I try another deploy of my webapp (another <webapp> loader is 
> created), but when AxisServlet want to get it's EngineConfiguration 
> instance, it use the AxisProperties object with loaders field 
> unmodified from previous deployment!
> And all this results in an "Illegal Acces: Classloader has been 
> stopped" from Tomcat !!!
>
> This is because loaders field in AxisProperties is assigned only once.
>
> So I am wondering if it is possible to add a static reset method that 
> I can use to recreate the loader instance with the rights ClassLoaders .
>
> Regards
> Guillaume
>
>