WebSphere variables\". I read I can set one if I wanted, using AdminControl.setVariable and so on." />
开发者

Editing WebSphere variables - from wsadmin

There are "enviornment > WebSphere variables". I read I can set one if I wanted, using AdminControl.setVariable and so on.

But what if I want t开发者_开发问答o delete a certain veriable, from all possible scopes? I looked over the internet and found nothing substential on this.

The following thing can help me: A way to go over all of the scopes (clusters, servers, nodes): Then I can go over them, look for the variable and delete it. Any way of listing all servers, nodes and clusters?

Thank.


Starting from the InfoCenter article on Modifying variables using wsadmin scripting and Commands for the AdminConfig object using wsadmin scripting, you want to do something like this:

ls = java.lang.System.getProperty("line.separator");

# List all config objects in the cell by not passing a parent config object.
varSubsts = AdminConfig.list("VariableSubstitutionEntry").split(ls)

for varSubst in varSubsts
  varName = AdminConfig.showAttribute(varSubst, "symbolicName")
  if varName == "MyVarToDelete":
    AdminConfig.remove(varSubst)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜