Is statement pooling supported? : Metadata DB Info : Database SQL JDBC : Java examples (example source code) Organized by topic

Java
C++
PHP


Java  »  Database SQL JDBC   » [  Metadata DB Info  ]  Screenshots 
 



Is statement pooling supported?

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;

public class CheckStatementPooling {

  public static Connection getConnection() throws Exception {
    String driver = "oracle.jdbc.driver.OracleDriver";
    String url = "jdbc:oracle:thin:@localhost:1521:databaseName";
    String username = "name";
    String password = "password";
    Class.forName(driver)// load Oracle driver
    Connection conn = DriverManager.getConnection(url, username, password);
    return conn;
  }

  public static void main(String[] argsthrows Exception {
    Connection conn = getConnection();
    try {
      DatabaseMetaData dbmd = conn.getMetaData();
      if (dbmd == null) {
        System.out.println("No");
      }
      if (dbmd.supportsStatementPooling()) {
        System.out.println("statement pooling is supported");
      else {
        System.out.println("No");
      }
    catch (Exception e) {
      e.printStackTrace();
    finally {
      conn.close();
    }
  }
}

           
       
Related examples in the same category
1.  Get all key words in databaseHas Download File
2.  Get Database Schema From MetaDataHas Download File
3.  Get Catalog From Database MetadataHas Download File
4.  Database MetaData: Database version
5.  Type info in database metadata
6.  A database MetaData query
7.  DatabaseMetaData class to obtain information about the
8.  Database Info
9.  JDBC Performance
10.  Driver Property Info
11.  JDBC Version App
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.