commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SCXML-247) Provide dedicated SCInstanceObjectInputStream to support proper dynamic class resolution in GroovyContext
Date Sat, 02 Jan 2016 22:23:39 GMT

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

Ate Douma resolved SCXML-247.
-----------------------------
    Resolution: Fixed

Fixed with new SCInstanceObjectInputStream, to be used for de-serialization of SCInstance,
specifically (and now required) when using Groovy language.

New implementation is tested through SerializableInitialBaseScriptTest, which iself is unmodified
but uses custom Groovy classes and ensures these are properly (de)serialized.

> Provide dedicated SCInstanceObjectInputStream to support proper dynamic class resolution
in GroovyContext
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SCXML-247
>                 URL: https://issues.apache.org/jira/browse/SCXML-247
>             Project: Commons SCXML
>          Issue Type: New Feature
>            Reporter: Ate Douma
>            Assignee: Ate Douma
>             Fix For: 2.0
>
>
> The GroovyContext requires custom deserialization of its variables to allow dynamic resolving
of Groovy Object classes.
> Currently this is done by temporarily 'intercepting' the default deserialization in readObject
through an extended ObjectInputStream with an override of the resolveClass method.
> However, this is not a reliable solution if/when the context variables contains an Object
also otherwise referenced in SCInstance (the (de)serialization root object).
> In that case two instances of such Object will be deserialized because the two ObjectInputStream
instances are not aware of each other.
> To solve this problem proper (see SCXML-239 for a use-case, which has been fixed 'quick
and dirty'), an extended ObjectInputStream implementation will be introduced.
> This SCInstanceObjectInputStream will allow to (temporarily) configure a resolveClass
callback method, which then can be leveraged by the GroovyContext readObject method.
> SCInstance deserialization hereafter then should use this SCInstanceObjectInputStream
class instead, at least when using Groovy. 
>  



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

Mime
View raw message