This one time, at band camp, Thomas Phan said:

TP>  public Object findByPrimaryKey(Class type, Object identity) throws
TP>Exception {
TP>    Database db = null;
TP>    try {
TP>      db = jdo.getDatabase();
TP>      return db.load(type, identity, Database.ReadOnly);
TP>    }
TP>    catch (org.exolab.castor.jdo.ObjectNotFoundException onfe) { return
TP>null; }
TP>catch (Exception e) { e.printStackTrace(); return null; }
TP>    finally {
TP>      try { if (db != null) db.close(); }
TP>      catch (PersistenceException pe) {}
TP>    }
TP>  }
TP>
TP>  public void update(Object data) throws Exception {
TP>    Database db = null;
TP>    try {
TP>      db = jdo.getDatabase();
TP>      db.update(data);
TP>    }
TP>catch (Exception e) { e.printStackTrace(); }
TP>    finally {
TP>      try{ if (db != null) db.close(); }
TP>      catch (PersistenceException pe) {}
TP>    }
TP>  }

Thomas,

You should be using Castor's long transactions with your scenario.
This means that objects should implement the Timestampable interface.
Please see:

    http://www.castor.org/long-transact.html

I'm not sure if this is the problem, but it's a place to start
looking.

Bruce
--

perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

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

Reply via email to