Return-Path: Delivered-To: apmail-incubator-abdera-user-archive@locus.apache.org Received: (qmail 21098 invoked from network); 19 Sep 2007 21:13:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 21:13:35 -0000 Received: (qmail 82500 invoked by uid 500); 19 Sep 2007 21:13:27 -0000 Delivered-To: apmail-incubator-abdera-user-archive@incubator.apache.org Received: (qmail 82428 invoked by uid 500); 19 Sep 2007 21:13:27 -0000 Mailing-List: contact abdera-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-user@incubator.apache.org Delivered-To: mailing list abdera-user@incubator.apache.org Received: (qmail 82419 invoked by uid 99); 19 Sep 2007 21:13:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 14:13:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasnell@gmail.com designates 209.85.132.246 as permitted sender) Received: from [209.85.132.246] (HELO an-out-0708.google.com) (209.85.132.246) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 21:13:25 +0000 Received: by an-out-0708.google.com with SMTP id b33so45846ana for ; Wed, 19 Sep 2007 14:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=Lbx03Z/Hb+nKLN7UM55S4JRkANsa0JRb87IW3OTn6ts=; b=faKYkirJjHqcj1EqgJYFTv4J9+00Dll6ci9U0G0557ReAQc8MGUnLuqDMptIRrc/l8/soVEvpMF4JdNTdqaGCRzhCXLfddI7qGIuEiz1G7xGpN2pceQUkAy8gSz16KgYy6qO0ep00EPPCOjFoGt3wTsiajmZQznonqCHyhNN6bo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=TQOYTZLiTpc6E0eUFszJXLHGMr212u/laxwEyHWl7SU1CI83iQjcypRTOAG1T+HmgoeH1rG3+I8yHLrATPFG1zvcKlKVbnbQntfbxfW83gSEZaJmPLkQZHX0GXu+MFr7Pwx4LR+1rVy0gg6IYGJLJecSyHLXdBOx/XzDz/Qz/Qg= Received: by 10.100.168.13 with SMTP id q13mr2226514ane.1190236384919; Wed, 19 Sep 2007 14:13:04 -0700 (PDT) Received: from ?192.168.1.2? ( [67.181.218.96]) by mx.google.com with ESMTPS id 32sm1490883wri.2007.09.19.14.13.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Sep 2007 14:13:03 -0700 (PDT) Message-ID: <46F190D5.7070308@gmail.com> Date: Wed, 19 Sep 2007 14:12:53 -0700 From: James M Snell User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: abdera-user@incubator.apache.org Subject: Re: Abdera and Singleton References: In-Reply-To: X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org We could probably add this, but for a variety of classloader related reasons, it's likely that it would not be a complete replacement for the new Abdera() approach. - James Fred wrote: > Hi, > > I am using Abdera, and I remark that created a new instance of Abdera can be > long. > > Can Abdera Class implement Singleton pattern ? > > You have to add this code in Abdera Class > private static Abdera abdera; > > public static Abdera getInstance() { > if(abdera == null) { > abdera = new Abdera(); > } > return abdera; > } > and replace all "new Abdera()" by Abdera.getInstance(). > > What do you think of this solution ? > > Regards, > Frederic >