myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard W. Smith, Jr." <smithh032...@gmail.com>
Subject Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration
Date Fri, 18 Oct 2013 22:01:50 GMT
On Fri, Oct 18, 2013 at 5:51 PM, Howard W. Smith, Jr. <
smithh032772@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_UsersController loginUser
INFO: administrator logged in at 10/18/2013 05:53 PM

Oct 18, 2013 5:55:05 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@4d807a04
Oct 18, 2013 5:55:09 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@3579149

Oct 18, 2013 5:55:15 PM jsf.users.pf_UsersController logout
INFO: administrator logged out at 10/18/2013 05:55 PM

Oct 18, 2013 5:55:15 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@3579149
Oct 18, 2013 5:55:15 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@4d807a04


Test 2: session expiration; repeated test steps mentioned in my previous
post

Oct 18, 2013 5:55:45 PM jsf.users.pf_UsersController loginUser
INFO: administrator logged in at 10/18/2013 05:55 PM

Oct 18, 2013 5:55:58 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@2340e3d5
Oct 18, 2013 5:56:01 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@3deaf302
Oct 18, 2013 5:57:01 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@3deaf302

Oct 18, 2013 5:57:01 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@2340e3d5
Oct 18, 2013 5:57:01 PM jsf.users.pf_UsersController sessionTimeout
INFO: administrator session ended at 10/18/2013 05:57 PM


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! :)

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