MCPcopy Create free account
hub / github.com/dianping/cat / catTransactionProcess

Method catTransactionProcess

integration/springMVC-AOP/CatAspect.java:16–33  ·  view source on GitHub ↗
(ProceedingJoinPoint pjp, CatTransaction catTransaction)

Source from the content-addressed store, hash-verified

14public class CatAspect {
15
16 @Around("@annotation(catTransaction)")
17 public Object catTransactionProcess(ProceedingJoinPoint pjp, CatTransaction catTransaction) throws Throwable {
18 String transName = pjp.getSignature().getDeclaringType().getSimpleName() + "." + pjp.getSignature().getName();
19 if(StringUtils.isNotBlank(catTransaction.name())){
20 transName = catTransaction.name();
21 }
22 Transaction t = Cat.newTransaction(catTransaction.type(), transName);
23 try {
24 Object result = pjp.proceed();
25 t.setStatus(Transaction.SUCCESS);
26 return result;
27 } catch (Throwable e) {
28 t.setStatus(e);
29 throw e;
30 }finally{
31 t.complete();
32 }
33 }
34
35 @Around("@annotation(catCacheTransaction)")
36 public Object catCacheTransactionProcess(ProceedingJoinPoint pjp, CatCacheTransaction catCacheTransaction) throws Throwable {

Callers

nothing calls this directly

Calls 6

newTransactionMethod · 0.95
completeMethod · 0.95
typeMethod · 0.80
getNameMethod · 0.65
setStatusMethod · 0.65
nameMethod · 0.45

Tested by

no test coverage detected