1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
connect('weblogic','weblogic!','t3://monadminportal:7001')
print '-Cache-'
for c in mbs.queryNames(ObjectName("*:*,Type=Cache"),None):
print '*',mbs.getAttribute(c,'Name')
print ''
print '-Cache Manager-'
caches = mbs.queryNames(ObjectName("*:*,Type=CacheManager"),None)
for c in caches:
print c
mbi = mbs.getMBeanInfo(c)
print 'Attributes'
for a in mbi.getAttributes():
print '*',a.getType(),a.getName(),mbs.getAttribute(c,a.getName())
print ''
print 'Operations'
for o in mbi.getOperations():
print '*',o.getName()
print ''
print "Invoke 'flushCache of profileTypeCache'"
objs = jarray.array([java.lang.String("profileTypeCache")],java.lang.Object)
strs = jarray.array(["java.lang.String"],java.lang.String)
mbs.invoke(c,'flushCache',objs,strs)
print 'done' |
Partager