Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Properties file in EJB Ear  RSS feed

 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I have a simple question to all. I am developing a MDB. I have some configuration things and application related properties in a file
config.properties.

Normally in web application war, to make servlet or any java class file to read this we can keep in web-inf classes

But for EJB, where to keep such properties file to be read by ejb in ear.

I Kept in a folder called resources/ in ear root itself
and gave the path in manifest.mf of ejb.jar as

Classpath: resources/

But i am not able to pick it up. May i know the right approach for the same
 
Scott Selikoff
author
Bartender
Posts: 4087
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the method getResourceAsStream, it's useful for reading property files from within JARs.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!