Re: [Simpleweb-Support] How to shutdown?
Brought to you by:
niallg
From: Niall G. <gal...@ya...> - 2007-04-06 08:50:29
|
Hi Stefan,=0A=0AYou can make use of the signal framework by making your thr= eads Daemon objects. So instead of extending thread or using a thread use a= Daemon object. This object will recieve a shutdown signal when the Signall= er is asked to shutdown. Also a Module is like the Daemon, however instead = of using it with threads you would use the Module with arbitrary objects th= at want to listen for a shutdown signal. Using it in this way the Signaller= can send signals to parts of the server that wish to shutdown gracefully.= =0A =0ANiall Gallagher=0A=0A----- Original Message ----=0AFrom: Stefan H=FC= bner <sth...@go...>=0ATo: Simple support and user issues <simpl= ewe...@li...>=0ASent: Wednesday, April 4, 2007 4:28:2= 0 PM=0ASubject: Re: [Simpleweb-Support] How to shutdown?=0A=0ANiall,=0A=0AI= had a look at the new signal-framework but couldn't get much out of=0Ait. = Could you be so kind to provide an example of how to make use of=0Athe new = Module-class? I.e. what would I use a Module for?=0A=0AAnd whats your sugge= stion for how to shut down a PipelineHandler and=0Ait's Processors?=0A=0AMy= use case is to emulate (implemented as a Simple Resource) some web=0Aservi= ces providing backend communication for a component under unit=0Atest. I w= ant to configure the http services in different ways,=0Adepending on the un= it test to be run. To reconfigure I need to be able=0Ato start and stop the= service completely.=0AIs this possible using Simple and it's signal framew= ork?=0A=0ARegards,=0AStefan=0A=0A2007/3/22, Niall Gallagher <gallagher_nial= l...@ya...>:=0A> Hi,=0A>=0A> I have written a signalling framework which w= ill be used in Simple so send signals to all threads and processes within t= he server when something happens. For instance a shutdown signal will be di= stributed to all threads to allow them to shutdown cleanly. When I get the = time to finally release the next version this will be included it is locate= d at:=0A>=0A> https://svn.sourceforge.net/svnroot/simpleweb/branches/3.2/sr= c/simple/signal/=0A>=0A> Niall Gallagher=0A>=0A> ----- Original Message ---= -=0A> From: Stefan H=FCbner <sth...@go...>=0A> To: Simple suppo= rt and user issues <sim...@li...>=0A> Sent: Wedn= esday, March 21, 2007 7:54:23 PM=0A> Subject: Re: [Simpleweb-Support] How t= o shutdown?=0A>=0A> Hi Oscar,=0A>=0A> 2007/3/21, Oscar Perez <os_carp@telef= onica.net>:=0A> > Hi,=0A> > I don't have an answer to you, but I faced the = same problem just a week=0A> > ago and what I did was to track all the star= ted threads to kill them at=0A> > shutdown time. I'll not post my code here= now, but I'll advise you to=0A> > not do as me, as I lost a lot of hours t= racking threads and debugging...=0A>=0A> Thank you for that :-)=0A>=0A> > I= guess LoaderEngine was not designed to have a clean shutdown?=0A> >=0A> Wh= at I figured out, when I had a second look into Simple's code, is=0A> that = there is at least the opportunity to close() the ServerSocket the=0A> conne= ction is connect()ed with. After close() Simple won't serve any=0A> request= sent to the port the socket was serving.=0A>=0A> But getting rid of all th= ose threads seems like a mission impossible,=0A> given how much Simple reli= es on Singletons. One hardly gets the chance=0A> to get hold of all those h= idden instances, I guess.=0A>=0A> Cheers,=0A> Stefan=0A> >=0A> > En/na Stef= an H=FCbner ha escrit:=0A> > > Hi,=0A> > >=0A> > > Excuse me, if this has b= een asked before, but how do I shutdown a=0A> > > LoaderEngine? Is there a = way to do so?=0A> > >=0A> > > Cheers,=0A> > > Stefan=0A> > >=0A> > > ------= -------------------------------------------------------------------=0A> > >= Take Surveys. Earn Cash. Influence the Future of IT=0A> > > Join SourceFor= ge.net's Techsay panel and you'll get the chance to share your=0A> > > opin= ions on IT & business topics through brief surveys-and earn cash=0A> > > ht= tp://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVD= EV=0A> > > _______________________________________________=0A> > > Simplewe= b-Support mailing list=0A> > > Sim...@li...=0A> = > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support=0A> > >= =0A> > >=0A> > >=0A> >=0A> >=0A> > ----------------------------------------= ---------------------------------=0A> > Take Surveys. Earn Cash. Influence = the Future of IT=0A> > Join SourceForge.net's Techsay panel and you'll get = the chance to share your=0A> > opinions on IT & business topics through bri= ef surveys-and earn cash=0A> > http://www.techsay.com/default.php?page=3Djo= in.php&p=3Dsourceforge&CID=3DDEVDEV=0A> > _________________________________= ______________=0A> > Simpleweb-Support mailing list=0A> > Simpleweb-Support= @lists.sourceforge.net=0A> > https://lists.sourceforge.net/lists/listinfo/s= impleweb-support=0A> >=0A> ------------------------------------------------= -------------------------=0A> Take Surveys. Earn Cash. Influence the Future= of IT=0A> Join SourceForge.net's Techsay panel and you'll get the chance t= o share your=0A> opinions on IT & business topics through brief surveys-and= earn cash=0A> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourc= eforge&CID=3DDEVDEV=0A> _______________________________________________=0A>= Simpleweb-Support mailing list=0A> Sim...@li...= =0A> https://lists.sourceforge.net/lists/listinfo/simpleweb-support=0A>=0A>= =0A>=0A>=0A>=0A>=0A> ______________________________________________________= ______________________________=0A> We won't tell. Get more on shows you hat= e to love=0A> (and love to hate): Yahoo! TV's Guilty Pleasures list.=0A> ht= tp://tv.yahoo.com/collections/265=0A>=0A> ---------------------------------= ----------------------------------------=0A> Take Surveys. Earn Cash. Influ= ence the Future of IT=0A> Join SourceForge.net's Techsay panel and you'll g= et the chance to share your=0A> opinions on IT & business topics through br= ief surveys-and earn cash=0A> http://www.techsay.com/default.php?page=3Djoi= n.php&p=3Dsourceforge&CID=3DDEVDEV=0A> ____________________________________= ___________=0A> Simpleweb-Support mailing list=0A> Simpleweb-Support@lists.= sourceforge.net=0A> https://lists.sourceforge.net/lists/listinfo/simpleweb-= support=0A>=0A-------------------------------------------------------------= ------------=0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin S= ourceForge.net's Techsay panel and you'll get the chance to share your=0Aop= inions on IT & business topics through brief surveys-and earn cash=0Ahttp:/= /www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV= =0A_______________________________________________=0ASimpleweb-Support mail= ing list=0AS...@li...=0Ahttps://lists.sourcefo= rge.net/lists/listinfo/simpleweb-support=0A=0A=0A=0A=0A=0A =0A_____________= _______________________________________________________________________=0AF= ood fight? Enjoy some healthy debate =0Ain the Yahoo! Answers Food & Drink = Q&A.=0Ahttp://answers.yahoo.com/dir/?link=3Dlist&sid=3D396545367 |