Convert Coherence POF Object byte array Vice Versa

Convert Coherence POF Object byte array Vice Versa

If you worked with Oracle Coherence you might be aware about POF (Portable Object Fomat). In this example I will show you how to convert Oracle POF object to byte and array so that object data can be send over the network to other server. In my case I had to send POF object to Solace publish queue and on the other end subscriber will deserialize to convert byte array to object and perform business logic on it:

  • Jar needed: coherence-12.1.3.0.2.jar (I used but you could use any latest compatible version)
  • To run below java class you will have to pass VM argument as below:

  • custom-types-pof-config.xml:

  • SerializeObjectToCoherenceFormat.java

  • I assumed you already created object and serialized in Coherence if not below is an example:
  • ChangeControlInfoModel.java:

  • ChangeControlInfoModelSerializer.java:

Leave a Reply

Your email address will not be published. Required fields are marked *