• 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

Changing properties file inside of an ear

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all-
We are deploying ear files for a project. The war inside of the ear contains a config.properties file which dictates most of the settings.
I build with a custom ant script on windows, and deploy via a samba directory to WebLogic 6 or 7 (depending on app) on a Solaris 9 platform.

Is there a good way to change the properties file, somehow - without rebuilding the ear with my ant script every time?
For example, the J2EE app talks with a C++ server on a given port (i.e. 14000) and depending on which server I deploy to, that port will be different.
I can rerun the script easy enough, I would just prefer not to.
Thanks
Josh
 
Joshua Kay
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can probably just deploy the ears exploded, since this is the development environment - any other thoughts?
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IBM has a tool entittled earexpander the expands and collapses EARs. You cound expand. Edit. Collapse.
It comes with the 5.0 version for sure.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can change the properties file in runtime , by placing the properties file outside the ear in solaris...
Add this code in your run.bat of your AppServer
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -Dlfs.home=D:\lfshome
here D:\lfshome is the path where your property file lies.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic