for(Property child : children)
{
ModelNode value = child.getValue();
JcaWorkmanager entity = adapter.fromDMR(value);
if(value.hasDefined("long-running-threads"))
{
List<WorkmanagerPool> pools = parseThreadPool(value.get("long-running-threads").asPropertyList(), false);
entity.setLongRunning(pools);
}
else {
entity.setLongRunning(Collections.EMPTY_LIST);
}
if(value.hasDefined("short-running-threads"))
{
List<WorkmanagerPool> pools = parseThreadPool(value.get("short-running-threads").asPropertyList(), true);
entity.setShortRunning(pools);
}
else
{
entity.setShortRunning(Collections.EMPTY_LIST);
}
managers.add(entity);
}