Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C55B1E741 for ; Thu, 14 Feb 2013 05:26:43 +0000 (UTC) Received: (qmail 33666 invoked by uid 500); 14 Feb 2013 05:26:41 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 33412 invoked by uid 500); 14 Feb 2013 05:26:36 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 33355 invoked by uid 99); 14 Feb 2013 05:26:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 05:26:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ken.mcwilliams@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vb0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 05:26:28 +0000 Received: by mail-vb0-f54.google.com with SMTP id l1so1288792vba.41 for ; Wed, 13 Feb 2013 21:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=6N17K5W+ZVNkIeQ8EGNa7aj1wGNX06au+V7hdm5rUcs=; b=rjkDeQPqUDUsKgStd+tnRT1xXhyamsYYVjVVjdvZRFtJ9aElKt9lIIf9PlrCZqxgIs qGNcXwXfBPlGzTuvhI4TZ9K/GkVjd3Dl+yGkfd5IDZ8wToH51eoLi5XXrSSTj2zlY4L0 JUQ+VzntHbdU32hXHZzQtZtsk57Fxq5VYtQe3ZAq8zbgAD6wh80Sj9dy2jEpW691+k53 0b+rqhHUivmFvAyLai/Cc470MtnrMSaBigkt/Ts1dijkxdZGGeewNQeYIex8ZVE0ytPx he/9EH81X04kIE2LqHAjrUYjwIWRdurIE2ZH/LCHzoe/CBx8X5heRT4LXybIadJXI/P5 eQUg== MIME-Version: 1.0 X-Received: by 10.52.156.72 with SMTP id wc8mr28060232vdb.77.1360819566866; Wed, 13 Feb 2013 21:26:06 -0800 (PST) Received: by 10.58.190.104 with HTTP; Wed, 13 Feb 2013 21:26:06 -0800 (PST) In-Reply-To: References: Date: Wed, 13 Feb 2013 22:26:06 -0700 Message-ID: Subject: Re: struts2 and WebSphere dynacache From: Ken McWilliams To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=bcaec53aef5ce2f28d04d5a87e23 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec53aef5ce2f28d04d5a87e23 Content-Type: text/plain; charset=ISO-8859-1 Even then the solution is very limited. The OP probably wants to cache all popular pages/reports, in many cases the same action will be responsible... a singleton clearly can't address that. It could be addressed with an object pool that was keyed to actions, parameters and values and managed by an interceptor. I think it would be tricky to implement, particularly the promotion of which resources to the cache and which objects to dispose of. On Wed, Feb 13, 2013 at 2:22 AM, Antonios Gkogkakis wrote: > On 13 February 2013 07:35, Lukasz Lenart wrote: > > > 2013/2/12 Antonios Gkogkakis : > > > Assuming that caching of Action objects makes sense in your > application, > > > you could change the struts default object factory, > > > to guice or spring and declare the action beans that you want to be > > cached > > > as singletons. Alternatively you could write your own object factory > and > > > put some caching logic there. > > > > It isn't a good practise to declare actions as singleton, Struts 2 > > wasn't designed in that way. You really must know what are you doing > > :-) > > > > I'm with you on that one Lukasz that's way I said "assuming..." :) > > > > Antonios > --bcaec53aef5ce2f28d04d5a87e23--