[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Ron

10/9/2004 6:19:00 PM

Im looking for information on how lifttime is managed in a factory
situation.

My basic question is in regards to a webapplication calling the singleton
and thus instantiating a CAO. I am using Activator.CreateObect(). I am
windering if the CAOs will be destroyed when the ASP,NET webforms have
finsihed executing. This is desired since I dont need a bunch of objects
hanging around on the server with every page request that gets called. I
need a way for a webform to create the obect and then destroy it soon as the
web form becomes disconnected. (Does this happen automatically by the
remoting framework or do I need to add logic)

Thanks in advance


3 Answers

Sam Santiago

10/9/2004 7:38:00 PM

0

With a Client Activate Objects (CAO) you either have to override the
InitializeLifetimeServices method:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemmarshalbyrefobjectclassinitializelifetimeservic...

Or define a sponsor. Check out this article for an in-depth discussion:

Managing the Lifetime of Remote .NET Objects with Leasing and Sponsorship
http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/de...


If you want to have a Factory return SAOs you can do that as well. There
was a discussion a while back in this newsgroup and you can see an example
on my site: http://www.softitechture.com/d....

Thanks,

Sam
--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Ron" <vencenzo@online.nospam> wrote in message
news:OnZABtirEHA.2596@TK2MSFTNGP12.phx.gbl...
> Im looking for information on how lifttime is managed in a factory
> situation.
>
> My basic question is in regards to a webapplication calling the singleton
> and thus instantiating a CAO. I am using Activator.CreateObect(). I am
> windering if the CAOs will be destroyed when the ASP,NET webforms have
> finsihed executing. This is desired since I dont need a bunch of objects
> hanging around on the server with every page request that gets called. I
> need a way for a webform to create the obect and then destroy it soon as
the
> web form becomes disconnected. (Does this happen automatically by the
> remoting framework or do I need to add logic)
>
> Thanks in advance
>
>


Ron

10/9/2004 8:00:00 PM

0

So it seems that the CAO will not recognize on its own that the client (in
this case a asp.net application webform thread) has finished? I guess this
is what I was getting at.

Thanks!

"Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message
news:OiAXqdjrEHA.1096@TK2MSFTNGP10.phx.gbl...
> With a Client Activate Objects (CAO) you either have to override the
> InitializeLifetimeServices method:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemmarshalbyrefobjectclassinitializelifetimeservic...
>
> Or define a sponsor. Check out this article for an in-depth discussion:
>
> Managing the Lifetime of Remote .NET Objects with Leasing and Sponsorship
> http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/de...
>
>
> If you want to have a Factory return SAOs you can do that as well. There
> was a discussion a while back in this newsgroup and you can see an example
> on my site: http://www.softitechture.com/d....
>
> Thanks,
>
> Sam
> --
> _______________________________
> Sam Santiago
> ssantiago@n0spam-SoftiTechture.com
> http://www.SoftiTe...
> _______________________________
> "Ron" <vencenzo@online.nospam> wrote in message
> news:OnZABtirEHA.2596@TK2MSFTNGP12.phx.gbl...
>> Im looking for information on how lifttime is managed in a factory
>> situation.
>>
>> My basic question is in regards to a webapplication calling the singleton
>> and thus instantiating a CAO. I am using Activator.CreateObect(). I am
>> windering if the CAOs will be destroyed when the ASP,NET webforms have
>> finsihed executing. This is desired since I dont need a bunch of objects
>> hanging around on the server with every page request that gets called. I
>> need a way for a webform to create the obect and then destroy it soon as
> the
>> web form becomes disconnected. (Does this happen automatically by the
>> remoting framework or do I need to add logic)
>>
>> Thanks in advance
>>
>>
>
>


Sam Santiago

10/9/2004 8:38:00 PM

0

That is correct.

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Ron" <vencenzo@online.nospam> wrote in message
news:eirEqljrEHA.1964@TK2MSFTNGP12.phx.gbl...
> So it seems that the CAO will not recognize on its own that the client (in
> this case a asp.net application webform thread) has finished? I guess
this
> is what I was getting at.
>
> Thanks!
>
> "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message
> news:OiAXqdjrEHA.1096@TK2MSFTNGP10.phx.gbl...
> > With a Client Activate Objects (CAO) you either have to override the
> > InitializeLifetimeServices method:
> >
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemmarshalbyrefobjectclassinitializelifetimeservic...
> >
> > Or define a sponsor. Check out this article for an in-depth discussion:
> >
> > Managing the Lifetime of Remote .NET Objects with Leasing and
Sponsorship
> > http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/de...
> >
> >
> > If you want to have a Factory return SAOs you can do that as well.
There
> > was a discussion a while back in this newsgroup and you can see an
example
> > on my site: http://www.softitechture.com/d....
> >
> > Thanks,
> >
> > Sam
> > --
> > _______________________________
> > Sam Santiago
> > ssantiago@n0spam-SoftiTechture.com
> > http://www.SoftiTe...
> > _______________________________
> > "Ron" <vencenzo@online.nospam> wrote in message
> > news:OnZABtirEHA.2596@TK2MSFTNGP12.phx.gbl...
> >> Im looking for information on how lifttime is managed in a factory
> >> situation.
> >>
> >> My basic question is in regards to a webapplication calling the
singleton
> >> and thus instantiating a CAO. I am using Activator.CreateObect(). I
am
> >> windering if the CAOs will be destroyed when the ASP,NET webforms have
> >> finsihed executing. This is desired since I dont need a bunch of
objects
> >> hanging around on the server with every page request that gets called.
I
> >> need a way for a webform to create the obect and then destroy it soon
as
> > the
> >> web form becomes disconnected. (Does this happen automatically by the
> >> remoting framework or do I need to add logic)
> >>
> >> Thanks in advance
> >>
> >>
> >
> >
>
>