Hi,

I'm experiencing very strange behaviour with OJB rc4 HEAD.  Basically in a
multi-threaded environment when two threads retrieve the same objects within
unique transactions, the references for non-prefetched relationships are not
set.  When only one thread is retrieving the objects everything is fine.
I'm using ObjectCachePerBrokerImpl and the following code to retrieve the
objects:

...
QueryByCriteria query = new QueryByCriteria(DealRating.class);
query.addOrderByAscending("position");
Transaction tx = _odmg.newTransaction();
tx.begin();
PersistenceBroker broker = ((HasBroker) tx).getBroker();
ManageableCollection results = (ManageableCollection)
broker.getCollectionByQuery(query);
Iterator i = results.ojbIterator();
while (i.hasNext()) {
        dealDTOs.add(createDealRatingDTO((DealRating) i.next()));
}
tx.commit();
...

Is there anything obvious that I'm doing wrong? 

Regards,

Carl.


The contents of this email are confidential to the intended recipient at the email 
address to which it has been addressed.  It may not be disclosed to or used by anyone 
other than this addressee, nor may it be copied in any way. If received in error, 
please contact DLA, a UK law firm, (http://www.dla.com/) on +44 (0) 8700 111111 
quoting the name of the sender and the addressee and then delete it from your system.
 
Please note that neither DLA nor the sender accepts any responsibility for viruses and 
it is your responsibility to scan the email and attachments (if any).  No contracts 
may be concluded on behalf of DLA by means of email communications.

A list of the names of the partners of DLA (who are either solicitors or registered 
foreign lawyers) and their qualifications is available for inspection at 3 Noble 
Street, London, EC2V 7EE, UK.

Regulated by the Law Society.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to