[
https://issues.apache.org/jira/browse/IGNITE-5038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033259#comment-16033259
]
Nick Pordash commented on IGNITE-5038:
--------------------------------------
[~v.pyatkov] Thanks for the feedback, I am not sure what approach makes the
most sense at this time. I'm exploring a few options and will take it back to
the dev list.
[~vozerov] Agree with your #2 comment; however, caching of the deserialized
object can potentially be an issue even in the {{deserialize()}} case. I ran
into this yesterday since I have a service that creates a cache with
{{OnheapCacheEnabled}} and uses domain classes that are provided by a
{{ClassLoader}} created specifically for the service (since the services in
this case support dynamic class deployment). When the service gets reloaded -
and therefore we get a new {{ClassLoader}} - then {{deserialize()}} always
fails. I've had to disable {{OnheapCacheEnabled}} which isn't a big deal at the
moment, but it makes me wonder if there should be a way to configure the cache
so that {{deserialize()}} won't cache the result. IMO {{OnheapCacheEnabled}}
would still be useful in this case as it would avoid unnecessary allocations
copying from off-heap to on-heap with each read. I can take this to the mailing
list for further discussion.
> BinaryMarshaller might need to use context class loader for deserialization
> ---------------------------------------------------------------------------
>
> Key: IGNITE-5038
> URL: https://issues.apache.org/jira/browse/IGNITE-5038
> Project: Ignite
> Issue Type: New Feature
> Components: cache
> Affects Versions: 2.0
> Reporter: Dmitry Karachentsev
> Assignee: Vladislav Pyatkov
> Labels: features
> Fix For: 2.1
>
>
> There is a special use case discussed on the dev list:
> http://apache-ignite-developers.2346864.n4.nabble.com/Re-BinaryObjectImpl-deserializeValue-with-specific-ClassLoader-td17126.html#a17224
> According to the use case, BinaryMarshaller might need to try to deserialize
> an object using a context class loader if it failed to do so with a custom
> classloader (`IgniteConfiguration.getClassLoader()`) or the system one.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)