Examples of MQTimer


Examples of com.sun.messaging.jmq.util.timer.MQTimer

    }
    public static MQTimer getTimer(boolean purge) {
        if (timer == null) {
            synchronized(lock) {
                if (timer == null) {
                    timer = new MQTimer(true);
                    timer.setLogger(getLogger());
                    timer.initUncaughtExceptionHandler();
                }
            }
        }
View Full Code Here

Examples of com.sun.messaging.jmq.util.timer.MQTimer

                    Globals.getTransactionList().unlockTakeoverTxns(txn);
                    // OK rollback Open txns - we want to do this
                    boolean done = reaper.processTxns();

                    MQTimer timer = Globals.getTimer();
                    try {
                        if (!done)
                            timer.schedule(reaper, reaperTimeout, reaperTimeout);

                    } catch (IllegalStateException ex) {
                        logger.logStack(Logger.WARNING,
                            BrokerResources.E_INTERNAL_BROKER_ERROR,
                            "Unable to start takeover-transaction reaper", ex);
View Full Code Here

Examples of com.sun.messaging.jmq.util.timer.MQTimer

                                    rb.getKString(rb.M_LOW_MEMORY_STARTUP));
          return (1);
      }

      if (diagInterval > 0) {
          MQTimer timer = Globals.getTimer();
          int _interval = diagInterval * 1000;
          timer.schedule(new BrokerDiagTask(), _interval, _interval);
      } else if (diagInterval == 0) {
          logger.log(Logger.INFO, DiagManager.allToString());
      }

      return 0; //started OK
View Full Code Here

Examples of com.sun.messaging.jmq.util.timer.MQTimer

        // is 0 but if this method is being called from the same thread
        // that is originated from a store operation, then the condition
        // will not be met and it will wait forever.
     
     
      MQTimer timer = Globals.getTimer();
      timer.schedule(new StoreSyncTask(), 1000);
   
    }
View Full Code Here

Examples of com.sun.messaging.jmq.util.timer.MQTimer

    return false;
            } else if (state == Connection.STATE_CONNECTED) {
                interval = Globals.getConfig().getLongProperty(
                   Globals.IMQ + ".authentication.client.response.timeout",
                   DEFAULT_INTERVAL);
                MQTimer timer = Globals.getTimer(true);
                stateWatcher = new StateWatcher(Connection.STATE_INITIALIZED, this);
                try {
                    timer.schedule(stateWatcher, interval*1000);
                } catch (IllegalStateException ex) {
                    logger.log(Logger.DEBUG,"InternalError: timer canceled ", ex);
                }

            } else if (state == Connection.STATE_INITIALIZED
                   || state == Connection.STATE_AUTH_REQUESTED
                   || state == Connection.STATE_AUTH_RESPONSED) {
                if (stateWatcher != null) {
                    try {
                        stateWatcher.cancel();
                    } catch (IllegalStateException ex) {
                        logger.log(Logger.DEBUG,"Error setting state on "+
                            " connection "  + this + " to state " +
                            state, ex);
                    }
                    stateWatcher = null;
                }
                // if next state not from client, return
                if (state == Connection.STATE_INITIALIZED) {
                    return true;
                }
                if (state == Connection.STATE_AUTH_RESPONSED) {
                    return true;
                }

                MQTimer timer = Globals.getTimer(true);
                stateWatcher = new StateWatcher(
                        Connection.STATE_AUTH_RESPONSED, this);
                try {
                    timer.schedule(stateWatcher, interval*1000);
                } catch (IllegalStateException ex) {
                    logger.log(Logger.DEBUG,"InternalError: timer canceled ", ex);
                }
            } else if (state >= Connection.STATE_AUTHENTICATED
                    || state == Connection.STATE_UNAVAILABLE)
View Full Code Here

Examples of com.sun.messaging.jmq.util.timer.MQTimer


    private void startTimer() {
        if (PING_ENABLED && connectionWatcher == null) {
            lastConCheck = System.currentTimeMillis();
            MQTimer timer = Globals.getTimer(true);
            connectionWatcher = new ConnectionWatcher();
            try {
                timer.schedule(connectionWatcher, pingTimeout, pingTimeout);
            } catch (IllegalStateException ex) {
                logger.log(Logger.DEBUG,"Timer shutting down", ex);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.