• 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

property files in ejb tier

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using some third party jars which read some config data from property files( these files are again properietary). When I keep these property files in a folder and then set the classpath to the folder these jars run fine.
I am packing these jars in my Ear file and they are being used in ejb tier.When I used manifest.mf entry for the properties file and pack them in the ear, this doesn't work
The basic question is how does one read a property file in ejb-tier and where to package it ( something like WEB-INF/classes etc in web tier) so that they are automatically loaded by app server
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why dont you package it along with the EJB class files or put in some jar files in the ear.
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay here is the whole scenario,
I have aejb.jar and a thirdParty.jar. There are some properties file that thirdParty.jar uses. We are using the api of classes in this jar in aejb.jar.
The properties file I am packing alongwith aejb.jar but still the thirdParty.jar classes don't pick it.
In case I harcode them in classpath of weblogic they work
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you could solve the problem by adding a Class-Path entry for aejb.jar into the manifest.mf file inside thirdParty.jar. I'm not saying you should do this (I tend to avoid touching 3rd party stuff for as long as possible).
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't there a standard way of reading properties file in ejb tier? or nay specific way we can package them so that all jars pick them
reply
    Bookmark Topic Watch Topic
  • New Topic