tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George S." <geor...@mhsoftware.com>
Subject Re: Registering Plugins, e.g. javax.imageio...
Date Tue, 10 Sep 2013 22:34:55 GMT

On 9/10/13 3:14 PM, Christopher Schultz wrote:
> -----
> Is there a way that I can specify something in the server.xml code
> that would register them? The only thing I can see is to create a
> org.apache.catalina.LifecycleListener and put the code to register
> the plugins in there.
>
> Is there some other way of doing it?
> How would you do it if you weren't running under Tomcat?
I only ever run Java with tomcat (or maybe ant), so I wouldn't know.
> Perhaps you have to place youe plugins under an "endorsed" directory
> (i.e. one specified via JAVA_ENDORSED_DIRS environment variable when
> using Tomcat startup scripts).
>
> - -chris
>

Well, I think this is how it's "supposed" to be done. However, the jar's 
internal getResourceAsStream() function is failing when it's trying to 
load properties that are built into the jar. This is being tested 
without a security manager. It looks like being run in 
java.endorsed.dirs is breaking the classloader. I did some research, and 
it looks like java.endorsed.dirs runs in Tomcat's Bootstrap classloader. 
The comments in the class loader howto don't make me optimistic that I 
could make this work.

I think I'm just going to follow through on my original idea of using a 
PluginLoader as a LifecycleListener



-- 
George Sexton
MH Software, Inc.
303 438-9585
http://www.mhsoftware.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message