You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hese <10...@gmail.com> on 2010/09/17 19:02:18 UTC
how to cleanup threads when tapestry shutsdown
Hi,
I have written a tapestry service and added it to AppModule.java (using
function buildMyClass()). This service class uses a thread to execute some
processes. Now, the question is how do I know if the web app/tapestry is
shutting down so that I can do clean up stuff in my class??
Thanks!
hese.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2844012.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: how to cleanup threads when tapestry shutsdown
Posted by hese <10...@gmail.com>.
oh sorry...i mistook it to be as developers in general.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2845624.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: how to cleanup threads when tapestry shutsdown
Posted by Howard Lewis Ship <hl...@gmail.com>.
Fixed, thanks.
On Sun, Nov 28, 2010 at 9:14 PM, Paul Stanton <pa...@mapshed.com.au> wrote:
> Howard,
>
> There's a typo in this FAQ:
>
> shutdownHub.addShutdownListener(this);
>
> should be
>
> shutdownHub.addRegistryShutdownListener(this);
>
> p.
>
>
> On 18/09/2010 7:50 AM, Howard Lewis Ship wrote:
>
>> Added to FAQ:
>>
>>
>> https://cwiki.apache.org/confluence/display/TAPESTRY/Frequently+Asked+Questions#FrequentlyAskedQuestions-Myservicestartsathread%3BhowdoIknowwhentheapplicationisshuttingdown%2Ctostopthatthread%3F
>>
>>
>> On Fri, Sep 17, 2010 at 2:33 PM, Howard Lewis Ship<hl...@gmail.com>
>> wrote:
>>
>>> This is not a discussion for the dev list; it should be on the users
>>> list.
>>>
>>> On Fri, Sep 17, 2010 at 12:13 PM, Dmitry Gusev<dm...@gmail.com>
>>> wrote:
>>>
>>>> Contribute RegistryShutdownListener like this:
>>>>
>>>> public MyClass buildMyClass(RegistryShutdownHub hub)
>>>> {
>>>> MyClass result = new MyClass();
>>>>
>>>> // MyClass should implement RegistryShutdownListener interface
>>>>
>>>> hub.addRegistryShutdownListener(result);
>>>>
>>>> return result;
>>>> }
>>>>
>>>> On Fri, Sep 17, 2010 at 21:02, hese<10...@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I have written a tapestry service and added it to AppModule.java (using
>>>>> function buildMyClass()). This service class uses a thread to execute
>>>>> some
>>>>> processes. Now, the question is how do I know if the web app/tapestry
>>>>> is
>>>>> shutting down so that I can do clean up stuff in my class??
>>>>>
>>>>> Thanks!
>>>>> hese.
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2844012.html
>>>>> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Dmitry Gusev
>>>>
>>>> AnjLab Team
>>>> http://anjlab.com
>>>>
>>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
Re: how to cleanup threads when tapestry shutsdown
Posted by Paul Stanton <pa...@mapshed.com.au>.
Howard,
There's a typo in this FAQ:
shutdownHub.addShutdownListener(this);
should be
shutdownHub.addRegistryShutdownListener(this);
p.
On 18/09/2010 7:50 AM, Howard Lewis Ship wrote:
> Added to FAQ:
>
> https://cwiki.apache.org/confluence/display/TAPESTRY/Frequently+Asked+Questions#FrequentlyAskedQuestions-Myservicestartsathread%3BhowdoIknowwhentheapplicationisshuttingdown%2Ctostopthatthread%3F
>
>
> On Fri, Sep 17, 2010 at 2:33 PM, Howard Lewis Ship<hl...@gmail.com> wrote:
>> This is not a discussion for the dev list; it should be on the users list.
>>
>> On Fri, Sep 17, 2010 at 12:13 PM, Dmitry Gusev<dm...@gmail.com> wrote:
>>> Contribute RegistryShutdownListener like this:
>>>
>>> public MyClass buildMyClass(RegistryShutdownHub hub)
>>> {
>>> MyClass result = new MyClass();
>>>
>>> // MyClass should implement RegistryShutdownListener interface
>>>
>>> hub.addRegistryShutdownListener(result);
>>>
>>> return result;
>>> }
>>>
>>> On Fri, Sep 17, 2010 at 21:02, hese<10...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have written a tapestry service and added it to AppModule.java (using
>>>> function buildMyClass()). This service class uses a thread to execute some
>>>> processes. Now, the question is how do I know if the web app/tapestry is
>>>> shutting down so that I can do clean up stuff in my class??
>>>>
>>>> Thanks!
>>>> hese.
>>>> --
>>>> View this message in context:
>>>> http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2844012.html
>>>> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>
>>>>
>>>
>>> --
>>> Dmitry Gusev
>>>
>>> AnjLab Team
>>> http://anjlab.com
>>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: how to cleanup threads when tapestry shutsdown
Posted by Howard Lewis Ship <hl...@gmail.com>.
Added to FAQ:
https://cwiki.apache.org/confluence/display/TAPESTRY/Frequently+Asked+Questions#FrequentlyAskedQuestions-Myservicestartsathread%3BhowdoIknowwhentheapplicationisshuttingdown%2Ctostopthatthread%3F
On Fri, Sep 17, 2010 at 2:33 PM, Howard Lewis Ship <hl...@gmail.com> wrote:
> This is not a discussion for the dev list; it should be on the users list.
>
> On Fri, Sep 17, 2010 at 12:13 PM, Dmitry Gusev <dm...@gmail.com> wrote:
>> Contribute RegistryShutdownListener like this:
>>
>> public MyClass buildMyClass(RegistryShutdownHub hub)
>> {
>> MyClass result = new MyClass();
>>
>> // MyClass should implement RegistryShutdownListener interface
>>
>> hub.addRegistryShutdownListener(result);
>>
>> return result;
>> }
>>
>> On Fri, Sep 17, 2010 at 21:02, hese <10...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> I have written a tapestry service and added it to AppModule.java (using
>>> function buildMyClass()). This service class uses a thread to execute some
>>> processes. Now, the question is how do I know if the web app/tapestry is
>>> shutting down so that I can do clean up stuff in my class??
>>>
>>> Thanks!
>>> hese.
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2844012.html
>>> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> Dmitry Gusev
>>
>> AnjLab Team
>> http://anjlab.com
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: how to cleanup threads when tapestry shutsdown
Posted by Howard Lewis Ship <hl...@gmail.com>.
This is not a discussion for the dev list; it should be on the users list.
On Fri, Sep 17, 2010 at 12:13 PM, Dmitry Gusev <dm...@gmail.com> wrote:
> Contribute RegistryShutdownListener like this:
>
> public MyClass buildMyClass(RegistryShutdownHub hub)
> {
> MyClass result = new MyClass();
>
> // MyClass should implement RegistryShutdownListener interface
>
> hub.addRegistryShutdownListener(result);
>
> return result;
> }
>
> On Fri, Sep 17, 2010 at 21:02, hese <10...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> I have written a tapestry service and added it to AppModule.java (using
>> function buildMyClass()). This service class uses a thread to execute some
>> processes. Now, the question is how do I know if the web app/tapestry is
>> shutting down so that I can do clean up stuff in my class??
>>
>> Thanks!
>> hese.
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2844012.html
>> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: how to cleanup threads when tapestry shutsdown
Posted by Dmitry Gusev <dm...@gmail.com>.
Contribute RegistryShutdownListener like this:
public MyClass buildMyClass(RegistryShutdownHub hub)
{
MyClass result = new MyClass();
// MyClass should implement RegistryShutdownListener interface
hub.addRegistryShutdownListener(result);
return result;
}
On Fri, Sep 17, 2010 at 21:02, hese <10...@gmail.com> wrote:
>
> Hi,
>
> I have written a tapestry service and added it to AppModule.java (using
> function buildMyClass()). This service class uses a thread to execute some
> processes. Now, the question is how do I know if the web app/tapestry is
> shutting down so that I can do clean up stuff in my class??
>
> Thanks!
> hese.
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/how-to-cleanup-threads-when-tapestry-shutsdown-tp2844012p2844012.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>
--
Dmitry Gusev
AnjLab Team
http://anjlab.com