Package org.olat.core.util

Examples of org.olat.core.util.SignOnOffEvent


   * which have or are logged off
   *
   * @see org.olat.core.util.event.GenericEventListener#event(org.olat.core.gui.control.Event)
   */
  public void event(Event event) {
    SignOnOffEvent se = (SignOnOffEvent) event;
    if (!se.isSignOn() && se.isEventOnThisNode()) {
      // it is a "logout" event - we are only interested in logout events
      // and it is from our VM => only release all locks from within one VM
      String identName = se.getIdentityName();
      // release all locks held by the identity that has just logged out.
      // (assuming one user has only one session (logged in with one browser only): otherwise (as in singlevm, too)
      // since the lock is reentrant, a lock could be freed while a session still is in a locked workflow (2x lock and then once freed)
      ClusterLockManager cm = ClusterLockManager.getInstance();
      try {
View Full Code Here


   * which have or are logged off
   *
   * @see org.olat.core.util.event.GenericEventListener#event(org.olat.core.gui.control.Event)
   */
  public void event(Event event) {
    SignOnOffEvent se = (SignOnOffEvent) event;
    if (!se.isSignOn()) { // it is a "logout" event - we are only interested in logout events
      String name = se.getIdentityName();
      // release all locks hold by the identity that has just logged out.
      synchronized (locks) { //o_clusterOK by:fj, by definition we are in singleVM mode
        for (Iterator<Entry<String, LockEntry>> iter = locks.entrySet().iterator(); iter.hasNext();) {
          Map.Entry<String, LockEntry> entry = iter.next();
          String key = entry.getKey();
View Full Code Here

    }
    // DB transaction must be in error state for this test
    try {
      ClusterLocker locker = new ClusterLocker();
      System.out.println("ClusterLocker created");
      Event event = new SignOnOffEvent(identity, false);
      System.out.println("START locker.event(event)");
      locker.event(event);
      System.out.println("DONE locker.event(event)");
    } catch(Exception ex) {
      System.err.println(ex);
View Full Code Here

TOP

Related Classes of org.olat.core.util.SignOnOffEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.