.addOperationValidationResolve("add", PathAddress.pathAddress(
PathElement.pathElement(SUBSYSTEM, getMainSubsystemName()),
PathElement.pathElement("resource-adapter", "*"),
PathElement.pathElement("connection-definitions", "*")))
.excludeFromParent(SingleClassFilter.createFilter(ConnectorLogger.class))
.configureReverseControllerCheck(null, new ModelFixer() {
@Override
public ModelNode fixModel(ModelNode modelNode) {
//Replace the value used in the xml
if (modelNode.get(Constants.RESOURCEADAPTER_NAME).hasDefined("myRA")) {
if (modelNode.get(Constants.RESOURCEADAPTER_NAME).get("myRA").get(Constants.CONNECTIONDEFINITIONS_NAME).get("poolName").get(Constants.ENLISTMENT.getName()).isDefined())
modelNode.get(Constants.RESOURCEADAPTER_NAME).get("myRA").get(Constants.CONNECTIONDEFINITIONS_NAME).get("poolName").get(Constants.ENLISTMENT.getName()).set(false);
if (modelNode.get(Constants.RESOURCEADAPTER_NAME).get("myRA").get(Constants.CONNECTIONDEFINITIONS_NAME).get("poolName").get(Constants.SHARABLE.getName()).isDefined())
modelNode.get(Constants.RESOURCEADAPTER_NAME).get("myRA").get(Constants.CONNECTIONDEFINITIONS_NAME).get("poolName").get(Constants.SHARABLE.getName()).set(false);
}
return modelNode;
}
});
KernelServices mainServices = builder.build();
org.junit.Assert.assertTrue(mainServices.isSuccessfulBoot());
KernelServices legacyServices = mainServices.getLegacyServices(modelVersion);
org.junit.Assert.assertTrue(legacyServices.isSuccessfulBoot());
org.junit.Assert.assertNotNull(legacyServices);
checkSubsystemModelTransformation(mainServices, modelVersion, new ModelFixer() {
@Override
public ModelNode fixModel(ModelNode modelNode) {
//Replace the value used in the xml
if (modelNode.get(Constants.RESOURCEADAPTER_NAME).get("myRA").get(Constants.CONNECTIONDEFINITIONS_NAME).get("poolName").isDefined()) {