cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically determine Web AS Central Instance

Former Member
0 Kudos

Hi,

Does anyone know if there is a way to determine what server is the Central Instance of the Java Cluster a portal is running on?

I tried the IClusterInformation API, but this only contains server <i>node</i> info, not server info

Thanks in advance!

Robin van het Hof

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

No one?

Former Member
0 Kudos

Come one guys, it can't be that hard...

Any good answers will be rewarded a free beer

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

What exactly do you want to do with this knowledge?

Former Member
0 Kudos

Hi Daniel,

We have developed a scheduled task service, and we want to run several services on only 1 server node.

We have several environments, each with a Central Instance with 1 server node, and multiple Dialog Instances with 4 server nodes each.

Users connect to the portal via a load balancer to one of the Dialog Instances (and not to the Central Instance's server node) so the Central Instance has a rather low memory consuption and CPU usage, and therefor this server is the most obvious choice for running servers on.

We want some services to run on only one node (data retrieved from these services will be stored in a database from where all server nodes on all DI's can access it)

We can manually specify for each environment the server node ID, but if this can be determined automatically this would reduce the risk of errors significantly.

Former Member
0 Kudos

Hi Robin,

I've never seen this information, it is not even present in any of the telnet commands I've seen (LSC would be most natural, http://help.sap.com/saphelp_nw04/helpdata/en/03/5d0b8d2cac2c4883c706defc12ed33/frameset.htm)

It might be available through some private API, but a service property with the id is IMHO the better choice.

There is indeed a need for having only a singleton of such services in a clustered environment.

You can reduce the configuration of the service by:

1. Create a separate service SAPEnvironmentService which contains one property with name SID. For each portal environment you use, use service configuration to set the SID SID of the system

2. In the each of your other service provide a property which can have different value for each SID. For example CI_CLUSTER_ID="EP1=35453;EP2=324324;EP3=32432".

In the code of your services, call the SAPEnvironmentService and find the SID you are currently in, and then select the right value.

In this way you need not configure the values after each redeployment.

Dagfinn

Former Member
0 Kudos

Hi Dagfinn,

Thanks for your reply! It seems rather useful, however, if we add more systems to our landscape, we still need to extend the list with additional SID's and server node id's

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Robin,

I am told that the way some internal NetWeaver services determine the central instance is by the name of the instance -- if it starts with JC, it is the central instance.

Yes, it is considered a little bit of a hack, but it is actually used.

Hope this helps.

Daniel

Former Member
0 Kudos

Of course, why didn't I think of this myself!

Thanks Daniel, points are rewarded

Answers (0)