tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikolaj Rydzewski <m...@ceti.pl>
Subject Re: jsp optimization for db driver load and connection
Date Mon, 04 Dec 2006 23:13:04 GMT
Miller, Steve wrote:
> 		Connection conn = ds.getConnection();
> 		Statement stmt =
> conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY);
> 		ResultSet rs = stmt.executeQuery(query1);
> 		//....run iterator loop and display stuff
> 		ResultSet rs = stmt.executeQuery(query2);
> 		//....run iterator loop and display stuff
> 		.....
> 		.....
>
> 		rs.close();
> 		conn.close();
Why don't you use jakarta commons-dbutils? Very small library and makes 
direct JDBC coding piece of cake.

-- 
Mikolaj Rydzewski      <miki@ceti.pl>        http://ceti.pl/~miki/
                    PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.


Mime
View raw message