Sure, but it is more safe to use a bundle that has no dependencies at all.  You want to make sure there is no chance the bundle for the context being used to register the service is not wired to the service package you are registering the ServiceFactory for.

Tom

[email protected] wrote: -----

To: [email protected]
From: Scott Lewis <[email protected]>
Sent by: [email protected]
Date: 02/22/2011 03:13PM
Subject: Re: [osgi-dev] Classloader accessibility and ServiceTracker.open(true)

On 2/22/2011 12:35 PM, BJ Hargrave wrote:

> So as I understand it, the RSA use case for the extender is as
> follows (feel free to correct, I may not be stating things correctly):


RSA is not an extender. It does not read metadata from arbitrary bundles and "extend" them by performing actions on their behalf. Don't try and shoehorn RSA into the extender pattern. Tom was just explaining the extender pattern and why the framework handles class space consistency checks for them specially.

An RSA impl can take advantage of this support by using 2 bundles: one for defining the implementation of the Service Factory and another for a bundle context to register the service.
 
> Ok...thanks.  I will look into both BJ's dynamic dummy code and this

My example is not a dynamic dummy. It is a static dummy.

Right, I see this now.  But one question:  Can the proxyBundle be *any* other bundle or does it have to be a this static dummy bundle?  i.e. could it be (for example) one of the ECF core bundles?

Thanks,

Scott


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to