开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜