Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 26427 invoked from network); 11 Jan 2009 11:10:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2009 11:10:41 -0000 Received: (qmail 34385 invoked by uid 500); 11 Jan 2009 11:10:39 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 34343 invoked by uid 500); 11 Jan 2009 11:10:39 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 34332 invoked by uid 99); 11 Jan 2009 11:10:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Jan 2009 03:10:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andrew.clegg@gmail.com designates 72.14.220.152 as permitted sender) Received: from [72.14.220.152] (HELO fg-out-1718.google.com) (72.14.220.152) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Jan 2009 11:10:29 +0000 Received: by fg-out-1718.google.com with SMTP id l26so3842569fgb.10 for ; Sun, 11 Jan 2009 03:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=hfcmBl1IGdyMupES3XKogb88BjDf47nhP2kUG41hfKI=; b=k88cDgrvNEJp9dipdds7mb3E4XYsXXc81qY/1zjiagdcECJ5XNoTedksrQpdBZbkjG T1HNOk6FtFF8LH8Hn+CupTAoT3h+esmi3KaeusZ9WkEDLXU1qJQf5KB6MkbsOCoOfDaE e/pzF7PNiupQQJsQ8t8gfDKdG8U0Kzz1UPjbs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=uT6XxRLoVtVs+FCHuP9+hJkWZpjdIy/qIpTlYaikXBr+aP8dG9mgRDTSEXUg00SsCT 8CimpUWSrawrO39bw4iuX4/JIzmcLl73kaqCPmqxxe7J2LM/RFGYp7uvTByl5XYAxewD 2X6qtDZD0kB6dWCW1Ad8vqUlCjlW8Evx0LRsA= Received: by 10.86.68.2 with SMTP id q2mr16026254fga.68.1231672208951; Sun, 11 Jan 2009 03:10:08 -0800 (PST) Received: by 10.86.98.2 with HTTP; Sun, 11 Jan 2009 03:10:08 -0800 (PST) Message-ID: Date: Sun, 11 Jan 2009 11:10:08 +0000 From: "Andrew Clegg" To: users@cxf.apache.org Subject: Re: Thick client notification from web service In-Reply-To: <21397749.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <21397749.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 2009/1/11 SKS : > I have a thick swing client used by users to perform actions. Business logic > is on server and exposed as CXF web services. I have a requirement where > Admin user can see list of connected user and disconnect them for some > reason , if required. I want a communication alert to be shown on > disconnection so that they can save their changes. When you say connected/disconnected -- is there actually any sort of permanent connection between the client and server? Or is "connected" just essentially shorthand for "web services will respond to client's requests"? > Can anybody advise me a good solution ..I can implement it many ways like > background thread continiously checking with webservice & sleeping for some > time and checking again , HTTP connection to servlet etc. I want to put an > optimize solution to ensure that it should not affect performance of client > & server both. Hard to say much without knowing more about the system, but your first suggestion seems fairly sound. Maybe with an operation called something like getTimeToDisconnect -- if it returns null, the background thread just sleeps for a preset interval, if it returns a positive integer N the client warns the user "You will be disconnected in N seconds". You'd have to decide on the right two values to use (thread sleep interval, and initial disconnect notification time) based on how many users you have, how many WS requests the server is handling, etc. If you wanted to optimize it *slightly* you could use a plain old HTTP GET instead of a real SOAP op, but that might add extra complexity to your codebase, since presumably you're already using SOAP for the real services. Don't know if this is the best way but it would be my first solution to try... Andrew. -- New site launched: http://biotext.org.uk/ I am retiring my old email addresses. Please use MY_FIRST_NAME@nervechannel.com (i.e. andrew) in the future.