• 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 the file-system instead of in the ear?

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application that is deployed and working well using Spring injection with the spring-ejb-properties.xml file compiled into the .ear file. The problem is that we have a few properties that need to change on a regular basis. Because the properties are compiled into the ear, whenever a property changes, I need to do a new release of the .ear. This is resulting in a recurring chore that seems unnecessary. Other containers, such as Karaf, allow property files to be located in the container's directory structure, and the values contained therein are passed to Spring for injection by the .jar files that use them.

Is there a way to do this with Weblogic without writing some custom doo-dad that will read the file off of the system and pass it into the .ear file?
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,

there are many methods by which this can be achieved.

If the properties file is outside ear/war specify its location using vm properties
like -Dproperty.file.path=/root/yourproperties.properties and access that using Syetm.getProperty("property.file.path");

Also, if you put the property files into a JAR and put it into that lib directory, that should work.

Let us know if this works.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic