pibase / jspf

Automatically exported from code.google.com/p/jspf
0 stars 0 forks source link

Loading several pugins with one classloader #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello Ralf,

Is it possible to group several plugins with one classloader?

In my real-life case each plugin has several cross-dependent Apache Cayenne 
(database persistence engine) classes. When one class tries to resolve another 
it failes as doesn't recognize second because the second came from another 
classloader.
I had to write several helper methods in each plugin to load Apache Cayenne 
class from plugin when it required by main application, so in such "snowflake" 
scheme it's ok. But when I try to convert "snowflake" to "web" the problem 
arises.

So I propose a grouping (based on "codeword" or other plugin dependency) for 
loading plugins with one classloder.

Your opinion?

Thanks,
Maxim

Original issue reported on code.google.com by McSe...@gmail.com on 22 Sep 2010 at 9:09

GoogleCodeExporter commented 9 years ago
Hi Maxim, 

Thanks for your report. However, I am not fully convinced yet that this is a 
good idea in terms of maintainability and JAR-hell. Ideally each plugin should 
be fully self-contained, exposing only "lightweight" interfaces (i.e., small 
interfaces with only JRE default classes). 

However, should it be implemented, the "codeword" you proposed (and 
alternatively an option for addPluginsFrom()) would probably be the solution of 
choice. 

Give me some time to consider this issue, it is also closely related to Issue 
#18. 

Kind regards
Ralf

Original comment by r.biedert on 23 Sep 2010 at 8:57

GoogleCodeExporter commented 9 years ago
Hi Ralf,

I understand this feature will require some changes in framework architecture, 
so eventually it will come to something like OSGI monster.

I will think how such issues can be solved not twisting current framework.

Thanks,
Maxim

Original comment by McSe...@gmail.com on 23 Sep 2010 at 9:38

GoogleCodeExporter commented 9 years ago
Hopefully fixed (please get 0.9.1a from the downloads and test!). Also see 
http://code.google.com/p/jspf/wiki/FAQ -> Multiplugins.

Original comment by r.biedert on 23 Sep 2010 at 3:42