// check if the ServiceName contains any numeric identifiers, or if it's just the first activation of a RA.
// if the service name has a numeric part, then we need to get that numeric part and unregister that number
// from the map which hold the in-use numeric ids.
// @see registerResourceAdapter method for more details on how the service names are generated
if (!serviceName.equals(RESOURCE_ADAPTER_SERVICE_PREFIX.append(raName))) {
final ServiceName baseServiceName = RESOURCE_ADAPTER_SERVICE_PREFIX.append(raName).append(RA_SERVICE_NAME_SEPARATOR);
// if the service name doesn't start with the RESOURCE_ADAPTER_SERVICE_PREFIX.append(raName).append(RA_SERVICE_NAME_SEPARATOR)
// format, then it isn't a RA service
if (!baseServiceName.isParentOf(serviceName)) {
throw MESSAGES.notResourceAdapterService(serviceName);
}
// get the service name parts
final String[] parts = serviceName.toArray();
// get the numerical id which will be the last part of the service name