Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Buddy class loading and blackbox components
Buddy class loading and blackbox components [message #515588] Fri, 19 February 2010 13:26 Go to next message
Markus Kuppe is currently offline Markus Kuppe
Messages: 177
Registered: July 2009
Senior Member
Hi,

how do I express buddy class loading if bundle A, which is supposed to
load classes of B, is a blackbox component and cannot be changed? I own
B though.

Thanks
Markus
Re: Buddy class loading and blackbox components [message #515606 is a reply to message #515588] Fri, 19 February 2010 14:18 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas Watson
Messages: 436
Registered: July 2009
Senior Member
In this case A must specify a buddy policy (either registered or dependent) to allow it to load any classes from a buddy. There is no way to force buddies onto a bundle that has no buddy policy.

The closest thing OSGi has to that behavior would be to make B a fragment of A. Then A will be able to load anything from B because all of the content from A and B will be loaded from the same class loader.

Tom.
Re: Buddy class loading and blackbox components [message #515610 is a reply to message #515588] Fri, 19 February 2010 09:24 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Markus Alexander Kuppe wrote:
> Hi,
>
> how do I express buddy class loading if bundle A, which is supposed to
> load classes of B, is a blackbox component and cannot be changed? I own
> B though.
>

it had to be turned from a jar into a bundle at some point, right? When
that happens, it needs the "Eclipse-BuddyPolicy: registered" (or similar
buddy policy statement) in its MANIFEST.MF.

The B can include "Eclipse-RegisterBuddy: A"

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/reference/misc/buddy_loading.html

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Buddy class loading and blackbox components [message #515615 is a reply to message #515610] Fri, 19 February 2010 14:29 Go to previous message
Markus Kuppe is currently offline Markus Kuppe
Messages: 177
Registered: July 2009
Senior Member
On 02/19/2010 03:16 PM, Paul Webster wrote:

> it had to be turned from a jar into a bundle at some point, right? When
> that happens, it needs the "Eclipse-BuddyPolicy: registered" (or similar
> buddy policy statement) in its MANIFEST.MF.

True, but this is out of my control as it is packaged by SpringSource. I
guess my only option is to file an enhancement request then.

Thx
Markus
Previous Topic:CXF DOSGi
Next Topic:java.lang.IllegalStateException: Registry Directory not available.
Goto Forum:
  


Current Time: Sat Oct 25 20:56:51 GMT 2014

Powered by FUDForum. Page generated in 0.01803 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software