6.3.3. Register the Advanced Externalizer (Declaratively)
After the advanced externalizer is set up, register it for use with Red Hat JBoss Data Grid. This registration is done declaratively (via XML) as follows:
Procedure 6.1. Register the Advanced Externalizer
- Add the
global
element to theinfinispan
element:<infinispan> <global /> </infinispan>
- Add the
serialization
element to theglobal
element as follows:<infinispan> <global> <serialization /> </global> </infinispan>
- Add the
advancedExternalizers
element to add information about the new advanced externalizer as follows:<infinispan> <global> <serialization> <advancedExternalizers /> </serialization> </global> </infinispan>
- Define the externalizer class using the
externalizerClass
attribute as follows:<infinispan> <global> <serialization> <advancedExternalizers> <advancedExternalizer externalizerClass="org.infinispan.marshall.AdvancedExternalizerTest$IdViaAnnotationObj$Externalizer"/> </advancedExternalizers> </serialization> </global> </infinispan>
Replace the $IdViaAnnotationObj and $AdvancedExternalizer values as required.