• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can library jars be inside an ejb jar?

 
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Is there a place in an EJB jar's directory structure for other jars for use by the EJB? Something like the WEB-INF/lib in web applications?

Thank you,
Yuriy
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is there a place in an EJB jar's directory structure for other jars for use by the EJB? Something like the WEB-INF/lib in web applications?


Not really. Although different vendors offer different packing solutions and they have different classloading architectures for their containers, it is most common that the common library to be packed within the same ear (where the ejb goes) and edit the manifest file of each ejb-jar file. For example if you intend to make iText.jar and commons-collections.jar available to your ejbs, then you should add the next line to the MANIFEST.MF file of each ejb-jar that needs to use those libraries:

This example assumes that both iText.jar and commons-collections.jar libraries get packed into the ear�s root (otherwise you need to specify the proper path as well).
Regards.
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All right, thanks!

-Yuriy
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're most welcome
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic