When should osgi refresh be done?
Today I came across a situation when I updated bundle however the program continued working as there was no any changes in code. After some reading I understood that I have to do osgi refresh - the following code (found on SO): Bundle systemBundle = bundleContext.getBundle(0); FrameworkWiring frameworkWiring = systemBundle.adapt(FrameworkWiring.class); frameworkWiring.refreshBundles(null); So my question - when should I do osgi refresh? Only after update? After each bundle update or I can update N bundles and after that do refresh?
OSGi refresh needs to be done when you want OSGi to reinitialize wirings between packages. Usually this is needed after upgrading/downgrading some bundle's version. You may find also useful: What do these OSGi commands really do? or I can update N bundles and after that do refresh? If not deeping into details, that's the answer to your question. In practice, I observed situations when some frameworks which are not well adopted to OSGi, may cause ClassLoader memory leaks at the time of refresh, so be careful.
How to get Inventory FA fulfilled product using flipkart api
RxJava only emit item if another source will not item for some period
Java code that compiles in older Oracle versions gives compile error in Oracle 12.2
How to get the settings and how to change settings using adb commands
Can't build docker image via gradle on Windows 10
Custom JPA Bean Validator with parameters similiar to #Size
Java Null pointer exception thrown when checking length of blank excel cell
contextless sqlite “attempt to re-open an already-closed object” error in Android
How to retrieve contents on a web page using Java
set the link to edittext when get the link from browser
How to show notification on internet connect?
How to reuse navigation bar code?
#Converter(autoApply = true) not working
How to check is the button is selected in each radio group?
How cancel specific scheduled task?
java.io.FileNotFoundException when trying accessing localhost file in android physical device