cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject Re: Proposal: URL Protocols
Date Wed, 31 Jan 2001 23:44:59 GMT
----- Original Message -----
From: Stefano Mazzocchi <stefano@apache.org>
To: Donald Ball <balld@webslingerZ.com>
Cc: <cocoon-dev@xml.apache.org>
Sent: Wednesday, January 31, 2001 7:06 AM
Subject: Re: Proposal: URL Protocols


> Yes, some code can specify a URLHandlerFactory only once per JVM. No
> problem for applications, but for servlets, there is a high chance that:
>
> 1) the servlet engine has already installed one (happens with WebLogic,
> for example)
> 2) another servlet has already installed one (happens for ISP who have
> different cocoon instances on different virtual hosts)
>
> So, using the 'new URL()' method is highly discouradged.

Yep, I ran into this already.  I tried to manually create the URL with an
alternative constructor, but it didn't work either.  Right now, NetUtils is
the
only thing that gives you access to "context:" and "resource:" pseudo
protocols.

> I think the best solution would be to have something like a URL package
> for Avalon that doesn't have these limitations and provides a way to
> register more than one URLHandler into a singleton factory. But it's not
> trivial and didn't have time to go in that direction.

Really, that won't help in a Servlet Environment.  We would be able to do
it for a Servlet Engine built on Avalon or the Potrero Enterprise
Application
Server (yet to be written) built on Avalon--but it won't help a servlet that
is
instantiated long after the System ClassLoader.

> > > Ability to use the loaded ClassPath (no more parsing of the classpath
> > > attributes), ability to use streams (java input stream, and class
> > > output stream).
> > >
> > > That way we won't need the repository at all (except for debugging
> > > purposes)--as we can directly serialize the XSP java stream into
> > > the compiler and directly load the class by stream into the
> > > classloader.
> >
> > oooh. sexy.
>
> No, you can't do that. All java compilers in existance work on files,
> not streams. Pier and I proposed a rough JSR for the java community
> process to fix this and create "Java API for compilation" but that went
> nowhere.

We were just dreaming aloud.  If only we could convince our good friends
at IBM to do that for Jikes...



Mime
View raw message