• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Greenhorn
Posts: 21
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It Works!!
Thanks a lot Klaus!
 
reply
    Bookmark Topic Watch Topic
  • New Topic