⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nonpooltest.java

📁 此程序都是企业级 的数据库开发程序 全面揭示了JAVA对数据库的操作
💻 JAVA
字号:
package pooling;

import java.sql.*;
import profiler.Profiler;
import datasource.DataSourceClient;

public class NonPoolTest {

  private static ConnectionPool pool;

  public static void main(String args[]) {

    // Create an instance of our profiling tool
    Profiler p = new Profiler();

    try {

      // Load driver
      //Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();

      // Lets Get 10 Connections
      Connection c[] = new Connection[10];

      // Obtain 10 connections and profile this section of code
      // .. START
      p.Start("main() in NON PoolTest");
      for (int i = 0; i < 10; i++) {
        c[i] = new DataSourceClient().getConnection();
      } 
      p.Stop();

      // .. END

    } catch (Exception e) {
      e.printStackTrace();
    } 
  } 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -