Modification d'un resource adapter MQ sur un WebSphere 7 en jython.


  • Script permettant de modifier le classpath et l'archivepath d'un ressource adapter.

  • ras = AdminUtilities.convertToList(AdminConfig.list('J2CResourceAdapter'))
    
    for ra in ras :
       desc = AdminConfig.showAttribute(ra, "description")
       if desc == "WAS 7.0 Built In WebSphere MQ Resource Adapter":
          print "Updating archivePath and classpath of " + ra
          AdminConfig.modify(ra, [['archivePath', "${WAS_INSTALL_ROOT}/installedConnectors/wmq.jmsra.rar"]])
          AdminConfig.unsetAttributes(ra, ['classpath'])
          AdminConfig.modify(ra, [['classpath', "${WAS_INSTALL_ROOT}/installedConnectors/wmq.jmsra.rar"]])
          AdminConfig.save()
       #end if
    #end for