On 12/10/2009 19:06, Adam Monsen wrote:
I want to release my webapp first, then allow plugin authors to write
and load plugins at their leisure.
Have you looked at the ServiceLoader API?
No, I hadn't, but I just tried it out. Cool! I like that it hides guts
like Class.forName(). Thanks!
However, it doesn't get around the issues I'm facing trying to allow
folks to easily write plugins for my webapp.
No it doesn't, but then you're trying to do something that the spec to
which Tomcat conforms, doesn't support.
If the implementing class (in say impl.jar) is in myapp/WEB-INF/lib
But myapp/WEB-INF/lib is the exploded WAR dir, right? Folks generally
deploy our webapp on their own systems, so this means they'd have to
start up our app (Tomcat explodes the war), stop, copy impl.jar into
myapp/WEB-INF/lib, re-start.
Yes, exactly.
And can we count on Tomcat never blowing away the exploded WAR dir?
No, you can't.
Another option to get myapp/WEB-INF/lib is to include impl.jar (and
impl2.jar, impl3.jar) in our WAR, but we'd like to allow folks
deploying our webapp to write plugins, load, and unload them at their
leisure.
"Leisure"? Meaning 'very frequently' or 'very infrequently'.
Don't forget, you can't just add classes to a web application and expect
them to work. The web app will need to be restarted.
If they're adding them infrequently, what's the problem with a quick
restart?
I could speculate that it might be possible to create some kind of
dynamic ClassLoader, but you'd have to look elsewhere for advice on how
to do so.
p
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org