ILyaCyclone

Untitled

Jan 18th, 2021
554
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class SalaryServiceImpl {
  2.     private static Boolean eusEnabled = null;
  3.     private static final Object initEusLock = new Object();
  4.    
  5.     public SalaryServiceImpl() {
  6.         synchronized(initEusLock) {
  7.             if(eusEnabled == null) {
  8.                 try {
  9.                     eusEnabled = queryEusEnabled();
  10.                 } catch (Exception e) {
  11.                     _logger.severe("Unable to query eusEnabled. EUS will be disabled.", e);
  12.                     eusEnabled = false;
  13.                 }
  14.                 _logger.info("initializing with EUS {0}", (eusEnabled ? "enabled" : "disabled")});
  15.             }
  16.         }
  17.     }
  18. }
RAW Paste Data