ILyaCyclone

Untitled

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