tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jones" <kev...@develop.com>
Subject Tyrex exception when using tomcat 4.0.4 (b1 and b2)
Date Tue, 02 Apr 2002 20:00:29 GMT
I've been using TC4 for a while now. I'm using the MS SQL Server JDBC
drivers (and have been for a while), and install them as a resource in
TC using the Tyrex JNDI implementation. In TC 4.0.3 everything works
fine, however in TC 4.0.4 (b1 and b2) I get exceptions. 

I'm simply doing the following

ctx = new javax.naming.InitialContext();
ds = (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/WhitePages");
conn = ds.getConnection();
conn.setAutoCommit(false);        

and I'm getting an exception

java.sql.SQLException: Commit not supported in enlisted connections.
   at tyrex.jdbc.EnlistedConnection.commit(EnlistedConnection.java:154)
   at
com.develop.ewebjava.lab.GetPessimistic.doGet(GetPessimistic.java:60)

If I look at the class returned through getConnection I get this
hierarchy

tyrex.jdbc.EnlistedConnection
tyrex.jdbc.AbstractTyrexConnectionImpl
java.lang.Object

and for the interface hierarchy

java.sql.Connection
tyrex.tm.EnlistedResource


If I run the same code in TC 4.03 then it all works fine and the class
hierarchy looks like this

com.microsoft.jdbc.sqlserver.SQLServerConnection
com.microsoft.jdbc.base.BaseConnection
java.lang.Object

so it looks like tyrex in 4.0.4 is wrapping the JDBC connection with its
own class. There is no change to the tyrex.jar file, however the
TyrexDataSourceFactory and TyrexTransactionFactory classes in
TC/lib/naming-factory.jar have changed.

I've just added this into Bugzilla, although I'm not sure it's a bug
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7693). 

If anybody could say 'do this' and it would fix the problem I'd be
grateful,

Kevin Jones
Developmentor
www.develop.com


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message