[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

RemotingServices.Marshall + LifetimeServices

Bob Rundle

7/14/2004 5:54:00 PM

I have a permanent object in a server which is exposed through
RemotingServices.Marshall.

The client obtains access to this permanent object through
Activator.GetObject().

Now...after some time the remote object is no longer available. I get
requested service not found on call to first method of remote object. Is
this lifetime services in action?

I would have thought that since I am exposing a permanent object that
lifetime services is no applicable.

Regards,
Bob Rundle


12 Answers

Bob Rundle

7/14/2004 7:14:00 PM

0

Sunny,

Is there a way to make the lifetime infinite? I seem to recall that there
is a method to override to prevent this disconnection.

I basically want my singleton permanent server object to be available 24x7.

Bob Rundle


"Sunny" <sunny@newsgroups.nospam> wrote in message
news:7A1EF549-9790-4CBB-BDC9-52E21FE594BA@microsoft.com...
> Lifetime is always in place with remoting. Your object is still accesible
from the server and is not garbage collected, if you hold a reference to it,
but it is disconnected from the remoting infrastructure.
>
> Sunny
>
> "Bob Rundle" wrote:
>
> > I have a permanent object in a server which is exposed through
> > RemotingServices.Marshall.
> >
> > The client obtains access to this permanent object through
> > Activator.GetObject().
> >
> > Now...after some time the remote object is no longer available. I get
> > requested service not found on call to first method of remote object.
Is
> > this lifetime services in action?
> >
> > I would have thought that since I am exposing a permanent object that
> > lifetime services is no applicable.
> >
> > Regards,
> > Bob Rundle
> >
> >
> >


Robert Conde

7/14/2004 7:23:00 PM

0

I think this link provides the right example:

http://www.thinktecture.com/Resources/RemotingFAQ/PUBLISHING_O...

On Wed, 14 Jul 2004 14:13:30 -0500, "Bob Rundle" <rundle@rundle.com>
wrote:

>Sunny,
>
>Is there a way to make the lifetime infinite? I seem to recall that there
>is a method to override to prevent this disconnection.
>
>I basically want my singleton permanent server object to be available 24x7.
>
>Bob Rundle
>
>
>"Sunny" <sunny@newsgroups.nospam> wrote in message
>news:7A1EF549-9790-4CBB-BDC9-52E21FE594BA@microsoft.com...
>> Lifetime is always in place with remoting. Your object is still accesible
>from the server and is not garbage collected, if you hold a reference to it,
>but it is disconnected from the remoting infrastructure.
>>
>> Sunny
>>
>> "Bob Rundle" wrote:
>>
>> > I have a permanent object in a server which is exposed through
>> > RemotingServices.Marshall.
>> >
>> > The client obtains access to this permanent object through
>> > Activator.GetObject().
>> >
>> > Now...after some time the remote object is no longer available. I get
>> > requested service not found on call to first method of remote object.
>Is
>> > this lifetime services in action?
>> >
>> > I would have thought that since I am exposing a permanent object that
>> > lifetime services is no applicable.
>> >
>> > Regards,
>> > Bob Rundle
>> >
>> >
>> >
>

Sunny

7/14/2004 7:28:00 PM

0

Bob,

in your MBR override InitializeLifetimeService()

public class MyRemClass : MarshalByRefObject
{
public override Object InitializeLifetimeService()
{
return null;
}

..... other methods
}

In article <uVg8hadaEHA.2944@TK2MSFTNGP11.phx.gbl>, rundle@rundle.com
says...
> Sunny,
>
> Is there a way to make the lifetime infinite? I seem to recall that there
> is a method to override to prevent this disconnection.
>
> I basically want my singleton permanent server object to be available 24x7.
>
> Bob Rundle
>
>
> "Sunny" <sunny@newsgroups.nospam> wrote in message
> news:7A1EF549-9790-4CBB-BDC9-52E21FE594BA@microsoft.com...
> > Lifetime is always in place with remoting. Your object is still accesible
> from the server and is not garbage collected, if you hold a reference to it,
> but it is disconnected from the remoting infrastructure.
> >
> > Sunny
> >
> > "Bob Rundle" wrote:
> >
> > > I have a permanent object in a server which is exposed through
> > > RemotingServices.Marshall.
> > >
> > > The client obtains access to this permanent object through
> > > Activator.GetObject().
> > >
> > > Now...after some time the remote object is no longer available. I get
> > > requested service not found on call to first method of remote object.
> Is
> > > this lifetime services in action?
> > >
> > > I would have thought that since I am exposing a permanent object that
> > > lifetime services is no applicable.
> > >
> > > Regards,
> > > Bob Rundle
> > >
> > >
> > >
>
>
>

Bob Rundle

7/14/2004 8:38:00 PM

0

Yes, yes. This is exactly the Dr. Who secret handshake that I was looking
for. It works brilliantly and it''s totally undocumented: I just checked.

Thanks for the help
Bob Rundle


"Sunny" <sunny@newsgroups.nospam> wrote in message
news:ecBGpidaEHA.3684@TK2MSFTNGP09.phx.gbl...
> Bob,
>
> in your MBR override InitializeLifetimeService()
>
> public class MyRemClass : MarshalByRefObject
> {
> public override Object InitializeLifetimeService()
> {
> return null;
> }
>
> .... other methods
> }
>
> In article <uVg8hadaEHA.2944@TK2MSFTNGP11.phx.gbl>, rundle@rundle.com
> says...
> > Sunny,
> >
> > Is there a way to make the lifetime infinite? I seem to recall that
there
> > is a method to override to prevent this disconnection.
> >
> > I basically want my singleton permanent server object to be available
24x7.
> >
> > Bob Rundle
> >
> >
> > "Sunny" <sunny@newsgroups.nospam> wrote in message
> > news:7A1EF549-9790-4CBB-BDC9-52E21FE594BA@microsoft.com...
> > > Lifetime is always in place with remoting. Your object is still
accesible
> > from the server and is not garbage collected, if you hold a reference to
it,
> > but it is disconnected from the remoting infrastructure.
> > >
> > > Sunny
> > >
> > > "Bob Rundle" wrote:
> > >
> > > > I have a permanent object in a server which is exposed through
> > > > RemotingServices.Marshall.
> > > >
> > > > The client obtains access to this permanent object through
> > > > Activator.GetObject().
> > > >
> > > > Now...after some time the remote object is no longer available. I
get
> > > > requested service not found on call to first method of remote
object.
> > Is
> > > > this lifetime services in action?
> > > >
> > > > I would have thought that since I am exposing a permanent object
that
> > > > lifetime services is no applicable.
> > > >
> > > > Regards,
> > > > Bob Rundle
> > > >
> > > >
> > > >
> >
> >
> >


Evolution

5/5/2008 3:40:00 PM

0

gumboman wrote:
> On Sun, 04 May 2008 12:11:02 -0700, Evolution <myname@rcn.com> wrote:
>
>>> You claim people aren't liberal and won't vote for liberals.
>> That's just a fact, based on the only democrat elected since 1977 has
>> been a moderate democrat, helped by Perot being in the race. Maybe if
>> we'd tried running someone earlier who could make a good speech, we'd
>> have been more successful...
>>
>
>
> What is this we? You're no liberal based on many of the things you've
> said. I very much doubt I want a president that is acceptable to you.
>
>
>
> JH

When I took that political test, I came out 100% for Kucinich. I don't
support him because he can't get elected either. See, I learned my
lesson with McGovern and more recently, Kerry. Dems will continue to
lose unless we nominate someone who is more moderate.

Laurie

Kevin Schneider

5/5/2008 3:49:00 PM

0

"Evolution" <myname@rcn.com> wrote in message
news:O8-dnSqjxcDBt4LVnZ2dnUVZ_orinZ2d@wavecable.com...
> gumboman wrote:
>> On Sun, 04 May 2008 12:11:02 -0700, Evolution <myname@rcn.com> wrote:
>>
>>>> You claim people aren't liberal and won't vote for liberals.
>>> That's just a fact, based on the only democrat elected since 1977 has
>>> been a moderate democrat, helped by Perot being in the race. Maybe if
>>> we'd tried running someone earlier who could make a good speech, we'd
>>> have been more successful...
>>>
>>
>>
>> What is this we? You're no liberal based on many of the things you've
>> said. I very much doubt I want a president that is acceptable to you.
>>
>>
>>
>> JH
>
> When I took that political test, I came out 100% for Kucinich. I don't
> support him because he can't get elected either. See, I learned my lesson
> with McGovern and more recently, Kerry. Dems will continue to lose unless
> we nominate someone who is more moderate.


Kerry WAS moderate. His losing had nothing to do with being painted with
the 'liberal' brush. It had everything to do with being painted with the
'wishy-washy' brush. It was his (and his handlers') fault(s). He should
have said, "You're damn right I flip flop. I do it all the time. When I
make a decision and realize it was incorrect, I go back and fix it. That's
what an intelligent person should do." As for the Swift Boat crap, he
should have stood up and said, "Yes, I was in Vietnam. It was a terrible
war, but I am proud to have served my country. Not everyone went over
there, and I think it's reprehensible for those who didn't to criticize
those who did."

It's not the liberal brush. They tried to paint Bill Clinton with that
brush as well, but that didn't matter. Dukakis wasn't going to win, and
that really didn't have to do with the liberal tag. Gore's "loss" had more
to do with a wooden personality on the campaign and on TV. Nothing to do
with liberals.

Nominating a moderate is just compromising your ideals, IMO. If someone
really believes X way on Y issue, that's fine to disagree with me (as long
as that disagreement is based on legitimate arguments), but I don't believe
that Hillary is any more moderate than Obama - she's just willing to claim
it to try and get elected. I won't vote in a democratic primary for someone
who runs to the right.

--
St. Clarence
http://kschneid.livej...
"The problems we face as individuals, as a country, and as world citizens
are too many and often too complex to think we can get laid without
the full power of our collective human resources."
--Busk-Schneider, 2007

Evolution

5/5/2008 5:01:00 PM

0

Kevin R. Schneider wrote:
> "Evolution" <myname@rcn.com> wrote in message
> news:O8-dnSqjxcDBt4LVnZ2dnUVZ_orinZ2d@wavecable.com...
>> gumboman wrote:
>>> On Sun, 04 May 2008 12:11:02 -0700, Evolution <myname@rcn.com> wrote:
>>>
>>>>> You claim people aren't liberal and won't vote for liberals.
>>>> That's just a fact, based on the only democrat elected since 1977
>>>> has been a moderate democrat, helped by Perot being in the race.
>>>> Maybe if we'd tried running someone earlier who could make a good
>>>> speech, we'd have been more successful...
>>>>
>>>
>>>
>>> What is this we? You're no liberal based on many of the things you've
>>> said. I very much doubt I want a president that is acceptable to you.
>>>
>>>
>>>
>>> JH
>>
>> When I took that political test, I came out 100% for Kucinich. I
>> don't support him because he can't get elected either. See, I learned
>> my lesson with McGovern and more recently, Kerry. Dems will continue
>> to lose unless we nominate someone who is more moderate.
>
>
> Kerry WAS moderate. His losing had nothing to do with being painted
> with the 'liberal' brush. It had everything to do with being painted
> with the 'wishy-washy' brush. It was his (and his handlers') fault(s).
> He should have said, "You're damn right I flip flop. I do it all the
> time. When I make a decision and realize it was incorrect, I go back
> and fix it. That's what an intelligent person should do." As for the
> Swift Boat crap, he should have stood up and said, "Yes, I was in
> Vietnam. It was a terrible war, but I am proud to have served my
> country. Not everyone went over there, and I think it's reprehensible
> for those who didn't to criticize those who did."
>
> It's not the liberal brush. They tried to paint Bill Clinton with that
> brush as well, but that didn't matter. Dukakis wasn't going to win, and
> that really didn't have to do with the liberal tag. Gore's "loss" had
> more to do with a wooden personality on the campaign and on TV. Nothing
> to do with liberals.
>
> Nominating a moderate is just compromising your ideals, IMO. If someone
> really believes X way on Y issue, that's fine to disagree with me (as
> long as that disagreement is based on legitimate arguments), but I don't
> believe that Hillary is any more moderate than Obama - she's just
> willing to claim it to try and get elected. I won't vote in a
> democratic primary for someone who runs to the right.
>

And your ideals are going to give us another 4 years of McBush...

Laurie

oldperson

5/5/2008 9:02:00 PM

0

In article <rYKdnTMsXKPzoILVnZ2dnUVZ_h_inZ2d@wavecable.com>, Evolution
<myname@rcn.com> wrote:

>
> >
> >
> > Kerry WAS moderate. His losing had nothing to do with being painted
> > with the 'liberal' brush. It had everything to do with being painted
> > with the 'wishy-washy' brush. It was his (and his handlers') fault(s).
> > He should have said, "You're damn right I flip flop. I do it all the
> > time. When I make a decision and realize it was incorrect, I go back
> > and fix it. That's what an intelligent person should do." As for the
> > Swift Boat crap, he should have stood up and said, "Yes, I was in
> > Vietnam. It was a terrible war, but I am proud to have served my
> > country. Not everyone went over there, and I think it's reprehensible
> > for those who didn't to criticize those who did."
> >
> > It's not the liberal brush. They tried to paint Bill Clinton with that
> > brush as well, but that didn't matter. Dukakis wasn't going to win, and
> > that really didn't have to do with the liberal tag. Gore's "loss" had
> > more to do with a wooden personality on the campaign and on TV. Nothing
> > to do with liberals.
> >
> > Nominating a moderate is just compromising your ideals, IMO. If someone
> > really believes X way on Y issue, that's fine to disagree with me (as
> > long as that disagreement is based on legitimate arguments), but I don't
> > believe that Hillary is any more moderate than Obama - she's just
> > willing to claim it to try and get elected. I won't vote in a
> > democratic primary for someone who runs to the right.
> >
>
> And your ideals are going to give us another 4 years of McBush...
>
> Laurie

Now see, this is where you just lose people. Me included.

Kevin took the time to write a very reasoned and thoughtful reply to what
you had said and then you hit him with this shit?

Give me a break.

gumboman

5/5/2008 10:41:00 PM

0

On Mon, 05 May 2008 08:40:04 -0700, Evolution <myname@rcn.com> wrote:

>gumboman wrote:
>> On Sun, 04 May 2008 12:11:02 -0700, Evolution <myname@rcn.com> wrote:
>>
>>>> You claim people aren't liberal and won't vote for liberals.
>>> That's just a fact, based on the only democrat elected since 1977 has
>>> been a moderate democrat, helped by Perot being in the race. Maybe if
>>> we'd tried running someone earlier who could make a good speech, we'd
>>> have been more successful...
>>>
>>
>>
>> What is this we? You're no liberal based on many of the things you've
>> said. I very much doubt I want a president that is acceptable to you.
>>
>>
>>
>> JH
>
>When I took that political test, I came out 100% for Kucinich. I don't
>support him because he can't get elected either. See, I learned my
>lesson with McGovern and more recently, Kerry. Dems will continue to
>lose unless we nominate someone who is more moderate.
>
>Laurie


That's not why Democrats are losing - if you even assume they 'lost'
and didn't have it stolen from them (which they did).



JH

Willy Eyenine

5/6/2008 1:06:00 AM

0


"Evolution" <myname@rcn.com> wrote in message
news:O8-dnSqjxcDBt4LVnZ2dnUVZ_orinZ2d@wavecable.com...
> gumboman wrote:
>> On Sun, 04 May 2008 12:11:02 -0700, Evolution <myname@rcn.com> wrote:
>>
>>>> You claim people aren't liberal and won't vote for liberals.
>>> That's just a fact, based on the only democrat elected since 1977 has
>>> been a moderate democrat, helped by Perot being in the race. Maybe if
>>> we'd tried running someone earlier who could make a good speech, we'd
>>> have been more successful...
>>>
>>
>>
>> What is this we? You're no liberal based on many of the things you've
>> said. I very much doubt I want a president that is acceptable to you.
>>
>>
>>
>> JH
>
> When I took that political test, I came out 100% for Kucinich. I don't
> support him because he can't get elected either. See, I learned my lesson
> with McGovern and more recently, Kerry. Dems will continue to lose unless
> we nominate someone who is more moderate.
>
If Obama gets the nomination, then I certainly hope you're wrong, Miss
Laurie.
But hoping and what happens are two different beasts.

However, I'm like-minded with you when it comes to your assessment.
Here in the Bay Area, EVERYONE is asking me where they can get Obama
bumper-stickers.
They seem pretty shocked when I tell 'em that they're asking the wrong
fellow.
When I look at the country as a whole...blue states, red states, swing
states...there's just no way I
can see Senator Obama winning a General Election.
It helps to take a step back from the Bay Area...as well as a step back from
forward thinking folk who
post to newsgroups about performers who are also forward-thinking.

Believe me, I embrace the idealism and desire to change the way things are
done.
However, I don't see the entire country ready for such change....especially
if the catalyst for
change doesn't have all that impressive a national resume.

So, as much as folk may hurl things you're way, know that I agree 100% with
what you've written up above.