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.
Problems with projectiles on a 2d plane
Why does getting a missing key from java.util.HashMap[Long,Long] return 0L?
Passing HTML code to browser via java
Morphia changes className when updating fields from entity subclass
Check carry from long operation in java
How can I exclude some attributes with JAXB to be convertet to xml
Convert a text with special unicode to normal text (java)
how to access a struts2 property value in jsp?
Android - no such collation sequence: SQL_Latin1_General_CP1_CI_AS
Unable to instantiate an error in hive
Check the value of image is valid? or not?
Struts2 : ognl.MethodFailedException: Method “setMontant” failed for object dao.Operation#1ed5095
creating an array of variables
calling java program from Jsp on click
Java program runs fine in Eclipse but not as a .jar file
Java - How to use a Layout Manager in only a part of the window?