RE: CCM - Transactions. Please Help!!

"srini" <[email protected]> Fri, 14 May 2004 09:35:13 -0500
Newsgroups gmane.linux.redhat.ccm.general
Message-ID <000001c439c0$ae4ecb40$6b1ea8c0@admin7jz2nzgs0>
I do an explicit save before doing a disconnect and when I check
the database, there is a row ' whose primary
key value is equal to that returned by oldDomainObject.getID()' 

The other transaction is opened from within a Thread. Would
that make any difference?

-- Srinivas

-----Original Message-----
From: Vadim Nasardinov [mailto:[email protected]] 
Sent: Thursday, May 13, 2004 4:49 PM
To: srini; [email protected]
Subject: Re: [redhat-ccm-list] CCM - Transactions. Please Help!!

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/