Re: Why won't you die?

2002-04-11 Thread Pier Fumagalli

"Jeff Martin" <[EMAIL PROTECTED]> wrote:

> Don't know if this helps at all, but I've got the opposite problem (At
> least I think I have, not had a chance to really look at it.)
> 
> I'm starting a registry in a ServletContextListener and then binding
> objects to it. The registry is local to the contextInitialized method so
> I have no permanent references to it. After a while the rmi registry
> dies and I can no longer get a connection to it, I suspect it's being
> garbage collected somewhere.

Hmmm.. That's interesting... I can try calling "finalize()" manually :)
(It's a hack, but if it works, well, I'm set)...

[gr... Browsing sources...]

> Are you having the opposite problem where your holding a reference to
> the registry which means it can't be garbage collected and so won't
> shutdown.

Ok, it looks like that ALTHOUGH I force garbage collection, the registry
remains up, until the VM doesn't exit...

Even if (though) the registry is up, the VM exit cleanly... So there must be
something not exiting somewhere else... I believe it's in the classloader
implemntation with RMI... But I'm not _that_ sure...

Regarding your problem of the RMI dying, what's the output of
# netstat -an | grep LISTEN
 Is someone still bound to that port?

Pier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Why won't you die?

2002-04-11 Thread Jeff Martin

Don't know if this helps at all, but I've got the opposite problem (At
least I think I have, not had a chance to really look at it.)

I'm starting a registry in a ServletContextListener and then binding
objects to it. The registry is local to the contextInitialized method so
I have no permanent references to it. After a while the rmi registry
dies and I can no longer get a connection to it, I suspect it's being
garbage collected somewhere. 

Are you having the opposite problem where your holding a reference to
the registry which means it can't be garbage collected and so won't
shutdown.



On Wed, 2002-04-10 at 11:22, Pier Fumagalli wrote:
> "Remy Maucherat" <[EMAIL PROTECTED]> wrote:
> 
> >> Ok... I'm facing this little problem... I have a servlet creating a RMI
> >> registry, and that binds to a port, creates a non-daemon Thread...
> >> Yadayadayada... You know where I want to end up to...
> >> 
> >> Now, catalina.sh stop doesn't work anymore, because I found no apparent way
> >> of shutting down that RMI registry...
> >> 
> >> Do some of you know HOW to shut down a RMI registry?
> > 
> > Sorry, I don't.
> 
> Crap...
> 
> >> Otherwise I'd propose
> >> to revert back to org.apache.catalina.startup.Catalina version 1.44.
> > 
> > -1. No, because it's equivalent to not attempting to shutdown cleanly.
> 
> We can control the threads invoking destroy() in the different contexts, and
> when they all exit, well, we exit...
> If a servlet creates a thread, and during its destruction doesn't
> synchronize its own thread reentrance (doesn't wait for it to die before
> returning from destroy()), then it's a servlet problem, but we won't hold a
> process on the server forever.
> 
> > If you want to do that, write a servlet with System.exit() in its destroy
> > method, it would be the same. Or you can kill the process.
> 
> Yeah, so that when my context gets reloaded because of a change the whole
> f***ing servlet engine falls over :) RAD! :)
> 
> Pier
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
-- 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Why won't you die?

2002-04-10 Thread Pier Fumagalli

"Remy Maucherat" <[EMAIL PROTECTED]> wrote:

>> Ok... I'm facing this little problem... I have a servlet creating a RMI
>> registry, and that binds to a port, creates a non-daemon Thread...
>> Yadayadayada... You know where I want to end up to...
>> 
>> Now, catalina.sh stop doesn't work anymore, because I found no apparent way
>> of shutting down that RMI registry...
>> 
>> Do some of you know HOW to shut down a RMI registry?
> 
> Sorry, I don't.

Crap...

>> Otherwise I'd propose
>> to revert back to org.apache.catalina.startup.Catalina version 1.44.
> 
> -1. No, because it's equivalent to not attempting to shutdown cleanly.

We can control the threads invoking destroy() in the different contexts, and
when they all exit, well, we exit...
If a servlet creates a thread, and during its destruction doesn't
synchronize its own thread reentrance (doesn't wait for it to die before
returning from destroy()), then it's a servlet problem, but we won't hold a
process on the server forever.

> If you want to do that, write a servlet with System.exit() in its destroy
> method, it would be the same. Or you can kill the process.

Yeah, so that when my context gets reloaded because of a change the whole
f***ing servlet engine falls over :) RAD! :)

Pier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Why won't you die?

2002-04-09 Thread Remy Maucherat

> Ok... I'm facing this little problem... I have a servlet creating a RMI
> registry, and that binds to a port, creates a non-daemon Thread...
> Yadayadayada... You know where I want to end up to...
>
> Now, catalina.sh stop doesn't work anymore, because I found no apparent
way
> of shutting down that RMI registry...
>
> Do some of you know HOW to shut down a RMI registry?

Sorry, I don't.

> Otherwise I'd propose
> to revert back to org.apache.catalina.startup.Catalina version 1.44.

-1. No, because it's equivalent to not attempting to shutdown cleanly.
If you want to do that, write a servlet with System.exit() in its destroy
method, it would be the same. Or you can kill the process.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: