Suppose there are two OSGi bundle's A and B exporting x and y package respectively. If there is a case where A is dependent on B's export and B on A's export which one should be started first. And suppose one wants to get the ServiceReference from shared registry in a different class(i.e. not in Activator class) then how to initialize the BundleContext object with the current bundle's context.
This might solve the case I mentioned above, about interdependency. Like A can use B's export in its start method of activator and B can use A's export in a different class's method when invoked