views:

47

answers:

2

I would like to set up some per-node configuration in a weblogic cluster and need to access the node name from Java.

+1  A: 

The following might suffice in your case (the startup scripts set the weblogic.Name system property to the server name at server startup):

System.getProperty("weblogic.Name");
Pascal Thivent
Let me know if I misunderstood the requirements.
Pascal Thivent
A: 

Hi,

you can set system properties using -D option. If you are using a managed weblogic server with nodemanager you can set some propertie you want in the "Server Start" tab, in java options field. something like

-DVARIABLE_NAME=some_id_you_may_use

than in java code:

String sMyPropVariable = System.getProperty("VARIABLE_NAME");

[]s

Marcos Maia