Ate Douma created SCXML-247:
-------------------------------

             Summary: 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)

Reply via email to