tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Evesson" <>
Subject Re: JTDS help
Date Wed, 09 Feb 2005 19:42:48 GMT
Charles P. Killmer wrote:

>I have also tried these methods since.  
><%@ page language="java" import="java.sql.*"%>
><%@ page language="java" import="java.util.Properties"%>
>Properties p = new Properties();
>p.put("user", "*****");
>p.put("password", "******");
>Driver d =
>Connection conn =
>d.connect("jdbc:jtds:sqlserver://*.*.*.*:1433;DatabaseName=DBName", p);
>//Connection conn =
>Name=DBName", p);
That way of doing things is always going to be desparately slow. 
Connecting to the database is very heavy weight and very slow. You need 
to use some connection pooling. You'll see an enormous improvement in 
performance. Tomcat has DBCP built in. Look at setting this up. It will 
make an enormous difference. Look at:

for details on how to configure this.


Gary Evesson
Decentrix Inc

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message