}
break;
case ConfigurationEvent.CM_UPDATED:
{
final BundleComponentActivator activator = componentHolder.getActivator();
if (activator == null)
{
break;
}
final BundleContext bundleContext = activator.getBundleContext();
if (bundleContext == null)
{
break;
}
TargetedPID targetedPid = factoryPid == null? pid: factoryPid;
TargetedPID oldTargetedPID = componentHolder.getConfigurationTargetedPID(pid, factoryPid);
if ( factoryPid != null || targetedPid.equals(oldTargetedPID) || targetedPid.bindsStronger( oldTargetedPID ))
{
final ConfigurationInfo configInfo = getConfigurationInfo( pid, targetedPid, componentHolder, bundleContext );
if ( checkBundleLocation( configInfo.getBundleLocation(), bundleContext.getBundle() ) )
{
//If this is replacing a weaker targetedPID delete the old one.
if ( factoryPid == null && !targetedPid.equals(oldTargetedPID) && oldTargetedPID != null)
{
componentHolder.configurationDeleted( pid, factoryPid );
}
componentHolder.configurationUpdated( pid, factoryPid, configInfo.getProps(), configInfo.getChangeCount() );
}
}
break;
}
case ConfigurationEvent.CM_LOCATION_CHANGED:
{
//TODO is this logic correct for factory pids????
final BundleComponentActivator activator = componentHolder.getActivator();
if (activator == null)
{
break;
}
final BundleContext bundleContext = activator.getBundleContext();
if (bundleContext == null)
{
break;
}