on 03-04-2008 9:04 PM
Hi,
I am writing external JMX client to monitor the following things:
Server State
NetWeaver Version
Can anyone help me with that ?
Thanks,
Urvish
Hi Urvish,
I had a similar problem figuring out via JMX if the instance is a server or dispatcher. The "problem" is, that "Entries" provides an array of Serializable: Here is my solution ( without try{}-catch() 😞
private static void printInstanceInfo(MBeanServerConnection mbsc, String nodeID, String cluster){
Object sapInfo[] = {-1,"unknown"};
ObjectName name = new ObjectName("com.sap.default:name=\"/System/System " + \\
Properties\",j2eeType=SAP_MonitorPerNode,SAP_J2EEClusterNode=" + \\
nodeID+",SAP_J2EECluster="+cluster);
Serializable temp[] = (Serializable[])mbsc.getAttribute(name, "Entries");
for (int index =0;index<temp.length;index++){
Serializable temp1[] = (Serializable[])temp[index];
if ( ((String)temp1[0]).equals("SAPSTARTUP") )
sapInfo[0] = Integer.valueOf((String)temp1[1]);
if ( ((String)temp1[0]).equals("SAP_J2EE_Engine_Version") )
sapInfo[1] = (String)temp1[1];
}
System.out.println("Status: "+sapInfo[0]);
System.out.println("Version Info: "+sapInfo[1]);
}
I hope, it helps.
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.