You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Giacomo Pati <gi...@apache.org> on 2001/02/12 14:53:57 UTC

Pluggable URL Factories

Hi all

I've just released a bunch of changes to get rid of the static getURL method 
from the NetUtil class. I've used the Avalon Context class to pass along the 
data necessary to the components (ServletContext, ClassLoader and 
ContextRoot). I thought that this class is exactly for that purpose (unless 
someone else make me belive the contrary). I'd like you people to have a look 
at it and give your comments about it.

Berin, I've seen you have commited a CocoonURLStreamHandlerFactory class two 
weeks ago. I haven't found if it was really used so I've short cicuit it. 

The reason why I'd like to get rid of those static methods is the ability to 
deploy several C2 under different servlet context which probably ISP like to 
do.

My next step will be to free the ClassUtils class from those unsane static 
methods which hinders multiple C2 servlet contexts in one VM.

Flames, suggestions and congrats are welcome :)

Giacomo

Re: Pluggable URL Factories

Posted by Giacomo Pati <gi...@apache.org>.
Berin Loritsch wrote:
> Giacomo Pati wrote:
> > Hi all
> >
> > I've just released a bunch of changes to get rid of the static getURL
> > method from the NetUtil class. I've used the Avalon Context class to pass
> > along the data necessary to the components (ServletContext, ClassLoader
> > and ContextRoot). I thought that this class is exactly for that purpose
> > (unless someone else make me belive the contrary). I'd like you people to
> > have a look at it and give your comments about it.
> >
> > Berin, I've seen you have commited a CocoonURLStreamHandlerFactory class
> > two weeks ago. I haven't found if it was really used so I've short cicuit
> > it.
> >
> > The reason why I'd like to get rid of those static methods is the ability
> > to deploy several C2 under different servlet context which probably ISP
> > like to do.
> >
> > My next step will be to free the ClassUtils class from those unsane
> > static methods which hinders multiple C2 servlet contexts in one VM.
> >
> > Flames, suggestions and congrats are welcome :)
>
> Another solution that I am trying to approach is enforce Servlet 2.3 style
> classloading on Servlet 2.2 containers.  There are a couple of details that
> have to be worked out though.  First of which is instantiating the Cocoon
> Object with the created ClassLoader.

Cool. Later on we have two implementations over which we can choose the 
better, easier or whatever solution.

> BTW, we can get rid of the CocoonURLStreamHandlerFactory class.  It isn't
> currently used, and I have had alot of problems with this approach.

Ok, will do right away.

Giacomo

Re: Pluggable URL Factories

Posted by Berin Loritsch <bl...@apache.org>.
Giacomo Pati wrote:
> 
> Hi all
> 
> I've just released a bunch of changes to get rid of the static getURL method
> from the NetUtil class. I've used the Avalon Context class to pass along the
> data necessary to the components (ServletContext, ClassLoader and
> ContextRoot). I thought that this class is exactly for that purpose (unless
> someone else make me belive the contrary). I'd like you people to have a look
> at it and give your comments about it.
> 
> Berin, I've seen you have commited a CocoonURLStreamHandlerFactory class two
> weeks ago. I haven't found if it was really used so I've short cicuit it.
> 
> The reason why I'd like to get rid of those static methods is the ability to
> deploy several C2 under different servlet context which probably ISP like to
> do.
> 
> My next step will be to free the ClassUtils class from those unsane static
> methods which hinders multiple C2 servlet contexts in one VM.
> 
> Flames, suggestions and congrats are welcome :)

Another solution that I am trying to approach is enforce Servlet 2.3 style
classloading on Servlet 2.2 containers.  There are a couple of details that
have to be worked out though.  First of which is instantiating the Cocoon
Object with the created ClassLoader.

BTW, we can get rid of the CocoonURLStreamHandlerFactory class.  It isn't
currently used, and I have had alot of problems with this approach.