code: public void register() {
          if (registration != null) {
              throw new IllegalStateException("Webapplication is already registered.");
          }
          validateNotNull(applicationName, "applicationName");
          validateNotNull(mountPoint, "mountPoint");
          Hashtable<String, Object> props = new Hashtable<String, Object>();
          props.put(Constants.APPLICATION_NAME, applicationName);
          props.put(Constants.MOUNTPOINT, mountPoint);
          props.put(Constants.CONTEXT_PARAMS, contextParam);
          registration = bundleContext.registerService(WebApplicationFactory.class, this, props);
      }
docs: <p>register.</p>