aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Changing properties file inside of an ear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Changing properties file inside of an ear" Watch "Changing properties file inside of an ear" New topic
Author

Changing properties file inside of an ear

Joshua Kay
Greenhorn

Joined: Jan 07, 2004
Posts: 7
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

Joined: Jan 07, 2004
Posts: 7
I can probably just deploy the ears exploded, since this is the development environment - any other thoughts?
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
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

Joined: May 17, 2003
Posts: 8
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing properties file inside of an ear
 
Similar Threads
Deploying EAR remotely to Websphere using ANT
Dynamic properties
InitialContext finds localhost on bound jboss [SOLVED]
deploy remotely using ANT
.ear files