use of org.apache.felix.scr.annotations.Deactivate in project sling by apache.
the class AsyncHealthCheckExecutor method deactivate.
@Deactivate
protected final void deactivate(final ComponentContext componentContext) {
this.bundleContext.removeServiceListener(this);
this.bundleContext = null;
LOG.debug("Unscheduling {} jobs for asynchronous health checks", registeredJobs.size());
for (HealthCheckMetadata healthCheckDescriptor : new LinkedList<HealthCheckMetadata>(registeredJobs.keySet())) {
unscheduleHealthCheck(healthCheckDescriptor);
}
}
use of org.apache.felix.scr.annotations.Deactivate in project sling by apache.
the class LogTracer method deactivate.
@Deactivate
private void deactivate() {
if (logServlet != null) {
logServlet.unregister();
}
if (slingFilterRegistration != null) {
slingFilterRegistration.unregister();
slingFilterRegistration = null;
}
if (filterRegistration != null) {
filterRegistration.unregister();
filterRegistration = null;
}
ServiceRegistration reg = logCollectorReg.getAndSet(null);
if (reg != null) {
reg.unregister();
}
requestContextHolder.remove();
}
use of org.apache.felix.scr.annotations.Deactivate in project sling by apache.
the class WorkspaceCreator method deactivate.
@SuppressWarnings("unused")
@Deactivate
private void deactivate() {
Session s = null;
try {
s = repo.loginAdministrative(null);
Workspace w = s.getWorkspace();
deleteWorkspace(w, "ws3");
deleteWorkspace(w, "ws2");
deleteWorkspace(w, "ws1");
} catch (Exception e) {
// ignore
} finally {
if (s != null) {
s.logout();
}
}
}
use of org.apache.felix.scr.annotations.Deactivate in project jackrabbit-oak by apache.
the class LuceneIndexProviderService method deactivate.
@Deactivate
private void deactivate() throws InterruptedException, IOException {
for (ServiceRegistration reg : regs) {
reg.unregister();
}
for (Registration reg : oakRegs) {
reg.unregister();
}
if (backgroundObserver != null) {
backgroundObserver.close();
}
if (externalIndexObserver != null) {
externalIndexObserver.close();
}
if (indexProvider != null) {
indexProvider.close();
indexProvider = null;
}
if (documentQueue != null) {
documentQueue.close();
}
if (nrtIndexFactory != null) {
nrtIndexFactory.close();
}
// Close the copier first i.e. before executorService
if (indexCopier != null) {
indexCopier.close();
}
if (executorService != null) {
executorService.shutdown();
executorService.awaitTermination(1, TimeUnit.MINUTES);
}
if (extractedTextCache != null) {
extractedTextCache.close();
}
InfoStream.setDefault(InfoStream.NO_OUTPUT);
}
use of org.apache.felix.scr.annotations.Deactivate in project acs-aem-commons by Adobe-Consulting-Services.
the class AbstractDispatcherCacheHeaderFilter method deactivate.
@Deactivate
protected final void deactivate(ComponentContext context) {
for (Iterator<ServiceRegistration> it = filterRegistrations.iterator(); it.hasNext(); ) {
ServiceRegistration registration = it.next();
registration.unregister();
it.remove();
}
}
Aggregations