Project

General

Profile

8060.patch

Sergey Ivanovskiy, 07/10/2025 03:16 PM

Download (1.75 KB)

View differences:

new/src/com/goldencode/p2j/admin/AdminServerImpl.java 2025-07-10 18:59:40 +0000
300 300
    */
301 301
   public static int setTargetLive(boolean stayCurrent, boolean databaseAutoConnect, boolean restCall)
302 302
   {
303
      WorkArea wa = workArea.get();
304
      if (restCall && wa.initialized)
305
      {
306
         return 0;
307
      }
308
      
309
      if (databaseAutoConnect)
310
      {
311
         DatabaseManager.autoConnect();
312
      }
313
      
314
      // mark session as targeted
315
      wa.targeted = true;
316
      wa.stayCurrent = stayCurrent;
317
      
318
      // bind session to the directory service
319
      wa.ds = DirectoryService.getInstance();
320
      if (wa.ds.bind())
321
      {
322
         wa.bound = true;
323
      }
324
      
325
      wa.sa = new SecurityAdmin(wa.ds);
326
      wa.initialized = true;
327
      
328
      return sm.adminGetCacheSerial(wa.stayCurrent);
303
      try
304
      {
305
         WorkArea wa = workArea.get();
306
         if (restCall && wa.initialized)
307
         {
308
            return 0;
309
         }
310
         
311
         // mark session as targeted
312
         wa.targeted = true;
313
         wa.stayCurrent = stayCurrent;
314
         
315
         // bind session to the directory service
316
         wa.ds = DirectoryService.getInstance();
317
         if (wa.ds.bind())
318
         {
319
            wa.bound = true;
320
         }
321
         
322
         wa.sa = new SecurityAdmin(wa.ds);
323
         wa.initialized = true;
324
         
325
         return sm.adminGetCacheSerial(wa.stayCurrent);
326
      }
327
      finally
328
      {
329
         if (databaseAutoConnect)
330
         {
331
            DatabaseManager.autoConnect();
332
         }
333
      }
329 334
   }
330 335
   
331 336
   /**