You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ilya Obshadko <il...@gmail.com> on 2013/11/12 01:16:43 UTC

Re: Best way to implement continuously background jobs

I have implemented ParallelExecutor for background mail sending.

However, there is a problem with live class reloading, because I have to
stop the old instance of ParallelExecutor and start the new one. How do I
hook to class reload event? finalize() doesn't seem to work.


On Wed, Jun 19, 2013 at 6:26 PM, Lance Java <la...@googlemail.com>wrote:

> There is the ParallelExecutor which is backed by a thread pool. Be warned,
> the pool size is 3 by default (configurable via a symbol). The
> ParallelExecutor will invoke PerThreadManager.cleanup() once your Runnable
> completes to clean up the hibernate session and any PerThreadValue
> instances.
>



-- 
Ilya Obshadko

Re: Best way to implement continuously background jobs

Posted by Ilya Obshadko <il...@gmail.com>.
This is it, thanks!


On Tue, Nov 12, 2013 at 11:25 AM, Dmitry Gusev <dm...@gmail.com>wrote:

>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/ReloadAware.html
>
>
> On Tue, Nov 12, 2013 at 4:16 AM, Ilya Obshadko <ilya.obshadko@gmail.com
> >wrote:
>
> > I have implemented ParallelExecutor for background mail sending.
> >
> > However, there is a problem with live class reloading, because I have to
> > stop the old instance of ParallelExecutor and start the new one. How do I
> > hook to class reload event? finalize() doesn't seem to work.
> >
> >
> > On Wed, Jun 19, 2013 at 6:26 PM, Lance Java <lance.java@googlemail.com
> > >wrote:
> >
> > > There is the ParallelExecutor which is backed by a thread pool. Be
> > warned,
> > > the pool size is 3 by default (configurable via a symbol). The
> > > ParallelExecutor will invoke PerThreadManager.cleanup() once your
> > Runnable
> > > completes to clean up the hibernate session and any PerThreadValue
> > > instances.
> > >
> >
> >
> >
> > --
> > Ilya Obshadko
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
Ilya Obshadko

Re: Best way to implement continuously background jobs

Posted by Dmitry Gusev <dm...@gmail.com>.
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/ReloadAware.html


On Tue, Nov 12, 2013 at 4:16 AM, Ilya Obshadko <il...@gmail.com>wrote:

> I have implemented ParallelExecutor for background mail sending.
>
> However, there is a problem with live class reloading, because I have to
> stop the old instance of ParallelExecutor and start the new one. How do I
> hook to class reload event? finalize() doesn't seem to work.
>
>
> On Wed, Jun 19, 2013 at 6:26 PM, Lance Java <lance.java@googlemail.com
> >wrote:
>
> > There is the ParallelExecutor which is backed by a thread pool. Be
> warned,
> > the pool size is 3 by default (configurable via a symbol). The
> > ParallelExecutor will invoke PerThreadManager.cleanup() once your
> Runnable
> > completes to clean up the hibernate session and any PerThreadValue
> > instances.
> >
>
>
>
> --
> Ilya Obshadko
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com