Moving WebSphere Application Server (WAS) configuration items from one environment to another is not always as easy as you might expect. Using the property based configuration feature of WAS might help. This however requires to create portable properties files when exporting the configuration item which requires to specify the ["PortablePropertiesFile", "true"] option when exporting the configration item using AdminTask.extractConfigProperties.
Another useful feature of the property based configuration interface in WAS is that it allows to export configuration IDs as well so that you can export very specific configuration items.
Here is a sample code fragment which exports configuration items of the name matches a provided list of names (or all if "*" is provided as the only list item) in a portable format.
def rtvWmInfo(wcvObjType, wcvObjNamesList, wcvOutDir):
for wmInfo in wmInfoList:
if (wmInfo != ''):
wmName = AdminConfig.showAttribute(wmInfo, "name")
if ((wmName in wcvObjNamesList) or ((len(wcvObjNamesList) == 1) and (wcvObjNamesList == "*"))):
print "Exporting %s object %s" % (wcvObjType, wmName)
fileName = os.path.join(wcvOutDir, wcvObjType + "_" + wmName + ".props")
AdminTask.extractConfigProperties(wmInfo, ['-propertiesFileName', fileName, "-options", [["PortablePropertiesFile", "true"]]])
Additional useful Links: