Changeset 469
- Timestamp:
- 01/18/11 18:47:13 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/impl/MUAProcessImpl.java
r434 r469 39 39 */ 40 40 public class MUAProcessImpl implements MUAProcess { 41 41 42 42 /* class logger */ 43 43 static Logger log = LoggerFactory.getLogger(MUAProcessImpl.class); … … 98 98 } 99 99 } 100 log.warn("Lock was hit for method performStatistic"); 100 101 return null; 101 102 … … 119 120 @Override 120 121 public void updateStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation) { 122 boolean success= false; 121 123 if (lockR.tryLock()) { 122 124 try { 123 125 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"); 132 137 } 133 138 … … 154 159 155 160 } 161 log.warn("Lock was hit for method performAdministrativeFunction"); 156 162 return false; 157 163 } … … 164 170 @Override 165 171 public void addAuthentications(UAEntryPush pushed) { 172 boolean success = false; 166 173 if (lockR.tryLock()) { 167 174 try { 168 175 log.debug("MUA has received {} entries from {}", pushed.getEntries().size(), pushed.getUaMetaData().getUaName()); 169 176 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"); 179 189 180 190 } … … 195 205 } 196 206 } 207 log.warn("Lock was hit for method updateAndInvokeStatisticalUnit"); 197 208 return null; 198 209 199 210 } 200 211
Note: See TracChangeset
for help on using the changeset viewer.
