}
ManagementResourceRegistration subRegistration;
try {
subRegistration = overrideRegistration.registerSubModel(new SimpleResourceDefinition(pe, new SubSystemExtensionDescriptionProvider(ResourceAdaptersSubsystemProviders.RESOURCE_NAME, "deployment-subsystem")));
} catch (IllegalArgumentException iae) {
subRegistration = overrideRegistration.getSubModel(PathAddress.pathAddress(pe));
}
Resource subsystemResource;
if (!deploymentResource.hasChild(pe)) {
subsystemResource = new IronJacamarResource.IronJacamarRuntimeResource();
deploymentResource.registerChild(pe, subsystemResource);
} else {
subsystemResource = deploymentResource.getChild(pe);
}
ManagementResourceRegistration statsRegistration;
try {
statsRegistration = subRegistration.registerSubModel(new SimpleResourceDefinition(peStats, new StatisticsElementDescriptionProvider(ResourceAdaptersSubsystemProviders.RESOURCE_NAME, "statistics")));
} catch (IllegalArgumentException iae) {
statsRegistration = subRegistration.getSubModel(PathAddress.pathAddress(peStats));
}
Resource statisticsResource;