4 Replies Latest reply on May 23, 2013 5:53 PM by cotton.ben

    AdvancedExternalizer<T> registration of closed-source Object

    cotton.ben

      Hi,

       

      In the attached Infinispan documentation it is cited that the AdvancedExternalizer API is used to register with the Infinispan run-time that a closed-source Object is to be marshalled/unmarshalled using the high-performance JBoss protocol (and not default JDK java.io.Serializable/Externalizable).

       

      However, no where in the attached documentation does it explicitly show how to do this with a closed-source Object that you wish to register with an AdvancedExternalizer.

       

      All that the attached document shows your users how to do is write a self-provided inner static Externalizer that you then register via

       

      GlobalConfigurationBuilder

         .defaultClusterBuilder

         .serialization

         .addAdvancedExternalizer( new Person.PersonExternalizer() );

       

      But this assumes that you have Person.java in the first place.  What about when you don't have the source code?

       

       

      E.g.  Let's say I have an Object in my application   org.closedsource.MyObject.class   with which I wish to do cache.put(K, myObject); operations to strore 'myObject' on mulitiple nodes on my Infinispan 5.3 grid.  I want all distributed put/get operations on my Grid that act on 'myObject' to use the JBoss Marshalling protocol as its serialization provider. 

       

      How do I do this?  Can you provide an explicit example?  The attached documentation does not help in this regard.

       

      Thanks,

      Ben