On Tue, Feb 9, 2010 at 11:42 AM, Praveen S <[email protected]> wrote:
> Hi,
>
> Lets assume the database is nothing but a file where i write if some
> application can got access to it or not. Say i write a True value when it
> gains access and on exit i make it false. But suppose the application gains
> access to the file and writes a true value but it exits abnormally then
> other applications which also use the same shared object library will check
> the value in that file. They wil find it true.

Then, if you're reinventing wheels, you need a method whereby you can
reset that value to false externally. Or have your library time out an
application with a lock such that if the application does time out, it
no longer has access unless it reacquires the lock.

> And yes the value is changed to false after every reboot because we know no
> application will be running on reboot which uses that library. All are
> executed only after bootup of device.
>
> So i want to get a design where
> 1) We can handle abnormal termination scenario
> 2) We can unlock based on abnormal termination.
>
>
> TIA
> Praveen
>
> On Tue, Feb 9, 2010 at 4:42 PM, shantibhushan sale <
> [email protected]> wrote:
>
>>
>>
>> Hey,
>> You can write a log file which maintains state of your
>> synchronization's variables/data.Whenever you restart application,check
>> with
>> log file.
>>
>> ACID properties of database can be taken care if you are following standard
>> database system.
>>
>>
>> On Tue, Feb 9, 2010 at 1:57 PM, Praveen S 
>> <[email protected]<mailpraveens%40gmail.com>>
>> wrote:
>>
>> >
>> >
>> > Hi,
>> >
>> > I am writing a mobile application library which uses a database. The
>> > database is locked by applications using the library. On exit the
>> > applications will unlock the database.
>> >
>> > However if the application terminates abnormally then the database is in
>> > locked state only. Can you tell me some solution through which if a
>> > application exits abnormally the database can be unlocked without having
>> to
>> > restart the device. On restart the database is always set to unlock mode.
>> >
>> > Thanks in advance,
>> > Praveen
>> >
>> > [Non-text portions of this message have been removed]
>> >
>> >
>> >
>>
>> --
>> ----------------------------
>> Regards
>> Shantibhushan Sale
>> Mumbai
>> +91 9769396331
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> To unsubscribe, send a blank message to 
> <mailto:[email protected]>.Yahoo! Groups Links
>
>
>
>



-- 
PJH

http://shabbleland.myminicity.com/env
http://www.chavgangs.com/register.php?referer=9375

Reply via email to