Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OSGi: How to add a 3rd party jar as a bundle?

 
Romit Bose
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am very new to OSGi. Actually I just bumped into Apache Felix by chance... I have started working on DAY CQ, which is built on JCR (JSR170) and uses Apache Felix to expose the services from all the vendor APIs and some of the 3rd party APIs. Now, being a total novice to this technology, I could not find a way to create a new OSGi bundle which will house a 3rd party API, (in my case, JDOM jar), and can be exposed so that I can use JDOM in my code.
It would be really helpful if someone could help me out with a way to do this.
The Web framework being used in this DAY framework is Apache Sling.

Thanks in Advance!
 
Franz van Betteraey
Greenhorn
Posts: 20
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you can first try to find a OSGi enabled version of the library. There are some repositories for that, e.g.

(1) http://www.springsource.com/repository
(2) http://repo.fusesource.com/

I found JDOM in (1).

If no OSGi enabed version exists, you have to "wrap" or "embed" the 3rd party jar.
You will find useful tools for that here:
http://wiki.ops4j.org/display/ops4j/Pax

especially:
http://www.ops4j.org/projects/pax/construct/
will be your friend.

Regards
Klaus
 
Romit Bose
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Klaus!
I'll definitely try these links ASAP and get back with any more queries!
Thanks again!
 
Romit Bose
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It Works!!
Thanks a lot Klaus!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic