Ejemplo n.º 1
0
 /**
  * Update 'global' JMS clients and RDB
  *
  * @param pv Alarm PV
  * @param severity Alarm severity (highest, latched)
  * @param message Alarm message
  * @param value Value that triggered
  * @param timestamp Time of last alarm update
  */
 public void sendGlobalUpdate(
     final AlarmPV pv,
     final SeverityLevel severity,
     final String message,
     final String value,
     final Timestamp timestamp) {
   // Send to JMS
   messenger.sendGlobalUpdate(pv, severity, message, value, timestamp);
   // Persist global alarm state change in separate queue & thread
   // so that it won't delay the alarm server from updating
   work_queue.execute(
       new Runnable() {
         @Override
         public void run() {
           try {
             rdb.writeGlobalUpdate(pv, severity.isActive());
             recoverFromRDBErrors();
           } catch (Exception ex) {
             // Remember that there was an error
             had_RDB_error = true;
             Activator.getLogger().log(Level.SEVERE, "Exception during global alarm update", ex);
           }
         }
       });
 }