Apache

It is possible to a POJO to get its bundle context. A POJO can receive its bundle context as an argument of its constructor. The next code snippet show you an example :

public class ASimplePOJO{
	private BundleContext context;
	public ASimplePOJO(BundleContext bc) {
		context = bc;
		init();
	}}

As you see on the previous snippet, The bundle context is injected to the POJO. Then the POJO can use it as a 'normal' bundle context. The POJO code can :