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

Cool, perhaps we should place a link to this issue from the related question on 
the wiki FAQ page. This is also somewhat related to SCXML-19.

Generally speaking, I'd favor this approach because it seems unlikely that any 
particular single save/restore mechanism will be acceptable for all usecases. 
I'll take a look at this in further detail late next week.

Thanks a lot for the patch and the servlet-based web flow usecase. Such a 
usecase would also make for a fitting addition to the usecases section on the 
Commons SCXML website (if you're interested, the webpages are in the xdcos 
directory). I should also add a Spring MVC based usecase there.


> 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
>         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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to