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
2010-09-26 00:59:11
Let me know if I misunderstood the requirements.
Pascal Thivent
2010-09-26 01:00:09
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
2010-09-29 04:56:56