// setup pojosr to use our bundles
Map<String, List<BundleDescriptor>> config = new HashMap<String, List<BundleDescriptor>>();
config.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, bundles);
// create pojorsr osgi service registry
PojoServiceRegistry reg = new PojoServiceRegistryFactoryImpl().newPojoServiceRegistry(config);
return reg.getBundleContext();
}