Retrive Payara OSGI Bundle Context

7 views
Skip to first unread message

Enrico Frasson

unread,
May 7, 2021, 6:43:56 AM5/7/21
to Payara Forum
Hi,

how can i retrieve Payara's OSGI bundleContext to install new bundles programmatically?
I'm migrating my app from Glassfish to Payara 5.2021.1.
With Glassfish i can  retrieve it in this way:

Bundle bundle = FrameworkUtil.getBundle(javax.annotation.Resource.class);
BundleContext bundleContext = bundle.getBundleContext();

But now with Payara the BundleContext is null.

Thanks
Enrico
Reply all
Reply to author
Forward
0 new messages