Joe Gittings wrote:
> In the meantime... here is my workaround for the problem with SET CHAINED,
> Sybase, and Jonas. It consists of a customized version of the jConnect JDBC
> driver. This approach has the advantage that you don't need to change the
> jonas source or rebuild jonas.
>
> To use it,
> i) put the classes below in your CLASSPATH
> ii) specify uk.org.rbgkew.sepasal.util.ejb.jonas.JConnectDriverForJonas as
> the JDBC driver (i.e. the value of datasource.classname in
> jonas.properties)
> iii) use a JDBC URL for your datasource of the form
> "jdbc:sybaseforjonas:<etc>" instead of the usual "jdbc:sybase:<etc>".
>
> The last step is necessary so that DriverManager.connect() will invoke the
> right driver.
>
> The workaround connection object tries calling setAutoCommit() on the
> Sybase connection object that it wraps, and if the "SET CHAINED command not
> allowed within multistatement transaction" error is generated, it then
> calls commit(), and then calls setAutoCommit() again. So commit() is only
> called as necessary. In all other respects the workaround classes just call
> through to the Sybase classes.
>
Another, and more perfect solution will be
to find why JOnAS call setAutoCommit() inside not committed
transaction :)
btw, I still use jConnect4.0 because 5.x has problems with
koi8 charset.
So I going to aplly my dirty hack to ConnectionImpl.java again and again :((
--
Dmitry Melekhov
http://www.aspec.ru/~dm
2:5050/11.23@fidonet
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".