On Sat, 15 Sep 2001 16:33, Paul Hammant wrote:
> I've made reasonable progress.  

kool.

> I am 90% sure that it's because catalina is tied to it's directory
> structure.

Probably - yes.

> - particularly for jar files.  i.e. me putting jars in lib/
> for the sar will never get catalina to work with Phoenix.  I suspect
> this because of lines like the below in
> org.apache.catalina.core.StandardContext to do with classloading
>
>         File directory = new File(System.getProperty("catalina.home"),
> "jasper");
>
> That also leads onto a second point, the thing relies on catalina.home
> being set to the root of it's peculiar directory structure.  In it's
> current form, it's just not going to be sarable.

Maybe the best thing for the long term is try to get the Catalina team to add 
an abstraction layer in there that is backwards compatible with their current 
system. I will have a look to see about the feasability of that.

> Or how about this as a proposal .... sar file format supports an
> environment.xml (instead of lib/*.jar) that looks like so...
>
>     <environment>
>        <env-vars>
>         <env-var name="catalina.home" value="${sar-root}/catalina"/>
>         <env-var name="catalina.base" value="${sar-root}/catalina"/>
>        <env-vars>

The above I don't like as it changes things at a JVM level for the aplication.

>         <classpath>
...snip...

may be workable. I guess I need to look at it more fully. However I think 
that the catalina system does some fairly rigid things with classpath and I 
suspect that what you suggest may not work. (Mainly as common has to be in 
parent ClassLoader to server ClassLoader (which can not be visible to 
servlets).

In the short term I suspect it may work better if common/** is put in 
${phoenix.home}/lib while server/** is put in ${app.dir}/lib

> Also, it would be handy for the Block to be able to get the root
> directory of where it's sar has been unpacked to.

like BlockContext.getBaseDirectory() ? ;)

> On the positive side, I think it might be possible for the service to be
> able to have essentially createVirtualHost(...) and publishWebApp(...)
> as methods.

sounds good.

> For those that are interested I am reimplementing the main method from
> org.apache.catalina.startup.Embedded.

Want to chuck it somewhere (avalonia??) so I can have a gander?

> Lastly, Catalina is going to use it's own connection manager and thread
> pool (without code changes, there is 0% change that we could get it
> using ours).

Actually IIRC some of the connection code in Cornerstone originally came from 
Catalina ;)

-- 
Cheers,

Pete

----------------------------------------------------------------
Fools ignore complexity.  Pragmatists suffer it.
Some can avoid it.  Geniuses remove it.
-- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept. 1982
----------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to