code: public static String getAnnotatedTypeIdentifier(AnnotatedType annotatedType, Class<?> extensionClass) {
          //We use the symbolic name as a compromise between makeing the ID unique enough to allow multiple annotated types based on the same type 
          //to quote the javadoc: " This method allows multiple annotated types, based on the same underlying type, to be defined."
          //and allowing failover to work. Failover will fail if the BeanIdentifierIndex is not identical across all severs, and some of these
          //identifiers end up in the BeanIdentifierIndex. In particular problems hae been reported with ViewScopeBeanHolder
          Bundle bundle = FrameworkUtil.getBundle(extensionClass);
          String symbolicName = getSymbolicNameWithoutMinorOrMicroVersionPart(bundle.getSymbolicName());
          if (annotatedType != null) {
              return (annotatedType.getJavaClass().getCanonicalName() + "#" + extensionClass.getCanonicalName() + "#" + symbolicName);
          } else {
              return ("NULL" + "#" + extensionClass.getCanonicalName() + "#" + symbolicName);
          }        
      }
docs: Returns a unique identifying string for an annotated type. This method should be used when calling BeforeBeanIdentifer.addAnnotatedType()
  
  @param annotatedType the new annotated type you are createing. Null is an accepted value but should only be used if you know exactly what you are doing.
  @param extensionClass the CDI extension which is to call BeforeBeanIdentifer.addAnnotatedType()
  @return a String that uniquely identifies this annotated type.