jQuery in Action, 3rd edition
The moose likes Websphere and the fly likes application property file deployment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "application property file deployment?" Watch "application property file deployment?" New topic

application property file deployment?

Shawn Kuenzler
Ranch Hand

Joined: Apr 16, 2006
Posts: 73
Could only find loosely related items in the search about this nor could I find good info on the web -- though I'm sure it's out there.

I'm using WebSphere 7.1 and trying to port my application from JBoss to deploy on WAS. I have deployed the EAR but I have some name/value property files and .xml files that I use in the JBoss deployment.

How do I go about deploying these files in WebSphere?


SCJP 1.5
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 446
I know of following options:

1. Keep the files completely outside the WAS directory structure. In this case you can pass the location of property file as JVM argument (using -D option). The only issue with this option is to physically deploy the file every time you release new builds. If your application is clustered then you need to perform this step in all the nodes/machines etc.

2. Keep the property file in classpath of the server and load it as a ResourceBundle. This option also requires manual copy step but you avoid the additional step of configuring the -D parameter.

3.Bundle the property files (and additional xml files) in the WAR/EAR file and access it from there using getResourceAsStream() method. The only issue here is that if you want to change property values without stop/start or redeploy of the EAR file. The advantage here is that no additional manual step of file copy is needed.

4. Keep the property files in "/<was_profile>/<dmgr>/config/cells/<cell name>" folder. The contents here can be synchronized with all the nodes using ISC console or syncnode command. The path to this location can be formed using following formula:
System.getProperties().getProperty("user.install.root") + "/config/cells/" + <cell name>

You can get the cell name using "com.ibm.websphere.management.AdminService" class. You need to manually copy file to the above location but WAS will synchonize it with all the nodes.

Hope this helps
I agree. Here's the link: http://aspose.com/file-tools
subject: application property file deployment?
It's not a secret anymore!