Wednesday, 18 September 2013

wsadmin - Operations for AdminControl.invoke()


Firstly, you need to work out which operations you MBean supports

So if you have a Server object called server (i.e obtained using AdminControl.queryNames('type=Server,*') )
... you would do the following ....

wsadmin>print Help.operations(server)

Which would output something like this ...
java.lang.String getName()
java.lang.String getShortName()
int getThreadMonitorInterval()
void setThreadMonitorInterval(int)
int getThreadMonitorThreshold()
void setThreadMonitorThreshold(int)
int getThreadMonitorAdjustmentThreshold()
void setThreadMonitorAdjustmentThreshold(int)
java.lang.String getPid()
java.lang.String getCellName()
java.lang.String getCellShortName()
[Ljava.lang.String; getDeployedObjects()
[Ljava.lang.String; getJavaVMs()
java.lang.String getNodeName()
java.lang.String getNodeShortName()
java.lang.String getProcessType()
[Ljava.lang.String; getResources()
java.lang.String getServerVersion()
java.lang.String getServerVendor()
java.lang.String getState()
java.lang.String getPlatformName()
java.lang.String getPlatformVersion()
java.lang.String getInternalClassAccessMode()
java.lang.String getProductVersion(java.lang.String)
java.lang.String getComponentVersion(java.lang.String)
java.lang.String getEFixVersion(java.lang.String)
java.lang.String getPTFVersion(java.lang.String)
java.lang.String getExtensionVersion(java.lang.String)
[Ljava.lang.String; getVersionsForAllProducts()
[Ljava.lang.String; getVersionsForAllComponents()
[Ljava.lang.String; getVersionsForAllEFixes()
[Ljava.lang.String; getVersionsForAllPTFs()
[Ljava.lang.String; getVersionsForAllExtensions()
void stop()
void stopImmediate()
void stop(java.lang.Boolean, java.lang.Integer)
void stop(java.lang.String, java.lang.Integer)
void restart()
java.lang.String getObjectNameStr()
boolean isStateManageable()
boolean isStatisticsProvider()
boolean isEventProvider()
[Ljava.lang.String; getEventTypes()


If you wanted to invoke one of these operations you would do so as follows

AdminControl.invoke([mbean], '[operation]')

For example

AdminControl.invoke(server, 'getState()') 
 

No comments:

Post a Comment