-
1. Re: Seemingly random connection issues?
weston.price Sep 21, 2006 6:04 PM (in response to znbailey)You need to post your *-ds.xml file as well as the version and type of MSSQL driver. Also, MS-SQL version would be good as well.
The exeption you are seeing is typically the result of a SQL not being about to be executed on constructing a connection. This is usually specificied in your *-ds.xml file as <new-connection-sql>SOME SQL</new-connection-sql> -
2. Re: Seemingly random connection issues?
znbailey Sep 22, 2006 4:46 PM (in response to znbailey)"weston.price@jboss.com" wrote:
You need to post your *-ds.xml file as well as the version and type of MSSQL driver. Also, MS-SQL version would be good as well.
The exeption you are seeing is typically the result of a SQL not being about to be executed on constructing a connection. This is usually specificied in your *-ds.xml file as <new-connection-sql>SOME SQL</new-connection-sql>
Hi Weston,
Thanks for your response. Here is the mssql-ds.xml file:<datasources> <local-tx-datasource> <jndi-name>SystemDS</jndi-name> <connection-url>jdbc:jtds:sqlserver://server-host:1433/dbname;SelectMethod=cursor</connection-url> <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> <user-name>ZZZZZZ</user-name> <password>ZZZZZZ</password> <prepared-statement-cache-size>10000</prepared-statement-cache-size> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <blocking-timeout-millis>5000</blocking-timeout-millis> <check-valid-connection-sql>select 1</check-valid-connection-sql> </local-tx-datasource> </datasources>
The version of the JTDS MS SQL driver used is the latest stable release, version 1.2. As you can see the check-valid-connection-sql is specified.
Just to reiterate the JBoss version is 3.2.7. Because of this I don't think the new-connection-sql option is available (I remember reading somewhere that this was a 4.0+ feature)? -
3. Re: Seemingly random connection issues?
weston.price Oct 18, 2006 1:11 AM (in response to znbailey)The new-connection-sql features is in 3.2.7. What I am wondering is why you are seeing this exception when you are not specifying the SQL. Are you still seeing this issue?
-
4. Re: Seemingly random connection issues?
znbailey Oct 18, 2006 12:26 PM (in response to znbailey)"weston.price@jboss.com" wrote:
The new-connection-sql features is in 3.2.7. What I am wondering is why you are seeing this exception when you are not specifying the SQL. Are you still seeing this issue?
Hi Weston,
I have not heard anything from the client lately, however that doesn't mean it is not happening (just that they stopped complaining about it). Do you suggest that we include the <new-connection-sql> option in our DS file? What additional insurance does this give over the <check-valid-connection-sql> option? -
5. Re: Seemingly random connection issues?
weston.price Oct 22, 2006 11:13 PM (in response to znbailey)There are effectively two distince states that the <new-connection-sql> and the <valid-connnection-sql> are designed to address. The former is in connection creation the latter is prior to a connection being handed out of the pool.
The weird thing about your case is that it appears that the <new-connection-sql> has already been set being that the error you are seeing only happens on connection creation, and only in the event that the SQL statement cannot be executed. -
6. Re: Seemingly random connection issues?
znbailey Oct 24, 2006 10:27 AM (in response to znbailey)"weston.price@jboss.com" wrote:
There are effectively two distince states that the <new-connection-sql> and the <valid-connnection-sql> are designed to address. The former is in connection creation the latter is prior to a connection being handed out of the pool.
The weird thing about your case is that it appears that the <new-connection-sql> has already been set being that the error you are seeing only happens on connection creation, and only in the event that the SQL statement cannot be executed.
Hi Weston,
Yeah, it is quite weird. It was my understanding that the new-connection-sql would help detect the case when a new connection was fouled up for whatever reason. Would it be possibly to turn on some debug/trace level logging to pinpoint exactly what is going on, or at least to try and get some more information?