Exemple #1
0
 public Tracer doGetTracer(
     final Transaction transaction,
     final ClassMethodSignature sig,
     final Object call,
     final Object[] args) {
   try {
     final String endPoint =
         (String)
             call.getClass()
                 .getMethod("getTargetEndpointAddress", (Class<?>[]) new Class[0])
                 .invoke(call, new Object[0]);
     try {
       final URL url = new URL(endPoint);
       final String uri = InstrumentUtils.getURI(url);
       String methodName;
       if (sig == null) {
         methodName = "";
       } else {
         methodName = sig.getMethodName();
       }
       return new XmlRpcTracer(
           (PointCut) this,
           transaction,
           sig,
           call,
           url.getHost(),
           "XmlRpc",
           uri,
           new String[] {methodName});
     } catch (MalformedURLException e) {
       Agent.LOG.log(
           Level.FINE, "Unable to parse the target endpoint address for an XML RPC call", e);
     }
   } catch (Throwable e2) {
     Agent.LOG.log(
         Level.FINE, "Unable to get the target endpoint address for an XML RPC call", e2);
   }
   return null;
 }