Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Adam Monsen
You don't say which version of Tomcat you're using, but I guess 6.0 from your paths. Correct. I've tried both 6.0.16 and 6.0.20. You should take a close look at http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html . I read that page before posting to this list, along with other

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Pid
On 12/10/2009 08:42, Adam Monsen wrote: You don't say which version of Tomcat you're using, but I guess 6.0 from your paths. Correct. I've tried both 6.0.16 and 6.0.20. You should take a close look at http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html . I read that page before

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam, On 10/12/2009 3:42 AM, Adam Monsen wrote: My idea was that TransactionImport is the interface (abstract class, actually) that the webapp authors define and use in webapp code, and plugin authors need only to implement TransactionImport,

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Adam Monsen
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

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Adam Monsen
Do you have some kind of container-provided service that will be included? I'm not sure I understand the question, but I think the answer is no. Tomcat provides the servlet container, and it doesn't include much besides an implementation of the servlet API, right? If not, why not simply

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Pid
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!

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Pid
On 12/10/2009 19:28, Adam Monsen wrote: The interfaces are intended to be used only by plugins that can be added and removed from the webapp while it is shut down, Well as long as the user can explode the webapp, they just have to add files to the webapp /lib and you're in business. Much

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-12 Thread Adam Monsen
Well as long as the user can explode the webapp, they just have to add files to the webapp /lib and you're in business. Yes, this sounds like it should work for now, and I can look at writing a custom classloader or (gasp) OSGi if I need a more complex plugin system. Thanks, all.

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-11 Thread Pid
On 11/10/2009 00:53, Adam Monsen wrote: I have a Web application which includes an abstract class: TransactionImport. Hi Adam, (Is it in a package? If not, why not?) I compiled a subclass of TransactionImport (AudiBankImporter), placed the class in a jar, then placed the jar in

poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-10 Thread Adam Monsen
I have a Web application which includes an abstract class: TransactionImport. I compiled a subclass of TransactionImport (AudiBankImporter), placed the class in a jar, then placed the jar in $CATALINA_HOME/lib. What I'd like to do is load the compiled AudiBankImporter class from the Web

Re: poor-man's plugins: loading a subclass of a Web application class from common/lib

2009-10-10 Thread Peter Crowther
2009/10/11 Adam Monsen hair...@gmail.com: I have a Web application which includes an abstract class: TransactionImport. I compiled a subclass of TransactionImport (AudiBankImporter), placed the class in a jar, then placed the jar in $CATALINA_HOME/lib. What I'd like to do is load the