strange insert behavior with DriverDataSourceFactory

From: Lothar Krenzien (lkrenzie..eb.de)
Date: Thu Mar 16 2006 - 13:56:19 EST

  • Next message: Bryan Lewis: "NullPointerException in OracleAdapter"

    Hi there,

    I'm using currently to cayenne configurations. The first uses JNDI to define the database connection and works without any problems. The second used DriverDataSourceFactory for some unit tests with should not depend on a running web server. In the classes witch uses the second configuration I'm inserting some values from a xml file into a table with auto-increment enabled. On the first look it seems to be all ok and the data are inserted correctly. When I run the same class again to insert the same data with a new timestamp the auto-generated id is incremented but the previously inserted data are not available anymore . And I'm sure that I didn't deleted the data and that I use the right database connection.

    For example in the first run the following data are inserted :

    alertId / receiveDate / alertDate / errorCode / text / loggerId
     6 / 2006-03-16 19:15 / 2005-12-01 14:18 / 15 / "alarm" / 339

    In the second run the following data are inserted :
     7 / 2006-03-16 19:18 / 2005-12-01 14:18 / 15 / "alarm" / 339

    But the id 6 is deleted ! After the third run id 7 is deleted and new row with id 8 inserted. With the first configuration I don't have such a problem. In all cases auto dected database is used.

    cayenne 1.2 M11 + MSSQL 2000 + jtds + Tomcat 5.5

    Thanks, Lothar
    ______________________________________________________________
    Verschicken Sie romantische, coole und witzige Bilder per SMS!
    Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Thu Mar 16 2006 - 13:56:23 EST