abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Berry <chriswbe...@gmail.com>
Subject Re: Abdera and Singleton
Date Wed, 19 Sep 2007 21:25:53 GMT
If Abdera is used within Spring, then you get a Singleton (by default)
Likewise, check out the new SpringAbderaServlet.
Cheers,
-- Chris  

On Sep 19, 2007, at 4:12 PM, James M Snell wrote:

> 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
>>

S'all good  ---   chriswberry at gmail dot com




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message