avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Sevak and the tools.jar file
Date Sat, 13 Jul 2002 10:15:50 GMT
At 03:15 PM 7/13/2002 +0900, you wrote:
>Peter,
>    It sounds like there are 3 classloader scopes that we have to set up.

The way I would like to do it eventually is partly described at

http://jakarta.apache.org/ant/myrmidon/classloader.html

(If you translate antlib to mean .sar file)


>1) Is the launcher.   This classloader should have access to 
>phoenix-loader.jar and
>wrapper.jar but nothing else.

This is what the diagram calls system classloader.

>2) The actual Phoenix Container.  This classloader will have access to the 
>container
>specific jars as well as a set of common jars.

The diagram breaks this into two classloaders. One is "common" that is 
shared between container and applications. The other is container that is 
private to the container.

>3) The applications.   These classloaders will have access to the set of 
>common jars,
>the contents of the ext directory and the lib and classes directories in 
>their SAR-INF
>directories.

yep, however the ext directory is only searched if they declare 
dependencies in the manifest of jars. In other cases it will not be used.

>If this is the case, then why not use a direcory structure like the following:
>lib/               (launcher jars)
>lib/phoenix-loader.jar
>lib/wrapper.jar
>lib/Wrapper.DLL or libwrapper.so
>lib/container (container jars)
>lib/common  (common jars)
>lib/ext          (extension jars)

Originally they were separated the way they are separated now because thats 
how other app servers do it. However if you want to change it then thats 
fine with me.

>I will admit that I am a little unclear as to which jars are needed where 
>as far
>as the #2 / #3 classloaders I have not really delved into the Phoenix code
>much past the launcher.   I could go in making changes like a bull in a china
>shop, but that would probably be unadvisable <:-)  For example, I have not
>figured out where in the existing code, the jars in ext are being loaded.

They are loaded for .sar files in

org.apache.avalon.phoenix.components.classloader.DefaultClassLoaderManager#getOptionalPackageFor()

however the container will never make use of them.

>  Sevak
>is unable to find tools.jar if I place it there.  Currently it has to be 
>in the lib
>directory.


Unfortunately tools.jar does not comply with "Optional Package" spec and 
thus will not be able to be loaded as an extension.

>|I moved all of the lib jars into the bin/lib directory.  But was unable 
>to start Phoenix
>with Sevak.  It seemed to require that logkit, framework, 
>excalibur-containerkit,
>ant excalibur-i18n be in the common lib directory.

containerkit aswell? Hmmm ... thats a bug - I will look at it soon.

Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message