Re: how to stop jxta

simschla <[email protected]> Tue, 18 Apr 2006 14:27:08 +0200
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
Hey everyone

I'm also trying to achieve a shutdown and (a later) restart of jxta - in 
the following scenario:

	NetPeerGroup
           /       \
      group1      group2


to stop jxta I do the following:

(1) close and remove all references to pipes in group1
(2) remove all listeners on group1
(3) resign from group1
(4) group1.stopApp();
     group1.unref();
     group1= null;

(5) repeat steps 1-4 for group2
(6) repeat step 1-4 for NetPeerGroup

Doing so stops almost all jxta-related threads, but some remain:
I have several "Listener Adaptor"-Threads that keep running - when I 
suspend them, they are all in ListenerAdaptor.run():
Iterator i= changed.iterator();

any hint on what I'm missing? why doesn't jxta remove those threads?

Thx Simon

Schaaf Martin - [email protected] schrieb:
> Hi,
> 
> On Tue, 21 Mar 2006 09:29:49 -0800
> Mohamed Abdelaziz wrote:
> 
>> Did you also unregister all listeners? 
> 
> I think it I found the problem. It was a combination from not stopping
> the rdv service from groups where we start them and having references
> left over to old pipes and groups.
> 
> I close now all open output pipes and call the following methods on all
> cached groups:
> 
> PeerGroup element = (PeerGroup) iter.next();
> if (element.isRendezvous()) {
>   element.getRendezVousService().stopRendezVous();
> }
> element.stopApp();
> iter.remove();
> 
> Thanks for the help from all who responded.
> 
> Bye,
> Martin Schaaf.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]