In Weblogic (10), how do I access the node name from Java?
I would like to set up some per-node configuration in a weblogic cluster and need to access the node name 开发者_运维问答from Java.
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");
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
精彩评论