// If no XML or programmatic config, id in annotation is used
// as long as it's not default one (meaning, user did not set it).
// If XML or programmatic config in use ignore @Marshalls annotation and use value in config.
Integer id = ext.getId();
if (config.getKey() == null && id == null)
throw new CacheConfigurationException(String.format(
"No advanced externalizer identifier set for externalizer %s",
ext.getClass().getName()));
else if (config.getKey() != null)
id = config.getKey();