ConnectorServices.unregisterResourceIdentifier(raName, identifier);
}
public static void activate(OperationContext context, String raName, String rarName) throws OperationFailedException {
ServiceRegistry registry = context.getServiceRegistry(true);
if (rarName.contains(ConnectorServices.RA_SERVICE_NAME_SEPARATOR)) {
rarName = rarName.substring(0, rarName.indexOf(ConnectorServices.RA_SERVICE_NAME_SEPARATOR));
}
final ServiceController<?> inactiveRaController = registry.getService(ConnectorServices.INACTIVE_RESOURCE_ADAPTER_SERVICE.append(rarName));
if (inactiveRaController == null) {
throw new OperationFailedException("rar not yet deployed");
}
InactiveResourceAdapterDeploymentService.InactiveResourceAdapterDeployment inactive = (InactiveResourceAdapterDeploymentService.InactiveResourceAdapterDeployment) inactiveRaController.getValue();
final ServiceController<?> RaxmlController = registry.getService(ServiceName.of(ConnectorServices.RA_SERVICE, raName));
ResourceAdapter raxml = (ResourceAdapter) RaxmlController.getValue();
RaServicesFactory.createDeploymentService(inactive.getRegistration(), inactive.getConnectorXmlDescriptor(), inactive.getModule(), context.getServiceTarget(), inactive.getDeployment(), inactive.getDeployment(), raxml);
}