code: public void dispose() {
          synchronized (this) {
              if (serviceRegistration == null) {
                  throw new IllegalStateException(String.format("%s [%s] had not been registered.", getClass()
                      .getSimpleName(), this));
              }
              serviceRegistration.unregister();
              serviceRegistration = null;
          }
      }
docs: Automatically unregister the {@link org.ops4j.pax.wicket.api.PageMounter} from the OSGi registry