Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-19 Thread Howard W. Smith, Jr.
On Fri, Oct 18, 2013 at 6:01 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > Based on these test results, @PreDestroy of MyFaces 2.2 CDI @ViewScoped > bean is executed via session invalidation and expiration. :) > > Great work and thank you, Leonardo, Gerhard, and MyFaces team! :) > W

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
On Fri, Oct 18, 2013 at 5:51 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > i will repeat my test 1 or 2 more times, just to confirm. Test 1: session invalidation (login, reference @ViewScoped bean, logout, which does HttpSession.invalidate()) Oct 18, 2013 5:53:45 PM jsf.users.pf_

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Good news! See (all) below, please :) On Fri, Oct 18, 2013 at 5:06 PM, Leonardo Uribe wrote: > I have added the artifacts in: > > https://issues.apache.org/jira/browse/MYFACES-3747 > > > https://issues.apache.org/jira/secure/attachment/12609208/myfaces-api-2.2.0-SNAPSHOT.jar > > https://issues.a

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Leonardo Uribe
I saw the exception too, and the artifacts attached to the issue already has the fix for the exception you mention. 2013/10/18 Howard W. Smith, Jr. > Leonardo, > > Okay, i will download those artifacts and test and report test results, > ASAP. > > thanks, > Howard > > > On Fri, Oct 18, 2013 a

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Leonardo, Okay, i will download those artifacts and test and report test results, ASAP. thanks, Howard On Fri, Oct 18, 2013 at 5:06 PM, Leonardo Uribe wrote: > Hi Howard > > It seems something failed in the build, but it was not in the code, it was > like an interruption on jenkins. > > I hav

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Hmmm... On Fri, Oct 18, 2013 at 11:56 AM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > My goal is to communicate/share my actual/expected test results. More to share below. Earlier, when I tested via 2013-Oct-18 MyFaces 2.2 JARs, exceptions showed up in localhost log, but I just reco

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Leonardo Uribe
Hi Howard It seems something failed in the build, but it was not in the code, it was like an interruption on jenkins. I have added the artifacts in: https://issues.apache.org/jira/browse/MYFACES-3747 https://issues.apache.org/jira/secure/attachment/12609208/myfaces-api-2.2.0-SNAPSHOT.jar https:

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Leonardo, I see myfaces 2.2 api JAR was updated but not myfaces 2.2 impl JAR. Did you want me to just download the following JAR and retest, or there is another/later version of the JAR, which is yet to be built? myfaces-api-2.2.0-20131018.201520-2509.jar

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Gerhard, sounds good to me. :) On Fri, Oct 18, 2013 at 4:22 PM, Gerhard Petracek < gerhard.petra...@gmail.com> wrote: > hi howard, > > your test confirmed what i saw recently -> we have already what i planned > to do (the confirmation of the issue). > > regards, > gerhard > > http://www.irian.at

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Gerhard Petracek
hi howard, your test confirmed what i saw recently -> we have already what i planned to do (the confirmation of the issue). regards, gerhard http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Cool! If your test works against Leonardo's latest changes/fixes, please post/share your test results (and test steps). Thanks! On Fri, Oct 18, 2013 at 3:45 PM, Gerhard Petracek < gerhard.petra...@gmail.com> wrote: > hi howard, > > i just planned a short (re-)test for starting a discussion like

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Gerhard Petracek
hi howard, i just planned a short (re-)test for starting a discussion like this one. regards, gerhard http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2013/10/18 Howard W. Smith, Jr. >

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Leonardo, that's great to hear and you're welcome. i'm a very happy MyFaces user and definitely want to see MyFaces 2.2.x working as RI/expected/intended/designed/spec'ified. :) As before, I can wait for repository to be updated, can download, and test, and can report, accordingly/afterwards. tha

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Leonardo Uribe
Hi I have committed a mixed solution between @PreDestroy annotation and ManagedBeanDestroyerListener. The idea is the first one in destroy the beans wins and the second one is just ignored. I have tested it with both configurations, so I hope it will work in your application. Let us know what hap

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Leonardo Uribe
Hi I was able to reproduce the problem. I have been testing this issue against jetty / weld, and this issue comes when using tomcat / owb configuration. It seems when the session is destroyed, CDIManagedBeanHandlerImpl try to get a reference of ViewScopeBeanHolder and FlowScopeBeanHolder, but in t

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
On Thu, Oct 17, 2013 at 9:04 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > OmniFaces CDI @ViewScoped[1] executes @PreDestroy on session.invalidate() > and that is what I like/expect, but MyFaces 2.2 CDI @ViewScoped > implementation is not doing the same. I am not trying to do any t

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Gerhard, you're welcome. since i don't have bandwidth (right now), maybe/hopefully, you can develop test case(s) per what we're discussing/testing/reporting here...if you have bandwidth to do so. :) On Fri, Oct 18, 2013 at 5:14 AM, Gerhard Petracek < gerhard.petra...@gmail.com> wrote: > @howard:

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
On Thu, Oct 17, 2013 at 11:52 PM, Leonardo Uribe wrote: > > You can check here: > > https://builds.apache.org/view/M-R/view/MyFaces/job/myfaces-current22-1/ > > As soon as the job (#1164) is done, you can take the jars from that > location (which should be the same). > > wish i had good news/repo

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Gerhard Petracek
@howard: that's one of the issues i mentioned during the discussion for MYFACES-3797 and i was going to test it tomorrow. -> thx for testing it and starting this thread. regards, gerhard http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and Ge

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Leonardo Uribe
Hi You can check here: https://builds.apache.org/view/M-R/view/MyFaces/job/myfaces-current22-1/ As soon as the job (#1164) is done, you can take the jars from that location (which should be the same). regards, Leonardo Uribe 2013/10/17 Howard W. Smith, Jr. > Okay, that is great. I'm waitin

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Howard W. Smith, Jr.
Okay, that is great. I'm waiting for the following folders to be updated with the latest version: 1. https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/myfaces-api/2.2.0-SNAPSHOT/ 2. https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Leonardo Uribe
Hi I have found the bug. The problem was caused on a refactor, there was an old code that skip state saving when view map is empty, but now since there is a proxy for that implementing StateHolder, the map can be empty but it holds the view scope key. Since with CDI the beans are stored internally

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Leonardo Uribe
Hi I have committed a fix for the problem with the timeout. But I'm curious about this problem, because I tested this scope and specifically the @PreDestroy stuff. It should work. But maybe there is a bug somewhere regards, Leonardo Uribe 2013/10/17 Howard W. Smith, Jr. > responses inlin

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Howard W. Smith, Jr.
responses inline below, On Thu, Oct 17, 2013 at 9:32 PM, Leonardo Uribe wrote: > > public void onSessionDestroyed() > { > // In CDI case, the best way to deal with this is use a method > // with @PreDestroy annotation on a session scope bean > // ( ViewScopeBeanH

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Leonardo Uribe
Hi Could you please provide an example to test this stuff properly? The problem in this point is these lines in the javadoc of javax.faces.view.ViewScope: "... In the session expiration case, the runtime must ensure that FacesContext.getCurrentInstance() returns a valid instance if it is called d

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Howard W. Smith, Jr.
On Thu, Oct 17, 2013 at 8:53 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > Clarification: my test included session.invalidate() instead of (actual) > session expired (via/after session timeout). > > will provide test (config, steps and) results in my next response to this > thread. >

[MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-17 Thread Howard W. Smith, Jr.
Hmmm, based on Gerhard's recent response below, On Thu, Oct 17, 2013 at 7:45 AM, Gerhard Petracek < gerhard.petra...@gmail.com> wrote: > @myfaces-core: > the minimal goal is to be spec. compliant. > and JAVASERVERFACES_SPEC_PUBLIC-905[1], I downloaded latest MyFaces 2.2 api and impl JARs (2013-O