cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: setURLStreamHandlerFactory Question
Date Mon, 10 Jan 2000 15:39:05 GMT
Steve Muench wrote:
> 
> When I run Cocoon in my Oracle JDeveloper 3.0 IDE
> that gives me visual Servlet debugging, I get an error
> when Engine tries to:
> 
>   URL.setURLStreamHandlerFactory()
> 
> because it appears that my servlet engine has already
> set it before Engine tries to (giving a java.lang.Error
> exception "factory already set").
> 
> Is it an anomaly that my servlet engine would have
> already set this?

Gosh, didn't think of that one.

The Java API was not designed deep enough to cover all possible server
side cases where you have components running into servlets running into
applications running into sandboxes and so on...

I see the need for only one security manager (of course), but I fail to
see the need for having one and only one URL factory. 

"This method can be called at most once in a given Java Virtual
Machine."

Damn it: any component could provide it's own protocol handler, but
there is no way to register it, unless you write your own
HandlerFactory. True, there is another way to register your protocol
handlers, but this is not that portable nor legal. 

Anyway, I'll make sure that at least Cocoon doesn't fail when its
executing environment doesn't allow the URLHandlerFactory to be called.

Grrr.... 

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message