Home All Groups Group Topic Archive Search About

Alert another session, how?

Author
8 Feb 2005 8:59 PM
Søren M. Olesen
Hi

Is it somehow possible to alert all other sessions than the current, that
something has changed making all other sessions take appropriate action....

If yes, what should I be looking into ??

TIA

Søren

Author
10 Feb 2005 6:00 PM
Alvin Bruney [MVP]
hmmm, why do you need this ability?

I believe you should approach the problem in a different way. Strictly
speaking, you can set a dependency on a file and update that file when new
sessions are started but that seems like a poor design because web
applications are inherently stateless.

Maybe you should say why you need that functionality...

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
----------------------------------------------------------


Show quoteHide quote
"Søren M. Olesen" <smole***@hotmail.com> wrote in message
news:%237LyUEiDFHA.3648@TK2MSFTNGP10.phx.gbl...
> Hi
>
> Is it somehow possible to alert all other sessions than the current, that
> something has changed making all other sessions take appropriate
> action....
>
> If yes, what should I be looking into ??
>
> TIA
>
> Søren
>
Are all your drivers up to date? click for free checkup

Author
10 Feb 2005 8:53 PM
Søren M. Olesen
Basically I want to tell the other sessions, that some of data/object
it/they holds are outdated, and needs to be reread from the database....

Regards,

Søren



Show quoteHide quote
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:%23YPhmp5DFHA.1296@TK2MSFTNGP10.phx.gbl...
> hmmm, why do you need this ability?
>
> I believe you should approach the problem in a different way. Strictly
> speaking, you can set a dependency on a file and update that file when new
> sessions are started but that seems like a poor design because web
> applications are inherently stateless.
>
> Maybe you should say why you need that functionality...
>
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @ http://www.lulu.com/owc
> ----------------------------------------------------------
>
>
> "Søren M. Olesen" <smole***@hotmail.com> wrote in message
> news:%237LyUEiDFHA.3648@TK2MSFTNGP10.phx.gbl...
>> Hi
>>
>> Is it somehow possible to alert all other sessions than the current, that
>> something has changed making all other sessions take appropriate
>> action....
>>
>> If yes, what should I be looking into ??
>>
>> TIA
>>
>> Søren
>>
>
>
Author
10 Feb 2005 9:49 PM
Alvin Bruney [MVP]
One approach is to provide a static flag responsible for the validity of the
accessed data. A database trigger or a dependency placed on a file will
monitor the file for changes. If the file changes, the static flag is set
which in turn invalidates the session store. So you would access session in
this way for each page

if(session[xxx] != null && !staticFlag)
    do something.

If you google around, you will find plenty of code snippets on how to add a
cached dependency.

ASP 2.0 will allow row level dependencies by the way.
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
----------------------------------------------------------


Show quoteHide quote
"Søren M. Olesen" <smole***@hotmail.com> wrote in message
news:ufiPaK7DFHA.3416@TK2MSFTNGP09.phx.gbl...
>
> Basically I want to tell the other sessions, that some of data/object
> it/they holds are outdated, and needs to be reread from the database....
>
> Regards,
>
> Søren
>
>
>
> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
> news:%23YPhmp5DFHA.1296@TK2MSFTNGP10.phx.gbl...
>> hmmm, why do you need this ability?
>>
>> I believe you should approach the problem in a different way. Strictly
>> speaking, you can set a dependency on a file and update that file when
>> new sessions are started but that seems like a poor design because web
>> applications are inherently stateless.
>>
>> Maybe you should say why you need that functionality...
>>
>> --
>> Regards,
>> Alvin Bruney [MVP ASP.NET]
>>
>> [Shameless Author plug]
>> The Microsoft Office Web Components Black Book with .NET
>> Now Available @ http://www.lulu.com/owc
>> ----------------------------------------------------------
>>
>>
>> "Søren M. Olesen" <smole***@hotmail.com> wrote in message
>> news:%237LyUEiDFHA.3648@TK2MSFTNGP10.phx.gbl...
>>> Hi
>>>
>>> Is it somehow possible to alert all other sessions than the current,
>>> that something has changed making all other sessions take appropriate
>>> action....
>>>
>>> If yes, what should I be looking into ??
>>>
>>> TIA
>>>
>>> Søren
>>>
>>
>>
>
>

Bookmark and Share