Re: CCM - Transactions. Please Help!!
Vadim Nasardinov <[email protected]> Thu, 13 May 2004 17:49:28 -0400
| Newsgroups | gmane.linux.redhat.ccm.general |
|---|---|
| Organization | Red Hat / Westford |
| Message-ID | <[email protected]> |
On Thursday 13 May 2004 12:54, srini wrote: > 1. I created a domain object (oldDomainObject) in a transaction > 2. The corresponding details get stored in the DB > 3. Then I did a explicit, oldDomainObject.disconnect() so that I > can use this object across transactions (AS A READ ONLY OBJECT) > 4. In another transaction, using this read only object's ID I tried > to retrieve the object from the database. And I always get > a DataObjectNotFoundException > newDomainObject = new > MyDomainObject(oldDomainObject.getID()); --> throws > DataObjectNotFoundException The simplest possible explanation is that your domain object has not been saved to the database. The first thing I would do is triple-check that there exists a row in the databased whose primary key value is equal to that returned by oldDomainObject.getID(). -- Redhat-ccm-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/redhat-ccm-list Archives: https://www.redhat.com/pipermail/redhat-ccm-list/