Changeset 469


Ignore:
Timestamp:
01/18/11 18:47:13 (2 years ago)
Author:
philsmart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/impl/MUAProcessImpl.java

    r434 r469  
    3939 */ 
    4040public class MUAProcessImpl implements MUAProcess { 
    41          
     41 
    4242        /* class logger */ 
    4343    static Logger log = LoggerFactory.getLogger(MUAProcessImpl.class); 
     
    9898            } 
    9999        } 
     100        log.warn("Lock was hit for method performStatistic"); 
    100101        return null; 
    101102 
     
    119120    @Override 
    120121    public void updateStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation) { 
     122        boolean success= false; 
    121123        if (lockR.tryLock()) { 
    122124            try { 
    123125                engine.updateStatisticalUnit(statisticalUnitInformation); 
    124             } catch (Exception e) { 
    125                 // TODO either throw as service output, or deal with here 
    126                 log.error(e.getMessage()); 
    127                 e.printStackTrace(); 
    128             } finally { 
    129                 lockR.unlock(); 
    130             } 
    131         } 
     126                success=true; 
     127            } catch (Exception e) { 
     128                // TODO either throw as service output, or deal with here 
     129                log.error(e.getMessage()); 
     130                e.printStackTrace(); 
     131            } finally { 
     132                lockR.unlock(); 
     133            } 
     134        } 
     135        if (!success) 
     136            log.warn("Lock was hit for method updateStatisticalUnit"); 
    132137    } 
    133138 
     
    154159 
    155160        } 
     161        log.warn("Lock was hit for method performAdministrativeFunction"); 
    156162        return false; 
    157163    } 
     
    164170    @Override 
    165171    public void addAuthentications(UAEntryPush pushed) { 
     172        boolean success = false; 
    166173        if (lockR.tryLock()) { 
    167174            try { 
    168175                log.debug("MUA has received {} entries from {}", pushed.getEntries().size(), pushed.getUaMetaData().getUaName()); 
    169176                engine.addAuthentications(pushed); 
    170             } catch (Exception e) { 
    171                 // TODO either throw as service output, or deal with here 
    172                 log.error(e.getMessage()); 
    173                 e.printStackTrace(); 
    174             } finally { 
    175                 lockR.unlock(); 
    176  
    177             } 
    178         } 
     177                success = true; 
     178            } catch (Exception e) { 
     179                // TODO either throw as service output, or deal with here 
     180                log.error(e.getMessage()); 
     181                e.printStackTrace(); 
     182            } finally { 
     183                lockR.unlock(); 
     184 
     185            } 
     186        } 
     187        if (!success) 
     188            log.warn("Lock was hit for method addAuthentications"); 
    179189 
    180190    } 
     
    195205                    } 
    196206                } 
     207                log.warn("Lock was hit for method updateAndInvokeStatisticalUnit"); 
    197208                return null; 
    198                  
     209 
    199210        } 
    200211 
Note: See TracChangeset for help on using the changeset viewer.