ClassLoader loader = (this.moduleId != null) ? moduleLoader.loadModule(this.moduleId).getClassLoader() : EmbeddedCacheManagerConfiguration.class.getClassLoader();
builder.classLoader(loader);
int id = Ids.MAX_ID;
for (SimpleExternalizer<?> externalizer: ServiceLoader.load(SimpleExternalizer.class, loader)) {
InfinispanLogger.ROOT_LOGGER.debugf("Cache container %s will use an externalizer for %s", this.name, externalizer.getTargetClass().getName());
builder.serialization().addAdvancedExternalizer(id++, externalizer);
}
} catch (ModuleLoadException e) {
throw new StartException(e);
}
builder.shutdown().hookBehavior(ShutdownHookBehavior.DONT_REGISTER);