Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 20920 invoked from network); 29 Sep 2005 14:00:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2005 14:00:53 -0000 Received: (qmail 93560 invoked by uid 500); 29 Sep 2005 14:00:52 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 93517 invoked by uid 500); 29 Sep 2005 14:00:51 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 93504 invoked by uid 99); 29 Sep 2005 14:00:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 07:00:51 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.94.11.36] (HELO smtp.ludonet.it) (62.94.11.36) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 29 Sep 2005 07:00:56 -0700 Received: (qmail 11407 invoked by uid 1013); 29 Sep 2005 13:59:24 -0000 Received: from p.perrucci@ludonet.it by ip-11-36 by uid 1010 with qmail-scanner-1.22-st-qms ( Clear:RC:1(62.94.10.230):. Processed in 2.159095 secs); 29 Sep 2005 13:59:24 -0000 X-Antivirus-LUDONET-IT-Mail-From: p.perrucci@ludonet.it via ip-11-36 X-Antivirus-LUDONET-IT: 1.22-st-qms (Clear:RC:1(62.94.10.230):. Processed in 2.159095 secs Process 11352) Received: from ludonet-gw.eutelia.it (HELO ?192.168.0.23?) (62.94.10.230) by smtp.ludonet.it with SMTP; 29 Sep 2005 13:59:21 -0000 Message-ID: <433BF379.4070905@ludonet.it> Date: Thu, 29 Sep 2005 16:00:25 +0200 From: Paolo Perrucci User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: it, it-it, en-us, en MIME-Version: 1.0 To: dev@directory.apache.org Subject: [mina] How to implement graceful shutdown Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi all, I want to implement a graceful shutdown mechanism for a simple MyApplicationServer using mina. I want to realize a shutdown() method that block accepting connections and wait for all connected client to exit closing their connections. Doing some tests, it seems that SimpleServiceRegistry.unbind() methods stops thread pool so I must close the active connections BEFORE unbind the service. Is there a "suggested" way to do this? Thanks Paolo