You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Denis Magda (JIRA)" <ji...@apache.org> on 2016/08/24 05:18:20 UTC

[jira] [Updated] (IGNITE-3501) Step-by-step guidance on how to configure and use binary types across Java and .Net

     [ https://issues.apache.org/jira/browse/IGNITE-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denis Magda updated IGNITE-3501:
--------------------------------
    Priority: Major  (was: Critical)

> Step-by-step guidance on how to configure and use binary types across Java and .Net
> -----------------------------------------------------------------------------------
>
>                 Key: IGNITE-3501
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3501
>             Project: Ignite
>          Issue Type: Improvement
>          Components: platforms
>    Affects Versions: 1.6
>            Reporter: Denis Magda
>            Assignee: Denis Magda
>              Labels: .net
>             Fix For: 1.8
>
>
> It's quite a common task and endeavor to work with objects, stored in Ignite caches, in their deserialized form on Java and .Net sides. This requires special setup at the configuration level. Presently we don't have a page that list this particular steps with examples. 
> The following can be used as a draft
> 1) Explicitly configure all your custom types on Java side using BinaryConfiguration.typeConfigurations property [1] or BinaryConfiguration.classNames property [2].
> 2) Explicitly configure the same corresponding .Net types on .Net side using  PlatformDotNetBinaryConfiguration.types property as it shown under XML tab on this page [3]. Remove BinaryConfiguration bean from .Net XML configuration if you use it before. Set additional required properties to PlatformDotNetBinaryConfiguration bean if BinaryConfiguration used any.
> 3) If you use custom keys then make sure that both "hashCode" and "equals" methods are implemented properly on both Java and .Net ends.
> 4) On .Net side you should implement IBinarizable interface [4] or go with Ignite Reflective Serialization [5] for your custom objects.
> 5) On Java side you can implement Binarizable interface as well or rely on reflective serialization making sure that your objects don't implement Externalizable interface and don't override readObject/writeObject methods [6].
> Please let me know if everything works fine on your side after applying the listed steps.
> Regards,
> Denis
> [1] https://apacheignite.readme.io/docs/binary-marshaller#configuring-binary-objects
> [2] https://ignite.apache.org/releases/1.6.0/javadoc/org/apache/ignite/configuration/BinaryConfiguration.html#setClassNames(java.util.Collection)
> [3] https://apacheignite-net.readme.io/docs/serialization#ibinarizable
> [4] https://apacheignite-net.readme.io/docs/serialization#ibinarizable
> [5] https://apacheignite-net.readme.io/docs/serialization#ignite-reflective-serialization
> [6] https://apacheignite.readme.io/docs/binary-marshaller#basic-concepts
> On .Net side the configuration must be provided for App.config, C# config and Spring XML.
> On Java side the configuration must be provided for Java and Spring XML configs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)