in atomos/src/main/java/org/apache/felix/atomos/impl/base/AtomosBase.java [562:603]
public final void bundleChanged(BundleEvent event)
{
boolean connectionManaged = true;
String location = event.getBundle().getLocation();
switch (event.getType())
{
case BundleEvent.INSTALLED:
case BundleEvent.UPDATED :
addPackages(event.getBundle());
AtomosContent content = getByConnectLocation(location, true);
if (content != null)
{
debug("Bundle successfully connected %s", content);
connectionManaged = managingConnected.get().removeLastOccurrence(
content);
}
else
{
connectionManaged = false;
}
break;
case BundleEvent.UNINSTALLED :
connectionManaged = false;
break;
default:
break;
}
if (!connectionManaged)
{
lockWrite();
try
{
debug("Removing location %s as a connected location.", location);
connectedLocations.remove(location);
}
finally
{
unlockWrite();
}
}
}