Overview of independent Java™ archives (JARs) with OSGi applications

If you want your OSGi application to use packages in JAR files that were developed independently of your application, there are two primary approaches: In both of these approaches, the JAR file must first be in OSGi bundle format.
There are some advantages and disadvantages to each of these approaches that you should consider.
Table 1.
  Advantages Disadvantages
Including the JAR file in an OSGi application
  • Application is more self-contained
  • Less configuration to use the JAR file
  • If you have access to the source, you might want to modify the packages that you are including. In this case, there is less incentive to keep the archive separate
  • If there are changes to the archive after the application is deployed, you will need to uninstall and reinstall the whole application on the server
Depending on the JAR file without including it in an OSGi application
  • Application is more light-weight
  • Keeps libraries and code that is developed independently of your application separate
  • If there are non-breaking changes to the JAR file, you do not need to uninstall and reinstall a deployed OSGi application
  • Application is not self-contained
  • Configuration is required in the target runtime information of the development workspace
  • Configuration is required on the server

For more information about using independent JAR files with OSGi applications, see the following subtopics:

Icon that indicates the type of topic Concept topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: cexternal.jars.ovr.html