Advertisement
ILyaCyclone

Untitled

Jan 18th, 2021
758
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement