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 =
(Driver)Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
Connection conn =
d.connect("jdbc:jtds:sqlserver://*.*.*.*:1433;DatabaseName=DBName", p);
//Connection conn =
DriverManager.getConnection("jdbc:jtds:sqlserver://*.*.*.*:1433;Database
Name=DBName", p);
conn.close();
%>
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:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
for details on how to configure this.
--
Gary Evesson
Decentrix Inc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]