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 15:56:27 GMT
On Thu, Oct 17, 2013 at 9:04 PM, Howard W. Smith, Jr. <
smithh032772@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 type of cross-forum posting. My goal is to
communicate/share my actual/expected test results.

In production, I am using TomEE 1.6.0 (OWB) + MyFaces 2.1.12 + OmniFaces
1.6(.1) CDI @ViewScoped, which invokes @PreDestroy on session invalidation
'and' expiration. Some minutes ago, I did a test against production app,
and just wanted to show you my 'actual test results' of production (which)
= 'expected test results' of MyFaces 2.2 CDI @ViewScoped.

In production, session timeout = 15 minutes, so I did a test against
production server, and did the 'same' test as Test 2 (session expiration)
in my previous post that included my latest test and test results of
MyFaces 2.2 CDI @ViewScoped.


Test: login user, navigate to page which references CDI @ViewScoped bean,
F5/refresh browser to generate another CDI @ViewScoped bean, and let
session expire via (15-minute) session timeout; @PreDestroy of (OmniFaces)
CDI @ViewScoped bean executed. see below.

Oct 18, 2013 11:20:29 AM jsf.users.pf_UsersController loginUser
INFO: administrator logged in at 10/18/2013 11:20 AM

Oct 18, 2013 11:20:39 AM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@650707eb

Oct 18, 2013 11:20:42 AM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@132f168a

-- session expired --

Oct 18, 2013 11:35:43 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@132f168a

Oct 18, 2013 11:35:43 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@650707eb

Oct 18, 2013 11:35:43 AM jsf.users.pf_UsersController sessionTimeout
INFO: administrator session ended at 10/18/2013 11:35 AM

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