Re: [Webwork-devel] Sessionable Actions
Brought to you by:
baldree,
rickardoberg
|
From: Stefan M. <Ste...@Dy...> - 2001-11-29 10:55:56
|
<>About double-submitting, that should be easily solved by using >>timestamps. I.e. in each form you include a number that is increased for >>each submit. In the action you compare the number received with the >>current number in the wizard object from the session. If its valid, then >>go ahead, but if its not, then return an error. That should always work. >> >> > > This only works with the synchronization I mentioned. Otherwise, you could > have the setters being called during the execution of the Action from a > previous request, since it's multithreaded. I am rather new to webwork, but having built an own framework before i need to say that synchronizing is not what you need. You have to lock the action as long as the first request is running. Otherwise you ent up havin one thread setting one property and the other a second before execute is called. We did this in our framework, and it worked for the rare cases a user hits reload. When the urls are in a frame the situation is completely different, as two or more hits come in at the same time. In this situation it is best to create a second action and use this one. You store the action which becomes available first. A completely different question, having looked at webwork only at topmost level. - Are there any hooks one can place some initialisation. We set up a lot of services upon startup? - Is it possible to add RequestInterceptors, which get called when a browser hits the server and just before the call leaves the server? - Do you have SessionInterceptors wich will be called, when a session terminates? Stefan -- Dynaware Systemberatung GmbH Tel: +49 89 743130-15 Am Westpark 7 Fax: +49 89 743130-05 81373 München mobil: +49 174 3019644 http://www.dynaware.de mailto:Ste...@Dy... |