}
try {
ConfigSupport.apply(new SingleConfigCode<Domain>() {
public Object run(Domain d) throws PropertyVetoException, TransactionFailure {
Nodes nodes=d.createChild(Nodes.class);
Transaction t = Transaction.getTransaction(d);
if (t==null)
return null;
for( NodeAgent na: agList){
String host=null;
Node node = nodes.createChild(Node.class);
node.setName(na.getName());
node.setType("CONFIG");
JmxConnector jc = na.getJmxConnector();
if (jc != null){
List<Property> agentProp =jc.getProperty(); //get the properties and see if host name is specified
for ( Property p : agentProp) {
String name = p.getName();
if (name.equals("client-hostname")) {
node.setNodeHost(p.getValue()); //create the node with a host name
node.setInstallDir("${com.sun.aas.productRoot}");
}
}
}
nodes.getNode().add(node);
}
// Now add the builtin localhost node
createDefaultNode(d, nodes);