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

  1. Add the global element to the infinispan element:
    <infinispan>
      <global />
    </infinispan>
    
  2. Add the serialization element to the global element as follows:
    <infinispan>
      <global>
        <serialization />
      </global>
    </infinispan>
    
  3. Add the advancedExternalizers element to add information about the new advanced externalizer as follows:
    <infinispan>
      <global>
        <serialization>
          <advancedExternalizers />
        </serialization>
      </global>
    </infinispan>
    
  4. 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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.