public StrutsActionConfigMatcherTracer( Transaction transaction, ClassMethodSignature sig, Object matcher, Object[] args) { super(sig, transaction); String msg; try { Object e = args[1]; msg = (String) Invoker.invoke(e, e.getClass(), "getPath", new Object[0]); Agent.LOG.finer("Normalizing path using Struts wildcard"); this.setTransactionName(transaction, msg); } catch (Exception var7) { msg = MessageFormat.format( "Exception in {0} handling {1}: {2}", new Object[] {StrutsActionConfigMatcherPointCut.class.getSimpleName(), sig, var7}); if (Agent.LOG.isLoggable(Level.FINEST)) { Agent.LOG.log(Level.FINEST, msg, var7); } else { Agent.LOG.finer(msg); } } }
private void setTransactionName(Transaction transaction, String wildcardPath) { if (transaction.isTransactionNamingEnabled()) { TransactionNamingPolicy policy = TransactionNamingPolicy.getHigherPriorityTransactionNamingPolicy(); if (Agent.LOG.isLoggable(Level.FINER) && policy.canSetTransactionName(transaction, TransactionNamePriority.FRAMEWORK)) { String msg = MessageFormat.format( "Setting transaction name to \"{0}\" using Stuts wildcard", new Object[] {wildcardPath}); Agent.LOG.finer(msg); } policy.setTransactionName( transaction, wildcardPath, "Struts", TransactionNamePriority.FRAMEWORK); } }