|Re: Eclipse-BuddyPolicy: global question [message #500500 is a reply to message #499620]
||Thu, 26 November 2009 07:38
| Roland Tepp
Registered: July 2009
23.11.2009 16:52, Paul Webster kirjutas:|
> The advantage ... I think it's a hack to support 3rd party libraries
> that don't know about OSGi and use things like Class.forName(*). At
> least IMHO.
> If you're OSGi aware you wouldn't do that.
I would also warn against using BuddyPolicy if at all possible and
sticking to the most restrictive buddy policy possible, if not.
The experience has shown that using liberal BuddyPolicy can lead to
classloading deadlocks - and quite often these deadlocks manifest
themselves months later because of a seemingly small change will change
timing of class loading operations.
The issue with BuddyPolicy is that it inadvertently breaks the bundle
class loading hierarchy and can cause subtle but fatal dependency cycles
between bundles, which can lead to bundle class loaders acuiring locks
in an unpredictable order and getting into deadlock with another class
There is also a preformance issue that when a class needs to be loaded,
the more liberal the BuddyPolicy, the wider is the class name search
path on each class load.
One of the side-effects of a buddy policy is also that it may braks
Eclipse lazy-loading paradigm, by activating all bundles that get
visited due to the class loading request.
Don't mistake me - sometimes using BuddyPolicy is unavoidable, but You
must be aware that there be dragons under that road and tread with due
Powered by FUDForum
. Page generated in 0.05258 seconds