Updating ejb deployment descriptor in installed applications with the wsadmin tool

open wsadmin shell


ksh ./wsadmin.sh -lang jython -conntype SOAP -host yourhost.com -port 8879 -user userid -password password

print AdminApp.update('MyAppName', 'file', '[-operation update -contents /home/users/sg/1.xml -contenturi MyEJB.jar/META-INF/ejb-jar.xml]')

where

  • ‘MyAppName’ is display name of my application, deployed with .ear file
  • /home/users/sg/1.xml ejb deployment descriptor that I want to update in my application
  • MyEJB.jar/META-INF/ejb-jar.xml MyEJB.jar is the ejb deployed with in enterprise application (EAP), I want to update deployment descriptor of this ejb.
  • NOTE that -contenturi is
    MyEJB.jar/META-INF/ejb-jar.xml
    NOT
    MyEJB.jar,META-INF/ejb-jar.xml
    if you put , instead of / you will get
    com.ibm.websphere.management.exception.AdminException: ERROR: File does not exist for update operation

    P.S always look in dmgr logs for errors in deployment.