code: @Override
      public void beginContext(CDIArchive archive) throws CDIException {
          JndiHelperComponentMetaData cmd = null;
  
          MetaData metaData = archive.getMetaData();
          if (archive.isModule()) {
              ModuleMetaData moduleMetaData = (ModuleMetaData) metaData;
              cmd = new JndiHelperComponentMetaData(moduleMetaData);
          } else {
              ApplicationMetaData applicationMetaData = (ApplicationMetaData) metaData;
              cmd = new JndiHelperComponentMetaData(applicationMetaData);
  
          }
  
          ComponentMetaDataAccessorImpl accessor = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor();
          accessor.beginContext(cmd);
      }
docs: {@inheritDoc}