ModelNode response = ModelNode.fromBase64(result.getResponseText());
ModelNode payload = response.get(RESULT).asObject();
PoolConfig poolConfig = factory.poolConfig().as();
if(payload.hasDefined("max-pool-size"))
poolConfig.setMaxPoolSize(payload.get("max-pool-size").asInt());
else
poolConfig.setMaxPoolSize(-1);
if(payload.hasDefined("min-pool-size"))
poolConfig.setMinPoolSize(payload.get("min-pool-size").asInt());
else
poolConfig.setMinPoolSize(-1);
if(payload.hasDefined("pool-prefill"))
poolConfig.setPoolPrefill(payload.get("pool-prefill").asBoolean());
else
poolConfig.setPoolPrefill(false);
if(payload.hasDefined("pool-use-strict-min"))
poolConfig.setPoolStrictMin(payload.get("pool-use-strict-min").asBoolean());
else
poolConfig.setPoolStrictMin(false);
getView().setPoolConfig(ra.getArchive(), poolConfig);
}
});
}