code: public static Map<String, List<TraceEvent>> filterCCMPoolEvents(List<TraceEvent> data) throws Exception
     {
        Map<String, List<TraceEvent>> result = new TreeMap<String, List<TraceEvent>>();
  
        for (TraceEvent te : data)
        {
           if (te.getType() == TraceEvent.REGISTER_CCM_CONNECTION ||
               te.getType() == TraceEvent.UNREGISTER_CCM_CONNECTION ||
               te.getType() == TraceEvent.CCM_USER_TRANSACTION ||
               te.getType() == TraceEvent.UNKNOWN_CCM_CONNECTION ||
               te.getType() == TraceEvent.CLOSE_CCM_CONNECTION)
           {
              List<TraceEvent> l = result.get(te.getPool());
  
              if (l == null)
                 l = new ArrayList<TraceEvent>();
  
              l.add(te);
  
              result.put(te.getPool(), l);
           }
        }
  
        return result;
     }
docs: Filter the CCM pool events
  @param data The data
  @return The filtered events
  @exception Exception If an error occurs