Ejemplo n.º 1
0
  static {
    try {
      CON_PROXY_CTOR = createProxyConstructor(ProxyConnection.class);

      Class[] argClasses = new Class[0];
      RS_CLOSE_METHOD = ResultSet.class.getMethod("close", argClasses);
      STMT_CLOSE_METHOD = Statement.class.getMethod("close", argClasses);

      CLOSE_ARGS = new Object[0];

      OBJECT_METHODS =
          Collections.unmodifiableSet(new HashSet(Arrays.asList(Object.class.getMethods())));
    } catch (Exception e) {
      // e.printStackTrace();
      logger.log(
          MLevel.SEVERE,
          "An Exception occurred in static initializer of" + C3P0PooledConnection.class.getName(),
          e);
      throw new InternalError(
          "Something is very wrong, or this is a pre 1.3 JVM."
              + "We cannot set up dynamic proxies and/or methods!");
    }
  }
Ejemplo n.º 2
0
 public static synchronized Set allPooledDataSources() {
   Set out = Collections.unmodifiableSet(unclosedPooledDataSources);
   // System.err.println( "allPooledDataSources(): " + out );
   return out;
 }
Ejemplo n.º 3
0
 public static synchronized Set allIdentityTokenized() {
   HashSet out = new HashSet();
   out.addAll(tokensToTokenized.values());
   // System.err.println( "allIdentityTokenized(): " + out );
   return Collections.unmodifiableSet(out);
 }
Ejemplo n.º 4
0
 public static synchronized Set allIdentityTokens() {
   Set out = Collections.unmodifiableSet(tokensToTokenized.keySet());
   // System.err.println( "allIdentityTokens(): " + out );
   return out;
 }