Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
5.0.1.FINAL
-
None
-
Workaround Exists
-
Description
Using infinispan, we have multiple infinispan.xml files that are used to configure our caches. The overrides used on default and cache configurations work great for this. I noticed there is no override global configuration support. So I was trying to make my own for the stuff we needed. One of the items we need to "override" is the serialization configs (it is more additive than override).
When doing this I found that the SerializationType doesn't properly pass off the vistor to the AdvancedExternalizersType and thus I can't visit the Type or Configs, which would make doing this much easier.
I was hoping I could keep a List of AdvancedSerializationConfigs that it visits and then in my override method just add these Configs 1 by 1 to the SerializationType since it has the public methods to add AdvancedSerializers.
It seems to be just an oversight but I would expect the accept method of SerializationType to be the following instead (just added the accept to AdvancedExternalizersType).
public void accept(ConfigurationBeanVisitor v) { this.externalizerTypes.accept(v); v.visitSerializationType(this); }
Side note I noticed the AdvancedExternalizersType has addExternalizer as package level. It would be easier to just call that method instead of having to detect the id myself and whether an object or class is configured in the AdvancedSerializerConfig to decide what add to call, since I could just do a straight add of the Config.
Also there is no way to remove or detect what AdvancedSerializers are present on the SerializationType, which would be very helpful when trying to replace a given AdvancedSerializers. Or are the AdvancedSerializerConfigs used started at the end of the list? This would be preferable, because then I wouldn't care if another existed since the one I just added would take priority.