in src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrProviderState.java [80:92]
void logout() {
if (logout) {
session.logout();
}
if (bundleContext != null) {
try {
bundleContext.ungetService(repositoryRef);
} catch (final IllegalStateException ise) {
// this might happen on shutdown / updates (bundle is invalid)
// we can ignore this.
}
}
}