You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Rahul Akolkar (JIRA)" <ji...@apache.org> on 2006/10/05 22:31:21 UTC

[jira] Commented: (SCXML-20) A Suggestion to enhance SCXMLExecutor and SCInstance class to support state persistence

    [ http://issues.apache.org/jira/browse/SCXML-20?page=comments#action_12440239 ] 
            
Rahul Akolkar commented on SCXML-20:
------------------------------------

The Commons SCXML Java object model for state machines as well as the SCXMLExecutor instances are now Serializable. It'd be great if you could try a latest nightly (20061006 and up) from this URL:

 http://people.apache.org/builds/jakarta-commons/nightly/commons-scxml/

and let us know if it similarly works for you (without the proposed ExecutorState bits ofcourse). These changes might reduce the need for the ExecutorState addition, so I'm leaning towards resolving this issue.


> A Suggestion to enhance SCXMLExecutor and SCInstance class to support state persistence
> ---------------------------------------------------------------------------------------
>
>                 Key: SCXML-20
>                 URL: http://issues.apache.org/jira/browse/SCXML-20
>             Project: Commons SCXML
>          Issue Type: New Feature
>    Affects Versions: 0.5
>         Environment: Windows, JDK 1.4.2 and above
>            Reporter: Sitthichai Rernglertpricha
>             Fix For: 0.6
>
>         Attachments: patches, scxmlservlet.war
>
>
> Currently, SCXMLExecutor and SCInstance does not implement Serializable. Hence, under a clustered application server environment, they cannot be persisted by the application server for session failover.
> Instead of changing SCXMLExecutor and SCInstance to implement Serializable, an alternative is to leverage on the Memento design pattern so that SCXMLExecutor and SCInstance class can persist their states via 2 new saveState() and restoreState() methods. Both methods are passed a new ExecutorState interface object. The SCXMLExecutor and SCInstance class will save their states into the ExecutorState object when their saveState() methods are called, and reload their states from the ExecutorState object when their restoreState() methods are called. Different child implementation of the ExecutorState interface will then handle the actual persistence to appropriate channel, and decide what need to persist and what need not.
> For your consideration, I have attached patches to SCXMLExecutor and SCInstance class with the 2 new saveState() and restoreState() methods, and the new ExecutorState interface class.I have also attached a web application (tested under Geronimo ) illustrating an implementation under Servlet environment. Please refer to the readme.txt in the WAR file for more details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org