Re: Connection Pooling with Tomcat 4.1 and SQL Server 2000

2005-01-06 Thread Friedrich Gonzalez
Everything you did with the driver,server.xml,web.xml is ok.
But it sounds like your driver of sql server 2000 doesnt support 
connection pooling ...
did you tried to connect without the connection pool?
i also recommend going to tomcat 5... i had a couple of issues with 
connection pooling in tomcat 4 with db2 so i went to tomcat 5.
now everything is just better.

Johnson, Jay escribió:
I am trying to establish a connection pool in Tomcat 4.1 to SQL Server
2000.  Looking at the SQL Server trace utility, it appears Tomcat
connects with the correct username/password and then the following
exception is thrown:

java.lang.UnsupportedOperationException at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSourc
e.java:161).
I have taken the following steps:
1)Moved the driver jar files to /common/lib/
2)Modified the Server.xml file
3)Modified the web.xml file of the application
Here is my Server.xml entry:
DefaultContext
Resource name=jdbc/test auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/test
parameter
namedriverClassName/name
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameter
nameurl/name
valuejdbc:microsoft:sqlserver://localhost:1433/value
/parameter
parameter
nameusername/name
valuejay/value
/parameter
parameter
namepassword/name
valuejay/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namemaxWait/name
value100/value
/parameter
/ResourceParams
/DefaultContext
Here is my entry in the web.xml file:
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/test/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth 
/resource-ref

Are any additional entries needed?  Any help would be greatly
appreciated!

Thanks,
Jay Johnson
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Connection Pooling with Tomcat 4.1 and SQL Server 2000

2005-01-06 Thread Johnson, Jay
I can connect using my current driver without connection pooling.  You may be 
correct; the driver may not support it.  I'm using Microsoft's standard type 4 
driver.  I'll try using Tomcat 5 also and see if it makes a difference.  I'll 
also see if I can find another driver.  Thanks for help!

-Original Message-
From: Friedrich Gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 06, 2005 6:10 AM
To: Tomcat Users List
Subject: Re: Connection Pooling with Tomcat 4.1 and SQL Server 2000

Everything you did with the driver,server.xml,web.xml is ok.
But it sounds like your driver of sql server 2000 doesnt support 
connection pooling ...
did you tried to connect without the connection pool?
i also recommend going to tomcat 5... i had a couple of issues with 
connection pooling in tomcat 4 with db2 so i went to tomcat 5.
now everything is just better.

Johnson, Jay escribió:

I am trying to establish a connection pool in Tomcat 4.1 to SQL Server
2000.  Looking at the SQL Server trace utility, it appears Tomcat
connects with the correct username/password and then the following
exception is thrown:

 

java.lang.UnsupportedOperationException at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSourc
e.java:161).
 
I have taken the following steps:
 
1)Moved the driver jar files to /common/lib/
2)Modified the Server.xml file
3)Modified the web.xml file of the application
 
Here is my Server.xml entry:
 
DefaultContext
Resource name=jdbc/test auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/test
parameter
namedriverClassName/name
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameter
nameurl/name
valuejdbc:microsoft:sqlserver://localhost:1433/value
/parameter
parameter
nameusername/name
valuejay/value
/parameter
parameter
namepassword/name
valuejay/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namemaxWait/name
value100/value
/parameter
/ResourceParams
/DefaultContext
 
Here is my entry in the web.xml file:
 
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/test/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth 
/resource-ref
 
Are any additional entries needed?  Any help would be greatly
appreciated!

 

Thanks,

Jay Johnson


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]