Richard S. Hall wrote:
> 
> The two can be used to entirely the same thing (i.e., convert a JAR file 
> to a bundle):
> 
>     * For wrapping, you simply add OSGi metadata to your normally
>       generated JAR file manifest (i.e., you just have one JAR file).
>     * For embedding, you create a container JAR file with OSGi metadata
>       in its manifest and add the existing JAR file you want to embed
>       into the container JAR file and its its location to the
>       Bundle-ClassPath (i.e., you have two JAR files, one containing the
>       other).
> 
> The assumption here is you might not be able to modify an existing JAR 
> file so you embed it rather than wrap it to convert it to a bundle.
> 
> However, embedding provides a use case that wrapping cannot, which is 
> having your own private copy. In some cases, you don't want to convert a 
> JAR file into a bundle, you just want to use it inside your bundle. In 
> that case you embed it, add it to your Bundle-ClassPath and don't expose 
> it via Export-Package or whatnot, then it is your bundle's own private 
> library.
> 

Thanks Richard.

What you've written makes sense.  With that new knowledge, let me throw out
a couple statements that seem correct, and please let me know if I'm wrong:

* an embedded jar doesn't "wrap", it is "wrapped" by the "wrapping"
(enclosing and possibly exposing) bundle
* a wrapper bundle may or may not contain embedded jars
-- 
View this message in context: 
http://old.nabble.com/wrapping-vs.-embedding-jars-tp27920331p27922108.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to