on 11-15-2005 8:36 PM
I would like to retrieve the instance ID programmatically, for server and dispatcher. For example, for the dispatcher the ID is 578900 and for the server the ID is 578600.
Could any one give me a favor to show how to do with it?
(I know that I can read it from systeminfo, but I really would like to get it programatically).
Best Regards
Are trying to do this from the java side or the ABAP side?
REgards,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, it is not really working.
One way might be using MBean for retrieving monitoring data since the cluster informations are monitored in the visual admin. However, the tutorial in
http://help.sap.com/saphelp_nw04/helpdata/en/25/19e7752be1c8459258a072d87e3a34/frameset.htm
and
http://help.sap.com/saphelp_nw04/helpdata/en/25/19e7752be1c8459258a072d87e3a34/frameset.htm
are not followable.
I could not find the javax.management.MBeanServer and com.sap.jmx.remote.JmxConnectionFactory.
Anyway, I think it is an inderect and complex way to retrieve a set of simple information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. You can find the com_sap_pj_jmx.jar , jmx_notification.jar and jmx.jar under the folders of serverX/bin. you use it compile your java source code.
2. you can open the application-j2ee-engine.xml , add the references to jmx, tc/jmx,com.sap.tc.logging and naming-api.
3. I think you can use the com.sap.jmx.remote.JmxConnectionFactory to get the instance of MBeanServerConnection to query instance id. for example.
MBeanServerConnection mbsc = JmxConnectionFactory.getMBeanServerConnection(JmxConnectionFactory.PROTOCOL_ENGINE_P4, p);
System.out.println(mbsc.getDefaultDomain());
ObjectName serverObjName = null;
try {
serverObjName = ObjectName.getInstance("com.sap.default:*,j2eeType=SAP_J2EEClusterNode,SAP_J2EECluster=J2E");
} catch (Exception e1) {
e1.printStackTrace();
}
Thank you again heilman.
I will try it tomorrow morning and return the result
to you again:-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I am writing a J2EE application.
Message was edited by: ning he
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Heilman
From java side.
And the Web AS is also Java instance.
I would like to retrieve the instance information remotely. Is it possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using a WebDynpro application?
Not sure if this will help you or not.
http://help.sap.com/saphelp_nw04/helpdata/en/25/19e7752be1c8459258a072d87e3a34/frameset.htm
Regards,
Rich Heilman
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.