I have seen many friends in questioning the problem of database connection pools, so ICLATIONS. The following is the difference between Oracle and SQL Server when configuring the connection pool: 1.oracle and SQL Server Differences when configuring the pool:
Oracle configuration method in Tomcat configuration
SQL Server configuration method
Oracle Package Way ORANT/JDBC/LIB/CLASES12.JAR COPY to Tomcat 4.1 COMMON / LIB folder
2. Oracle and SQL Server Differences when using JDBC: ORACLESTRING URL_ = "172.28.122.49:1521:CPDB"; String ID_ =" CU01 "; string pass_ =" abc "; class.forname (" Oracle.jdbc.driver "CONN = DriverManager.getConnection (" JDBC: Oracle: Thin: @ " URL_, ID_, Pass_);
SQL ServerClass.forName ( "oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection ( "jdbc: microsoft: sqlserver: // BLUESKY: 1433; User = sa; Password = sa; DatabaseName = sitedb); Class. Forname (drivername); connection conn = drivermanager.getConnection (connURL);
3. Examples Examples: Tomcattry.xml is Tomcat's configuration file, Sample is a connection pool Servlet code (start servlet through Comming.html) This example environment OS: Windows2000JDK: 1.4.2_04ide: Eclipse3.0Web Server: Tomcat4. 1.27DATABASE: Oracle9i
Database table structure Name: TEST structure: username not null varchar2 (10) Password varcha2 (10) Built table statement: Create Table Test (username varchar (10) Primary Key, Password Varchar (10));
At the same time, I also concluded an example of connecting pools, login login function, using the connection pool to connect Oracle9i, please leave your e-mail.