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

        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.
        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.
        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
        Hide
        Mircea Toma added a comment -

        Checked in the missing AllWindowsClosed interface.

        Show
        Mircea Toma added a comment - Checked in the missing AllWindowsClosed interface.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: