• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing properties file inside of an ear

 
Joshua Kay
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I can probably just deploy the ears exploded, since this is the development environment - any other thoughts?
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • 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.
 
jaya jaya
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic