docs: protected void activate(BundleContext context, Map<String, Object> props) {
          final String jndiName = (String) props.get("jndiName");
          final String urlValue = (String) props.get("value");
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "Registering JNDIURLEntry with value " + urlValue + " and JNDI name " + jndiName);
          }
  
          if (jndiName == null || jndiName.isEmpty() || urlValue == null || urlValue.isEmpty()) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Unable to register JNDIURLEntry with jndiName [" + jndiName + "] and value [" + urlValue + "] because both must be set");
              }
              return;
          }
  
          // Test that the URL is valid
          // creating a url should be a protected action
          createURL(jndiName, urlValue);
  
          Dictionary<String, Object> propertiesForJndiService = new Hashtable<String, Object>();
          propertiesForJndiService.put("osgi.jndi.service.name", jndiName);
          propertiesForJndiService.put(Constants.OBJECTCLASS, Reference.class);
  
          Reference ref = new Reference(URL.class.getName(), this.getClass().getName(), null);
          ref.add(new RefAddr("JndiURLEntry") {
              private static final long serialVersionUID = 5168161341101144689L;
  
              @Override
              public Object getContent() {
                  return urlValue;
              }
          });
  
          this.serviceRegistration = context.registerService(Reference.class, ref, propertiesForJndiService);
      }