Return-Path: X-Original-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8CECDC0B for ; Mon, 19 Nov 2012 22:36:42 +0000 (UTC) Received: (qmail 34529 invoked by uid 500); 19 Nov 2012 22:36:42 -0000 Delivered-To: apmail-incubator-deltaspike-dev-archive@incubator.apache.org Received: (qmail 34435 invoked by uid 500); 19 Nov 2012 22:36:42 -0000 Mailing-List: contact deltaspike-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltaspike-dev@incubator.apache.org Delivered-To: mailing list deltaspike-dev@incubator.apache.org Received: (qmail 34427 invoked by uid 99); 19 Nov 2012 22:36:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 22:36:42 +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 gerhard.petracek@gmail.com designates 209.85.212.47 as permitted sender) Received: from [209.85.212.47] (HELO mail-vb0-f47.google.com) (209.85.212.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 22:36:36 +0000 Received: by mail-vb0-f47.google.com with SMTP id e21so2827697vbm.6 for ; Mon, 19 Nov 2012 14:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Nstq8tLqDVlOm0/9nKmgP+pSFIrQ0WPfXTWd6i/hUDA=; b=sTSSSYhfC1+7xDPFR9r2JcyemAgNQquyLSn38t8L7b/DAVCL/x0qcDCX9HZWQIKeU1 t07ECZ/Uln3soyfrX3y8s4QJqm0M7KdwlM2GxUxSRVdJGdMX7DubFh0FqF3bKE3Mj03/ 6pGaF4lSbPOQF0UbWNPfUBJJB4IAgOuuZoFu6nGVLwPe9vZzBQ45xqrKZoGfxcmg54MR ixgX9EOvolxepfpfQsprLIn9rpfgaVCS9WcP6oe3K7pD9kXw3fbjUC1txTqIegv0TLWv 9nFz6AL7p8DglhyOT7U6OmihFzXf3CeP/Bd5mZt8DV+RR2l0KFhSPyihu048jvaOgqIS IRFw== Received: by 10.52.27.48 with SMTP id q16mr13490394vdg.114.1353364575563; Mon, 19 Nov 2012 14:36:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.67.51 with HTTP; Mon, 19 Nov 2012 14:35:55 -0800 (PST) In-Reply-To: <1353349358.42107.YahooMailNeo@web28903.mail.ir2.yahoo.com> References: <377139061.800.1353274378802.JavaMail.jiratomcat@arcas> <1353349358.42107.YahooMailNeo@web28903.mail.ir2.yahoo.com> From: Gerhard Petracek Date: Mon, 19 Nov 2012 23:35:55 +0100 Message-ID: Subject: Re: [jira] [Created] (DELTASPIKE-293) Improve the ViewScopedContext by observing ServletContext and HttpSession lifecycle events. To: deltaspike-dev@incubator.apache.org Cc: rdcrng@gmail.com Content-Type: multipart/alternative; boundary=20cf307d059ac72ddc04cee0be7a X-Virus-Checked: Checked by ClamAV on apache.org --20cf307d059ac72ddc04cee0be7a Content-Type: text/plain; charset=ISO-8859-1 hi radu, imo we have 3 easy options: #1 we continue to rely on jsf-events and just add a session-scoped bean which triggers the cleanup via its @PreDestroy callback (if the cleanup wasn't done already). (we also need one to cleanup the window-context.) #2 since we also need to track the view-ids for the view-access-scope, we just use a similar implementation (which follows the rules of the view-scope) and map it to @ViewScoped. #3 like #2 but with the help of the window-context (instead of the view-map) -> similar to [1]. regards, gerhard [1] http://os890.blogspot.co.at/2011/06/session-based-view-scope-with-codi.html 2012/11/19 Mark Struberg > > > Hi Radu! > > Yes, we already discussed this and agreed to import it. > Txs 4 your report! > > LieGrue, > strub > > > > > > >________________________________ > > From: Radu Creanga > >To: deltaspike-dev@incubator.apache.org > >Sent: Sunday, November 18, 2012 11:56 PM > >Subject: Re: [jira] [Created] (DELTASPIKE-293) Improve the > ViewScopedContext by observing ServletContext and HttpSession lifecycle > events. > > > >Hello everyone, > > > >It seems this will require ServletContext events and Session events to > >be published to the CDI event bus, which in turn requires adding the > >appropriate listeners to web.xml until CDI 1.1. I know Seam Solder has > >these listeners implemented. Are there plans to import it into > >DeltaSpike? > > > >Radu Creanga > > > > > >On Sun, Nov 18, 2012 at 4:32 PM, Radu Creanga (JIRA) > wrote: > >> Radu Creanga created DELTASPIKE-293: > >> --------------------------------------- > >> > >> Summary: Improve the ViewScopedContext by observing > ServletContext and HttpSession lifecycle events. > >> Key: DELTASPIKE-293 > >> URL: > https://issues.apache.org/jira/browse/DELTASPIKE-293 > >> Project: DeltaSpike > >> Issue Type: Improvement > >> Components: JSF-Module > >> Affects Versions: 0.4-incubating > >> Reporter: Radu Creanga > >> Fix For: 0.5-incubating > >> > >> > >> The CDI specification states that Context implementations are > responsible for destroying instances it creates. The current > ViewScopedContext relies on PreDestroyViewMapEvents to be notified when a > view map is destroyed. But, the JSF 2.0 and 2.1 spec only fire this event > when a view map is replaced. This means that in most cases, instances > created by ViewScopedContext are not properly destroyed. The > ViewScopedContext should be observing ServletContext and HttpSession > lifecycle events instead in order to ensure that all instances it creates > are properly destroyed. Visible improvements resulting out of this would be > that the @PostConstruct method of @ViewScoped beans is invoked. > Additionally, this will probably result in better memory usage, since > instances that are not properly destroyed are not eligible for GC. > >> > >> -- > >> This message is automatically generated by JIRA. > >> If you think it was sent incorrectly, please contact your JIRA > administrators > >> For more information on JIRA, see: > http://www.atlassian.com/software/jira > > > > > > > --20cf307d059ac72ddc04cee0be7a--