code: public void loadProfile(Object key)
      {
          if (!isEnablePerThreadChanges())
          {
              throw new MetadataException("Can not load profile with disabled per thread mode");
          }
          DescriptorRepository rep = (DescriptorRepository) metadataProfiles.get(key);
          if (rep == null)
          {
              throw new MetadataException("Can not find profile for key '" + key + "'");
          }
          currentProfileKey.set(key);
          setDescriptor(rep);
      }
docs: Load the given metadata profile for the current thread.