Search code examples
deploymentwebspheresetting

settings reset in webpshere 7 after application deployment


I am using Websphere 7 to deploy a Web project. At the Enterprise Application level in Webpshere I am making some settings related to cookies. I am changing the name of the cookie and marking it as secure. I hit save, I restart the app and all is well, the changes are applied.

The problem is that after I do another deploy the settings are being reset. I understand that these settings are saved into the deployment.xml file and I can see the changes I've done when I access it on the server (it's location is in the app's ear folder), however I do not understand where this file is being originally set. I did not find it anywhere in the code of the app.

How is it being overridden with the default settings after deployment? How can I make the settings persistent after a deploy?

Thank you


Solution

  • Any backend settings that are done at the application EAR level on Websphere get washed away when you uninstall the application.

    If you check the folder where deployment.xml resides, it would be something like AppServer/profile/profileXYZ/config/cells/application/EAR.ear/deployment/deployment.xml

    When you redeploy, first the earlier application gets undeployed and with this, the above application folder gets deleted alongwith the deployment.xml that you had modified.

    On a subsequent deploy, a new deployment.xml gets created. It references your configurations (as done in application.xml, ibm-application-bnd.xml, etc) and creates this file. If you have to change something like class loader policy for your WAR, sadly there is no other way than to do it manually after each redeploy.