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 Glen Daniels <gd...@macromedia.com> on 2002/02/01 00:27:49 UTC
RE: Could we please take a second and discuss AxisClassloader (3r
d attempt)
> As to why the current thead contexts class loader was not
> able to load axis
> classes in dynamo, to tell you the truth it was a bit
> suprising to me
> also, but since presumably the classes which provide the
> web service are
> deployed along with the AxisServlet class. calling new
> SomeAxisClass().getClass().getClassloader() should resonably
> be able to
> access both axis classes and web service provider classes in
> a wide variety
> opf servlet containers since they are in the same set of jar files/ear
> file/war file. is this not the case in jrun. how do calls to
> new foo()
> work if it were not the case?
Actually, the question is precisely the reverse - i.e. I should be asking you that about Dynamo.
Here's JRun's classloader structure:
System Classloader
|
Server Classloader
/ \
Webapp1 CL Webapp2 CL
Axis gets loaded by the Server classloader, but the Webapp classloaders are the ones who have the WEB-INF/classes dirs on the classpath. So clearly, all the classes loaded by the Server classloader are available in all the Webapps, but NOT vice versa. And new Axis*().getClass().getClassLoader() will return the Server classloader for us.
Sooo... your turn. :) How do you think this works in Dynamo such that the current thread's classloader can't find the classes in WEB-INF? In other words - if a new Axis*() works for you, one would think the current WEB-INF (since that's where your axis.jar lives) would be somewhere in the classloader hierarchy starting at the current thread one.... no?
--Glen
Re: Could we please take a second and discuss AxisClassloader (3rd attempt)
Posted by Matt Bowersox <mb...@rochester.rr.com>.
>
> Actually, the question is precisely the reverse - i.e. I should be asking
you that about Dynamo.
>
> Here's JRun's classloader structure:
>
> System Classloader
> |
> Server Classloader
> / \
> Webapp1 CL Webapp2 CL
>
> Axis gets loaded by the Server classloader, but the Webapp classloaders
are the ones who have the WEB-INF/classes dirs on the classpath. So
clearly, all the classes loaded by the Server classloader are available in
all the Webapps, but NOT vice versa. And new
Axis*().getClass().getClassLoader() will return the Server classloader for
us.
>
> Sooo... your turn. :) How do you think this works in Dynamo such that the
current thread's classloader can't find the classes in WEB-INF? In other
words - if a new Axis*() works for you, one would think the current WEB-INF
(since that's where your axis.jar lives) would be somewhere in the
classloader hierarchy starting at the current thread one.... no?
>
> --Glen
>
I admit that my understanding of dynamos internals is not sufficient enough
to do anything but guess, but if pressed I would say it is due to the fact
that j2ee is just one modality for deploying servlets in dynamo and the
classloader heirarchy is deaper in atg's framework. When I debugged this
stuff the classname of the classloader I retrieved from the thread context
was an instance of an atg.somepackagename.CachingReusableClassloader,
whereas the one retrieved from a newly created axis objects was a
com.sun.applauncher type classloader implementation. Dynamo's architecture
is very copmplicated. j2ee development modalities coexists with their
nucleus bean/servlet component framaework (which is very very cool albeit
proprietary... fully typed indexed and bound bean properties from jhtml/jsp
to nucleus servlet beans etc ). A given dynamo instance can have multiple
j2ee containers each with multiple enterprise applications etc. The end
result being that the webapp classloader was the only one I could use load
new axis classes.
Dynamo's unorthadox architecture not withstanding, I did a medium
intensity perusal through the various j2ee/ servlet specs and determined
that while the semantics of the classloader is discussed, I did not find
specific guidance as to how a reference to the web containers classloader
should be obtained. and as I previously stated atg is j2ee certified further
emphasising that sun is not testing for classloader compliance to a
particular implementation specification at this granularity.
Do you think I should poke deeper into the specs or talk to sun/atg? or
would a discusions of a path forward be more apropriate? I am ok with
continuing to patch axis while it nears a more stable release version
however I think it would be nice if axis could be made to run unaltered on
all certified app servers. I am also curious if this going to be an atg only
problem. I would hate to see the need for an appserver interop matrinx in
addition too to the soap interop matrix ;-)