You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Mike Mahoney <mi...@thingworx.com> on 2011/10/12 23:56:23 UTC

ThreadPoolExecutor shutdown

Hello Everyone,

I was looking through some of the StanzaRelay code and noticed that ThreadPoolExecutors in DeliveringInternalInboundStanzaRelay and DeliveringExternalInboundStanzaRelay never get cleanly shutdown.  Probably not a priority but I was thinking of adding a stop() method to the StanzaRelay interface and implementing it in all the child classes.  The relay method would then throw a DeliveryException if they were called after stop().

Thoughts?  Should I open a Jira ticket for this?

Thanks,
Mike

----------------------------------------
Mike Mahoney
OEM Application Specialist
ThingWorx
Office:   (610) 594-6200 x817
Mobile: (585) 314-8592


Re: ThreadPoolExecutor shutdown

Posted by Bernd Fondermann <bf...@brainlounge.de>.
On 12.10.11 23:56, Mike Mahoney wrote:
> Hello Everyone,
> 
> I was looking through some of the StanzaRelay code and noticed that ThreadPoolExecutors in DeliveringInternalInboundStanzaRelay and DeliveringExternalInboundStanzaRelay never get cleanly shutdown.  Probably not a priority but I was thinking of adding a stop() method to the StanzaRelay interface and implementing it in all the child classes.  The relay method would then throw a DeliveryException if they were called after stop().
> 
> Thoughts?  Should I open a Jira ticket for this?

Good catch! I've applied some changes based on your patch.
I added unit tests and decided to throw ServiceUnavailableException, to
make it easer to return a proper error stanza.

  Bernd

Re: ThreadPoolExecutor shutdown

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Wed, Oct 12, 2011 at 11:56 PM, Mike Mahoney
<mi...@thingworx.com> wrote:
> I was looking through some of the StanzaRelay code and noticed that ThreadPoolExecutors in DeliveringInternalInboundStanzaRelay and DeliveringExternalInboundStanzaRelay never get cleanly shutdown.  Probably not a priority but I was thinking of adding a stop() method to the StanzaRelay interface and implementing it in all the child classes.  The relay method would then throw a DeliveryException if they were called after stop().
>
> Thoughts?  Should I open a Jira ticket for this?

Yes please :-)

/niklas