Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/06/08 17:17:55 (5 months ago)
Author:
mseaton
Message:

synchronization_bidirectional_branch: merge from [4734] to [5181].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/data_synchronization_bidirectional/src/api/org/openmrs/scheduler/SchedulerUtil.java

    r4969 r5183  
    4848                 
    4949                // TODO: do this for all services 
    50                 Context.addProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
    51                 Context.getSchedulerService().onStartup(); 
    52                 Context.removeProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
     50                try { 
     51                        Context.addProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
     52                        Context.getSchedulerService().onStartup(); 
     53                } 
     54                finally { 
     55                        Context.removeProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
     56                } 
    5357        } 
    5458         
     
    6872                 
    6973                // TODO: Do this for all services 
    70                 Context.addProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
    71                 // doesn't attempt shutdown if there was an error getting the scheduler service 
    72                 if (service != null) {  
    73                         service.onShutdown(); 
     74                try { 
     75                        Context.addProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
     76                        // doesn't attempt shutdown if there was an error getting the scheduler service 
     77                        if (service != null) {  
     78                                service.onShutdown(); 
     79                        } 
    7480                } 
    75                 Context.removeProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
     81                finally { 
     82                        Context.removeProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_SCHEDULER); 
     83                } 
    7684                 
    7785        }