> 
> I think a solution for this problem. Let me explain.
> I have two bundles which are A and B,
> 
> A uses B and B uses A. So this makes circular dependency.
> 
> I decide to implement a new bundle C.
> This bundle holds only the interfaces of A and B.
> So A and B depends on bundle C. This breaks the circular dependency.

Yes. Good solution.
> 
> But another problem arises, if I change the interface's A in bundle C,
> all bundles must be stop and start in order to work correctly (A,B and
> C). 

If you update C with a change to its exported packages, then all importer 
will need to be refreshed to use the changes.

> Am I correct ? If this is correct, I cannot put all interfaces in
> a common bundle that is used by other bundles. Is there any other way
> that you can advice for me.

Why? If you only have 2 bundles A and B, then if A updated and changes an 
exported package, then all importers such as B will also need to be 
refreshed to see the changes. Net effect is no difference. Both A and B 
need to be refreshed.

-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788

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

Reply via email to