<p>modifiedService.</p>

@param reference a {@link org.osgi.framework.ServiceReference} object.
@param service a {@link org.ops4j.pax.wicket.api.WebApplicationFactory} object.
17953
public void modifiedService(ServiceReference<WebApplicationFactory<?>> reference,
            WebApplicationFactory<?> service) {
        removeApplication(reference);
        PaxWicketApplicationFactory internalFactory =
            PaxWicketApplicationFactory.createPaxWicketApplicationFactory(context, service,
                reference);
        addApplication(reference, internalFactory);
    }
6636
@Reference(name = REFERENCE_ADMIN_OBJECT_SERVICES,
               service = AdminObjectService.class,
               policy = ReferencePolicy.DYNAMIC,
               cardinality = ReferenceCardinality.MULTIPLE)
    protected synchronized void addAdminObjectService(ServiceReference<AdminObjectService> reference) {
        String id = (String) reference.getProperty(ADMIN_OBJECT_CFG_ID);
        if (id != null) {
            String jndiName = (String) reference.getProperty(ADMIN_OBJECT_CFG_JNDI_NAME);

            addAdminObjectService(reference, id, false);
            if (jndiName != null && !jndiName.equals(id)) {
                addAdminObjectService(reference, jndiName, true);
            }
        }
    }
1231297
@Reference(service = MailSessionRegistrar.class,
                    policy = ReferencePolicy.DYNAMIC,
                    cardinality = ReferenceCardinality.OPTIONAL,
                    target = "(component.name=com.ibm.ws.javamail.management.j2ee.MailSessionRegistrarImpl)")
    protected void setMailSessionRegistrar(ServiceReference<MailSessionRegistrar> ref) {
        mailSessionRegistrarRef.setReference(ref);
        registerJavaMailMBean();
    }
1222480
@Override
	public Object getService(IServiceReference serviceReference) {
		final String sourceMethod = "getService"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(PlatformServicesImpl.class.getName(), sourceMethod, serviceReference);
		}
		Object result = null;
		BundleContext bundleContext = Activator.getBundleContext();
		if (bundleContext != null) {
			result = bundleContext
					.getService((ServiceReference<?>) serviceReference.getPlatformObject());
		}
		if (isTraceLogging) {
			log.exiting(PlatformServicesImpl.class.getName(), sourceMethod, result);
		}
		return result;
	}
480476
public void modifed(ServiceReference<ResourceFactory> ref) {
        String[] newInterfaces = getServiceInterfaces(ref);
        if (!Arrays.equals(interfaces, newInterfaces)) {
            unregister();
            register(ref, newInterfaces);
        } else {
            registration.setProperties(getServiceProperties(ref));
        }
    }
539849
@SuppressWarnings("unchecked")
    @Override
    public <S> S getService(ServiceReference<S> reference) {
        return (S) serviceImplementations.get(reference);
    }
833028
@Reference(name = KEY_JS_ADMIN_SERVICE, service = JsAdminService.class)
    protected void setJsAdminService(ServiceReference<JsAdminService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.entry(tc, "setJsAdminService", ref);
        jsAdminServiceref.setReference(ref);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.exit(tc, "setJsAdminService");
    }
287046
private function changeReference(Reference $reference, $serviceId)
    {
        if (method_exists($reference, 'isStrict')) {
            // Stay compatible with Symfony 2
            return new Reference($serviceId, $reference->getInvalidBehavior(), $reference->isStrict(false));
        }

        return new Reference($serviceId, $reference->getInvalidBehavior());
    }
531905
@Override
    public void serviceChanged(ServiceEvent event) {
        if (event.getType() == ServiceEvent.REGISTERED)
        {
        }
        if (event.getType() == ServiceEvent.UNREGISTERING)
        {
            service = null;
        }
    }
392738
@Override
	public HttpService addingService(
			final ServiceReference<HttpService> serviceReference) {
		LOG.debug("HttpService available {}", serviceReference);
		lock.lock();
		HttpService addedHttpService = null;
		try {
			if (httpService != null) {
				return super.addingService(serviceReference);
			}
			httpService = super.addingService(serviceReference);
			addedHttpService = httpService;
		} finally {
			lock.unlock();
		}
		try {
			listener.available(addedHttpService);
		} catch (Exception ignore) { // CHECKSTYLE:SKIP
			LOG.error("Cannot register", ignore);
		}
		return addedHttpService;
	}
117901
public Object addingService(ServiceReference reference)
    {
        HttpService httpService = (HttpService) context.getService(reference);

        String alias = this.getAlias();
        String name = this.getProperty(RESOURCE_NAME);
        if (name == null)
            name = alias;
        try {
            httpService.registerResources(alias, name, httpContext);
        } catch (NamespaceException e) {
            e.printStackTrace();
        }

        return httpService;
    }
1015586
@Reference(name = "rRSXAResourceFactory", service = RRSXAResourceFactory.class, policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
    protected void setRRSXAResourceFactory(ServiceReference<RRSXAResourceFactory> ref) {
        rrsXAResFactorySvcRef.setReference(ref);
    }
542697
@Override
    public final SessionDestroyedListener addingService(ServiceReference<SessionDestroyedListener> serviceReference) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Listener [" + serviceReference + "] has been added.");
        }

        final SessionDestroyedListener listener = context.getService(serviceReference);
        handler.addListener(listener);

        return listener;
    }
1318502
@Modified(id = "exporterServices")
    void modifiedExporterService(ServiceReference<ExporterService> serviceReference) {
        try {
            exportersManager.modified(serviceReference);
        } catch (InvalidFilterException invalidFilterException) {
            LOG.error("The ServiceProperty \"" + TARGET_FILTER_PROPERTY + "\" of the ExporterService "
                            + bundleContext.getService(serviceReference) + " doesn't provides a valid Filter."
                            + " To be used, it must provides a correct \"" + TARGET_FILTER_PROPERTY + "\" ServiceProperty.",
                    invalidFilterException
            );
            exportersManager.removeLinks(serviceReference);
            return;
        }
        if (exportersManager.matched(serviceReference)) {
            exportersManager.updateLinks(serviceReference);
        } else {
            exportersManager.removeLinks(serviceReference);
        }
    }
262455
public void updateLinks(ServiceReference<S> serviceReference) {
        for (D declaration : linkerManagement.getMatchedDeclaration()) {
            boolean isAlreadyLinked = declaration.getStatus().getServiceReferencesBounded().contains(serviceReference);
            boolean canBeLinked = linkerManagement.canBeLinked(declaration, serviceReference);
            if (isAlreadyLinked && !canBeLinked) {
                linkerManagement.unlink(declaration, serviceReference);
            } else if (!isAlreadyLinked && canBeLinked) {
                linkerManagement.link(declaration, serviceReference);
            }
        }
    }
531924
@Reference(service = ScheduledExecutorService.class,
               cardinality = ReferenceCardinality.MANDATORY)
    protected void setScheduledExecutorService(ScheduledExecutorService ref) {
        this.scheduledExecutor = ref;
    }
301077
public void
        modifiedWebApplicationFactory(WebApplicationFactory<?> webApplicationFactory, Map<String, ?> properties) {
        // TODO check if this is really needed or if we are fine with the normal remove/add provided by DS...
        synchronized (this) {
            removeServicesForServiceReference(webApplicationFactory);
            addServicesForServiceReference(webApplicationFactory, properties);
            reevaluateAllBundles(webApplicationFactory);
        }
    }