1

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

2 Answers2

0

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.

Sampada
  • 2,931
  • 7
  • 27
  • 39
  • Thank you for your quick reply. – Luthien Nargothrond Apr 18 '16 at 08:58
  • As far as I've read online you seem to be right, however in prod environment Udeploy it's used to deploy the app. In prod there are no manual changes done as far as settings go, nor do we run any other wasadmin scripts after the deploy in order to set any configurations and yet, the settings at enterprise application level don't seem to be reset. I am missing a step/configuration file somewhere. – Luthien Nargothrond Apr 18 '16 at 09:46
  • The solution I went for is related to what you've suggested. Instead of doing it manually though, I wrote a wsadmin script in jython and I included it in the script that does the deploy just before the start of the server. – Luthien Nargothrond Apr 28 '16 at 13:38
0

Are you deploying an Enhanced EAR that contains a deployment.xml? What is the difference between an EAR file and a "WebSphere Enhanced EAR"?

If the EAR file contains the deployment.xml then when you deploy it the modified deployment.xml will be overwritten with the one from the EAR.

Community
  • 1
  • 1
mshenhouse
  • 69
  • 2