tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Compagner <jcompag...@servoy.com>
Subject tomcat 8 depends on URL.setURLStreamHandlerFactory method
Date Wed, 01 Oct 2014 15:59:23 GMT
Hi,

we have tomcat completely as an OSGI plugin project:

https://github.com/Servoy/servoy-eclipse-tomcat/tree/master/org.apache.tomcat

so that we can start it from our eclipse application and also dynamically
add servlets and filters from all kinds of plugins (so everything is osgi
based)

Our app uses websockets quite heavily so  i thought lets update now to the
latest 8 that has a lot of improvements in this area.

Problem is that in StandardRoot

https://apache.googlesource.com/tomcat/+/defeda9492a54194ea56e4a8220069608a7aa8f0/java/org/apache/catalina/webresources/StandardRoot.java

there is a line:

TomcatURLStreamHandlerFactory.register();

in the internalInit

this tries to call URL.setURLStreamHandlerFactory(this);
in the constructor of that TomcatURLStreamHandlerFactory class

but this is in eclipse or i guess in an osgi environment not really possible
because that is already set so now it bombs out with "factory al ready set"
error

Is there any workaround for this or is there any way to improve tomcat 8 so
that it places nicer inside an osgi container like eclipse?

Or am i really stuck at Tomat 7 for now (and quite some time to come )

-- 
Johan Compagner
Servoy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message