Hello:

I am trying to figure out something:

Does the timestamp need to be placed in the database for objects
involved in long transactions?

I wrote some test code that attempts to use a long transaction:
    // Get the database
    Database db = jdo.getDatabase();
    // Start a transaction
    db.begin();
    // Allocate a parameters objects
    persistent.Parameters parameters = new persistent.Parameters();
    db.create(parameters);
    db.commit();

    // Update the parameters object
    Database db = jdo.getDatabase();
    db.begin(); 
    parameters.setChargePPV(true);
    db.update(parameters); 
    db.commit(); 
    db.close();
This code always throws a ModifiedException.

Here is my mapping file:
  <class name="persistent.Parameters"
         identity="id"
         access="shared"
         key-generator="MAX"
         auto-complete="false">
    <map-to table="Parameters" />
    <cache-type type="count-limited" />

    <field name="chargePPV"
           type="boolean"
           get-method="getChargePPV"
           set-method="setChargePPV">
      <sql name="chargePPV"
           type="bit" />
    </field>

    <field name="id"
           type="integer"
           get-method="getId"
           set-method="setId">
      <sql name="id"
           type="integer" />
    </field>

  </class>      

Thanks,
        Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.    (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development    Websites, Ecommerce, Java, databases

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to