Exemple #1
0
 private StatusReporter findStatusReporter(PooledDataSource pds, Document doc) {
   if (pds.getClass() == ComboPooledDataSource.class)
     return new CpdsStatusReporter((ComboPooledDataSource) pds, doc);
   else if (pds.getClass() == PoolBackedDataSource.class)
     return new PbdsStatusReporter((PoolBackedDataSource) pds, doc);
   else return new UnknownPdsStatusReporter(pds, doc);
 }
Exemple #2
0
    public Element reportDtElem() {
      StringBuffer sb = new StringBuffer(255);
      sb.append(shortTypeName);
      sb.append(" [ dataSourceName: ");
      sb.append(pds.getDataSourceName());
      sb.append("; identityToken: ");
      sb.append(pds.getIdentityToken());
      sb.append(" ]");

      Element dtElem = doc.createElement("dt");
      dtElem.appendChild(doc.createTextNode(sb.toString()));
      return dtElem;
    }
Exemple #3
0
 UnknownPdsStatusReporter(PooledDataSource pds, Document doc) {
   this(pds.getClass().getName(), pds, doc);
 }