Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Location of Property files  RSS feed

 
Nijeesh Balan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was looking for the best location to place the property files in a J2EE project.
Personally, I feel that it's better if it is outside the application ear. So you need not worry about the properties getting replaced by having old property files during ear installation or upgradation.
Please let me know your opinions as well.
Thanks & Regards,
Nijeesh.
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In our porject we had kept them at the root - that is the app server home.
Donno if it is the right approach.
Which app server are you using anyway?
Thanks and Regards,
Leena
 
Nijeesh Balan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response Leena.
We are using Websphere 4.0.5
If you have it in application root.. how do you manage for production and test environment.
Do you maintain two different ant build files?
Nijeesh.
 
Yatharth Kumar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nijesh,
Consider this approach, might work well for you:
Package your properties files in a jar file and place the jar along with other libraries that your server includes in the class path. As long as the jar is in the class path, you can read the properties files.
You can write a filter task in Ant to generate the properties files for different env. (if they are different for unit test, sit & prod.) and package them in a jar. This will form part of the distribution and can be kept separate from the EAR.
Hope this helps.
Y
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!