ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | architecture List | Febuary 2004 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [architecture] AW: [c-jdbc] Differences in behaviour of JDBC drivers



-----Ursprüngliche Nachricht-----
Von: Emmanuel Cecchet [mailto:Emmanuel.Cecchet@xxxxxxxxxxxx] 
Gesendet: Freitag, 30. Jänner 2004 19:16
An: Madl Alfred
Cc: c-jdbc@xxxxxxxxxxxxx; Raicevic Igor; ObjectWeb Architecture
Betreff: Re: [c-jdbc] Differences in behaviour of JDBC drivers


Hi Alfred,

  
Because we have more and more issues with differences in the behaviour
of JDBC drivers of different vendors I wanted to ask you, if you have 
the same issues in C-JDBC.

    
For issues concerning JDBC driver URLs, it is up to the C-JDBC user to 
provide the correct URL in its configuration file. For example, with 
MySQL some of them add extra parameters in the JDBC URL for automatic 
reconnection of MySQL specific features.
As we require mostly only JDBC 1.0 features from the underlying driver, 
we have few issues. Some Sybase driver were not working properly but we 
don't have a lot of issues.

  
We have identified several issues like that between all usual JDBC
drivers of PostGres, MySQL, McKoi, Hypersonic, SQLServer, Oracle, DB2,
    

  
Informix… in our projects “Octopus” and “DODS”.

What are your experiences in this area ?

    
The mains problems arise when we try to fetch the database schema. Some 
drivers don't implement the feature or do not really implement what is 
told in the JDBC spec.

  
This is right... and of course, using as much as possible JDBC1 (and not advanced functions) is wise.

Some other problems we noticed (both with RmiJdbc and other experiences) :
- Some drivers do not cache column values (for example, if you call getString() twice on the same column, the 2nd will fail because the value was consumed !)
- Some drivers do not properly handle concurrent accesses (they are not thread safe; we experienced that frequently with the JDBC/ODBC bridge, for example with MS Access).
- There are differences in the way stored procedures are called (Oracle, for example, has specific types and/or ways to handle errors).
- Some bugs require workarounds (eg. some versions of sybase drivers require a "commit()" to be issued on connections before calling "setAutoCommit()"..., we also had problems with setLockModeToWait() on Informix, and with some non-standard method names with Oracle, that required workarounds...)
- XA extensions also often have specific behaviours...

For the 1st 2 points, our ExperShop product provides configuration properties :
- We undertake the caching if the driver does not
- We synchronize the access if the driver is not thread-safe (of course, doing so makes the performance bad !)

Note that the "clean" way of doing that would rather be to provide specific "wrappers" for specific drivers (eg. an Oracle wrapper, a MySQL wrapper...), and a default (configurable ?) one for any driver without a wrapper.

Regards,
 Pierre-Yves Gibello - ExperLog



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.