cancel
Showing results for 
Search instead for 
Did you mean: 

J2EE ClusterID of the executing node in program

Former Member
0 Kudos

Hello All,

Can anybody help me with sample code to find ClusterID of the J2EE server node on which the program is running.

Trying to make some sort of debugging code to generate an iView which will tell that which server user is attached to based on the ClusterID.

I guess this code may need to read J2EE core services or depend on JSESSIONID cookie.

Thanks In advance.

Regards

Ashutosh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Ash,

What version are you using? With NetWeaver I found that it wasn't the JSESSIONID cookie, but saplb_, e.g., I could append "?saplb_=618025250" to the URL and it would to that Java server node. I double checked it by adding a test html file to each irj\root directory (and called it with "irj/test.html?saplb_*=<clusterid>").

Cheers,

Sean

Former Member
0 Kudos

Hello Seen,

Thanks for the reply and good to here from you after long time. We are live on EP6-SP2-Patch5.

You are right and we can use saplb_* to nevigate to a perticular node in NW and I will try to see if I can use that.

Currently my idea was to make a small component which on execution will give the server id on which it is getting executed. If user reports any problem I want to know which server he is working on.

Any other ides?

Best regards

Ashutosh

Former Member
0 Kudos

Hi,

Perhaps you could use the cluster service ?

API https://media.sdn.sap.com/javadocs/preNW04/SP2/60_sp2_javadocs/runtime_application_PDK/index.html

I think there is an example of how to use it in the PDK, but I am not sure if you can get the current cluster node form this service (I'll do something similar soon, so I'll probably face the same problem)

Cheers