I can get a list of instlled applications but how do I get the status using Jython?
Here is what I use based on Snehan's answer.
import string
def getAppStatus(appName):
# If objectName is blank, then the application is not running.
objectName = AdminControl.completeObjectName('type=Application,name=' + appName + ',*')
if objectName == "":
appStatus = 'Stopped'
else:
appStatus = 'Running'
return appStatus
def appStatusInfo():
appsString = AdminApp.list()
appList = string.split(appsString, '\r\n')
print '============================'
print ' Status | Application '
print '============================'
# Print apps and their status
for x in appList:
print getAppStatus(x) + ' | ' + x
print '============================'
appStatusInfo()
Sample output
============================
Status | Application
============================
Running | DefaultApplication
Running | IBMUTC
Stopped | some-ear
Running | another-ear
============================