|
Page Created :
FELIX :
How a POJO can access to the bundle context
How a POJO can access to the bundle context has been created by Clement Escoffier (May 03, 2007). Content: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 :
|
Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request
Unsubscribe or edit your notifications preferences
Unsubscribe or edit your notifications preferences
