code: public static Map<String, Set<String>> poolManagedConnectionPools(List<TraceEvent> data) throws Exception
     {
        Map<String, Set<String>> result = new TreeMap<String, Set<String>>();
  
        for (TraceEvent te : data)
        {
           if (te.getType() == TraceEvent.GET_CONNECTION_LISTENER ||
               te.getType() == TraceEvent.GET_CONNECTION_LISTENER_NEW ||
               te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER ||
               te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW)
           {
              Set<String> s = result.get(te.getPool());
  
              if (s == null)
                 s = new TreeSet<String>();
  
              s.add(te.getManagedConnectionPool());
  
              result.put(te.getPool(), s);
           }
        }
  
        return result;
     }
docs: Pool to Managed Connection Pools mapping
  @param data The data
  @return The mapping
  @exception Exception If an error occurs