try {
super.setup(managementClient, containerId);
log.debug("start of the domain creation");
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
URL keystore = tccl.getResource("security/jsse.keystore");
URL roles = getClass().getResource("cert/roles.properties");
final List<ModelNode> updates = new ArrayList<ModelNode>();
PathAddress address = PathAddress.pathAddress().append(SUBSYSTEM, "security")
.append(SECURITY_DOMAIN, APP_SECURITY_DOMAIN);
updates.add(Util.createAddOperation(address));
address = address.append(Constants.AUTHENTICATION, Constants.CLASSIC);
updates.add(Util.createAddOperation(address));
ModelNode loginModule = Util.createAddOperation(address.append(LOGIN_MODULE, "CertificateRoles"));
loginModule.get(CODE).set("CertificateRoles");
loginModule.get(FLAG).set("required");
ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
moduleOptions.add("securityDomain", APP_SECURITY_DOMAIN);
moduleOptions.add("rolesProperties", roles.getPath());
loginModule.get(OPERATION_HEADERS).get(ALLOW_RESOURCE_SERVICE_RESTART).set(true);
updates.add(loginModule);
// Add the JSSE security domain.