code: protected void activate(ComponentContext context, Map<String, Object> properties) {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "activate", PropertyService.hidePasswords(properties));
  
          String jndiName = (String) properties.get(JNDI_NAME);
          id = (String) properties.get("config.displayId");
  
          // avoid conflicts between server.xml data sources and app-defined data sources
          if (isServerDefined = "file".equals(properties.get("config.source")))
              if (jndiName != null && jndiName.startsWith("java:"))
                  throw new IllegalArgumentException(ConnectorService.getMessage("UNSUPPORTED_VALUE_J2CA8011", jndiName, JNDI_NAME, DATASOURCE));
              else {
                  String id = (String) properties.get(ID);
                  if (id != null && id.startsWith(PREFIX))
                      throw new IllegalArgumentException(ConnectorService.getMessage("UNSUPPORTED_VALUE_J2CA8011", id, ID, DATASOURCE));
              }
  
          lock.writeLock().lock();
          try {
              componentContext = context;
              this.properties = properties;
          } finally {
              lock.writeLock().unlock();
          }
  
          if (trace && tc.isEntryEnabled())
              Tr.exit(this, tc, "activate");
      }
docs: Declarative Services method to activate this component.
  Best practice: this should be a protected method, not public or private
  
  @param context for this component instance
  @param properties : Map containing service & config properties
  populated/provided by config admin