Yes That is one of the core principle of OSGi - to share common libraries by deploying them as bundles and declaring dependencies via basic OSGi semantic (import/export package etc...).
There are several tools out there that will help you to convert regular JARs into Bundle JARs. - Maven-bundle plug-in - Bundlor from SpringSource There are also many repositories (EBRs - Enterprise Bundle Repositories) that already publish "bundleized" versions of common JAR files. For example; you can find dom4j from SpringSource EBR: http://www.springsource.com/repository/app/search?query=dom4j Cheers Oleg On Feb 10, 2010, at 11:17 AM, Tom Kesling wrote: Hello, I'm trying to understand the correct approach for using common libraries in an osgi environment. For example, I have multiple bundles that include dom4j-1.6.1.jar. Is it possible to share this jar with multiple bundles without including it in each bundle? Is it a good idea to load common jars higher in the classpath so that all bundles are using a common class? Is it possible to take a jar like dom4j-1.6.1.jar and turn it into a bundle? Can someone explain what options exist and the pros/cons? Thanks, T _______________________________________________ OSGi Developer Mail List [email protected]<mailto:[email protected]> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
