Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 32324 invoked from network); 7 Jan 2006 17:25:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jan 2006 17:25:10 -0000 Received: (qmail 73649 invoked by uid 500); 7 Jan 2006 17:25:09 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 73419 invoked by uid 500); 7 Jan 2006 17:25:08 -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 73408 invoked by uid 99); 7 Jan 2006 17:25:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 09:25:08 -0800 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=NO_REAL_NAME,RCVD_IN_SORBS_WEB,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of fedechicco@gmail.com designates 64.233.162.207 as permitted sender) Received: from [64.233.162.207] (HELO zproxy.gmail.com) (64.233.162.207) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 09:25:07 -0800 Received: by zproxy.gmail.com with SMTP id n29so5585216nzf for ; Sat, 07 Jan 2006 09:24:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:from:to:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=PVaD6VurErcXVOI/vjuIsupL0CFvTspOSFnuJieCU9eh0PTVHjCNjgkohcAhvIVh78p2Ho/Q5DKOMC2uxjYHvM/za6hHJXR8O85TShIIlDEwogCW+ocKtF83XgIt91/O/mqU0z+0i5a6YK6Sc1Mx9vrEXiBy7dWU4r7Wu0v5Rgo= Received: by 10.65.213.18 with SMTP id p18mr2178535qbq; Sat, 07 Jan 2006 09:24:46 -0800 (PST) Received: from fedechiccowinxp ( [213.156.52.114]) by mx.gmail.com with ESMTP id q14sm4109292qbq.2006.01.07.09.24.43; Sat, 07 Jan 2006 09:24:46 -0800 (PST) Message-ID: <002101c613af$3f1baa20$0300a8c0@fedechiccowinxp> From: To: "Apache Directory Developers List" References: <43BFD3F0.6040306@eurone.it> <43BFDBD5.4020107@gmail.com> <43BFECF6.3070800@eurone.it> Subject: Re: [MINA] BindException on Unix Date: Sat, 7 Jan 2006 18:24:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Alessandro, >I give my poor opinion on this. I think this is logically incorrect, >because Java is potentially platform independent. > Setting some parameters on the platform I'm going to violate this kind of > contract, so why don't use C++ ? > And sorry I don't understand a GUI implementation to stop a server...I > want to do a unix service, I want to start, stop or > restart my service with the classic init.d concept... As the other unix daemon, you should use the signals (like SIGKILL) to catch events from the OS and manage them as you want: I don't know how to do that, but I know that you can capture the signal of kill and run your own events (i.e. do a correct shut-down disconnecting all the clients connected and unbinding the ServerSockets, and then call your System.exit() ) I've seen a snippit of code that work in this way for other java programs, and I tested it on Winzoz and Linux in the same way. ---- DarkBios has you ----