Change Application Deployment Location

Hi,

Is it possible to change the default deployment location of a WAR file?

When we deploy a WAR file, the server creates the deployment structure in the order of:

installation_path/server_name/application/j2ee-modules/ApplicationName_deployme ntNumber

For example while deploying a war file with Context Root ABCS for the first time on a Windows installation I would get:

C:\Sun\AppServer7\domains\domain1\server1\applications\j2ee-modules\ABCS_1

as my first time deployed folder structure.

In case I redeploy the application, the structure would change to:

C:\Sun\AppServer7\domains\domain1\server1\applications\j2ee-modules\ABCS_2

and so on. My question is can we stop the server from creating the trailing _deploymentNumber i.e. fix the deployment such that each time the deployed folder structure remains to be

C:\Sun\AppServer7\domains\domain1\server1\applications\j2ee-modules\ABCS

Thanks !!

Mrinal

[984 byte] By [Mrinal-Malhotra] at [2007-11-26 9:10:03]
# 1
If you undeploy the application before redeploying, then it will always deploy under C:\Sun\AppServer7\domains\domain1\server1\applications\j2ee-modules\ABCS_1Cheers
pts_forum at 2007-7-6 23:28:32 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

> If you undeploy the application before redeploying,

> then it will always deploy under

> C:\Sun\AppServer7\domains\domain1\server1\applications

> \j2ee-modules\ABCS_1

>

> Cheers

Hi,

I tried that didnt work exactly the way I expected, the only way I am getting it to the same, is too undeploy, restart the server and then deploy...doesnt work any other way.

I was hoping that there was a configuration or something that could be used to turn on and off this feature.

Mrinal

MrinalMalhotra at 2007-7-6 23:28:32 > top of Java-index,Application & Integration Servers,Application Servers...
# 3

hi Mrinal,

I have done the deploy/undeploy many times and I did not have to restart the appserver. Anyways, I don't think there's any way to get around this suffixing in Appserver 7. But the good news is there is no suffixing in Appserver 8.x. When you deploy an already deployed application, the directory structure under j2ee-apps/j2ee-web remains intact. A backup copy of the older deployment is taken.

Cheers,

Vasanth

pts_forum at 2007-7-6 23:28:32 > top of Java-index,Application & Integration Servers,Application Servers...
# 4

Unlike *NIX OS's -- Windows will not allow deleting of a file that is "in use". That is probably why you have to restart the server. You can find out if anything is using the file with the handy utility -- handle.exe

http://www.sysinternals.com/utilities/handle.html

In this case you could run this command:

handle ABC

and it would reveal which processes have locked any file with "ABC" in the path.

Note that if you have a command window open with the current directory set to anything at or under your deployed directory -- that counts as a lock.

Also if WIndows Explorer has a directory open -- that can lock files.

byronnevins2 at 2007-7-6 23:28:32 > top of Java-index,Application & Integration Servers,Application Servers...