On 08/03/2011 01:56, Konstantin Kolinko wrote:
> 2011/3/7  <ma...@apache.org>:
>> Author: markt
>> Date: Sun Mar  6 22:02:28 2011
>> New Revision: 1078595
>>
>> URL: http://svn.apache.org/viewvc?rev=1078595&view=rev
>> Log:
>> Clean-up, mainly unused code
>>
>> Modified:
>>    
>> tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java
>>
> 
> Apparently it was the alternative method to configure protocol handler
> for the jndi: URLs,  instead of using a custom URLStreamHandlerFactory
> implementation, as documented in JavaDoc for constructors of
> java.net.URL. [1]

Ah. I went looking for that but didn't find it.

This raises a question about how to handle custom protocols for both
Tomcat's jndi protocol and and application protocols. Prior to the
recent changes:
- Tomcat registered a custom URLStreamHandlerFactory
- Web applications had to use java.protocol.handler.pkgs
- When embedded and already using a custom URLStreamHandlerFactory,
Tomcat's jndi handler had to be manually registered by the embedding
code either by calling DirContextURLStreamHandler#setProtocolHandler()
or by manually setting java.protocol.handler.pkgs

With all of the recent changes:
- Tomcat registers a custom URLStreamHandlerFactory
- Web applications can register with Tomcat's URLStreamHandlerFactory or
use java.protocol.handler.pkgs
- When embedded and already using a custom URLStreamHandlerFactory, the
embedding Tomcat's URLStreamHandlerFactory has to used by the
application's URLStreamHandlerFactory.

This looks like a step backwards for the embedded case. I'll restore
Tomcat 7's support for registration via java.protocol.handler.pkgs

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to