ICEfaces
  1. ICEfaces
  2. ICE-7446

Implement mechanism to notify beans when all windows are closed

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      server
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Introduce method annotation that can be used to mark session scoped bean methods that need to be notified by ICEfaces when all the windows previously opened are closed. Many users asked for this kind of feature, usually wanting to execute an early logout when no more windows are opened.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26292 Wed Nov 09 07:50:00 MST 2011 mircea.toma ICE-7446 Introduced @AllWindowsClosed method annotation to be used by session beans that need to be notified when all the browser windows are closed.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java
        Mircea Toma created issue -
        Hide
        Mircea Toma added a comment -

        Introduced @AllWindowsClosed method annotation to be used by session beans that need to be notified when all the browser windows are closed.

        Show
        Mircea Toma added a comment - Introduced @AllWindowsClosed method annotation to be used by session beans that need to be notified when all the browser windows are closed.
        Mircea Toma made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Resolution Fixed [ 1 ]
        Hide
        Mircea Toma added a comment -

        As a good practice the session bean that has one of its method @AllWindowsClosed annotated should be created eagerly, on session startup. This way there is no need to insert references to this bean in all the pages in order to be certain that the bean is created before its method will be invoked.

        Show
        Mircea Toma added a comment - As a good practice the session bean that has one of its method @AllWindowsClosed annotated should be created eagerly, on session startup. This way there is no need to insert references to this bean in all the pages in order to be certain that the bean is created before its method will be invoked.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26298 Wed Nov 09 10:42:52 MST 2011 deryk.sinotte ICE-7446: reverting change that's breaking the build
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.1 [ 10241 ]
        Hide
        Deryk Sinotte added a comment -

        Recent check in related to this case was breaking the build:

        compile:
        [javac] Compiling 70 source files to /Users/Ken/Code/svn/grimlock/icefaces/core/build/classes
        [javac] /Users/Ken/Code/svn/grimlock/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java:24: cannot find symbol
        [javac] symbol : class AllWindowsClosed
        [javac] location: package org.icefaces.bean
        [javac] import org.icefaces.bean.AllWindowsClosed;
        [javac] ^
        [javac] /Users/Ken/Code/svn/grimlock/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java:581: cannot find symbol
        [javac] symbol : class AllWindowsClosed
        [javac] location: class org.icefaces.impl.application.WindowScopeManager.AllWindowsClosedNotifier
        [javac] callAnnotatedMethod(object, AllWindowsClosed.class);
        [javac] ^
        [javac] Note: Some input files use or override a deprecated API.
        [javac] Note: Recompile with -Xlint:deprecation for details.
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 2 errors

        Show
        Deryk Sinotte added a comment - Recent check in related to this case was breaking the build: compile: [javac] Compiling 70 source files to /Users/Ken/Code/svn/grimlock/icefaces/core/build/classes [javac] /Users/Ken/Code/svn/grimlock/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java:24: cannot find symbol [javac] symbol : class AllWindowsClosed [javac] location: package org.icefaces.bean [javac] import org.icefaces.bean.AllWindowsClosed; [javac] ^ [javac] /Users/Ken/Code/svn/grimlock/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java:581: cannot find symbol [javac] symbol : class AllWindowsClosed [javac] location: class org.icefaces.impl.application.WindowScopeManager.AllWindowsClosedNotifier [javac] callAnnotatedMethod(object, AllWindowsClosed.class); [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors
        Deryk Sinotte made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26305 Wed Nov 09 14:26:23 MST 2011 mircea.toma ICE-7446 Add the missing @AllWindowsClosed annotation.
        Files Changed
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/bean/AllWindowsClosed.java
        Hide
        Mircea Toma added a comment -

        Checked in the missing AllWindowsClosed interface.

        Show
        Mircea Toma added a comment - Checked in the missing AllWindowsClosed interface.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mircea Toma added a comment -

        Cleanup the scope maps that expired when all windows are closed.

        Show
        Mircea Toma added a comment - Cleanup the scope maps that expired when all windows are closed.
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26343 Mon Nov 14 04:03:40 MST 2011 mircea.toma ICE-7446 Cleanup the scope maps that expired when all windows are closed. Alos, notify eagerly @PreDestroy on the remaining window scope beans.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java
        Hide
        Mircea Toma added a comment -

        Cleanup the scope maps that expired when all windows are closed. Alos, notify eagerly @PreDestroy on the remaining window scope beans.

        Show
        Mircea Toma added a comment - Cleanup the scope maps that expired when all windows are closed. Alos, notify eagerly @PreDestroy on the remaining window scope beans.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 3.0.RC1 [ 10300 ]
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: