you guys ever hear of transactional isolation? :) databases handle all
this kind of neat stuff for you.

-igor

On Mon, Oct 19, 2009 at 11:09 PM, Per Newgro <per.new...@gmx.ch> wrote:
> fachhoch schrieb:
>>
>> Why are you saving the byte arrays in the page instance?
>>
>> I show these files to  user with read-only permission  , so this user can
>> just view these files ,the owner of these files can delete them anytime ,
>> so
>> If I go to database     , upon user click , this file might have been
>> deleted by the user , or when user tries to access this file the   owner
>> might be deleting this file , to avoid such issues I am loading all the
>> bytes to page instance , so no  concurrent access issues .
>> to save them inside temp folders can I ask the page to give some
>> identifier
>> which I can use  to name the folder which contains all the files ?  or do
>> I
>> have to create my own identifier  ?
>>
>>
>
> With this issues i would rethink my design. Why don't you mark the file as
> "inUse" in DB and if it is in use
> deny delete? So user can only delete file if noone has a copy in use. And as
> Igor posted you can't guarantee
> that your processing never leads to your problem described above.
>
> Page identifier:
> You could use the page.id + sessionId
>
> Cheers
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to