-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Missing records
PostPosted: Mon May 02, 2005 11:46 am 
Beginner
Beginner

Joined: Tue Feb 08, 2005 1:29 pm
Posts: 20
Hi,

Configuration: Hibernate 2 / My SQL 4.1 and JBOSS 2.3.6. I am using the hibernate.cfg.xml and hibernate.properties file instead of the hibernate-service and jboss-service... ISSUE?

Otherwise, I playing with multi-threading and I am encountering the fact that I am missing records when processing the second thread. Here is the details:
The following line is where the code stops:
OfferBookMarketOverview offerBookMarketOverview;
try {
offerBookMarketOverview = (OfferBookMarketOverview) t.session.get(
OfferBookMarketOverview.class, productId, LockMode.UPGRADE);
} catch (HibernateException ex) {
throw new BaseException(ErrorIds.DB_TECHNICAL_ERROR, ex);
}

Later, the first thread inserts a record in my Offer table... then the second tread takes over with the following line:
try {
offers = t.session.createCriteria(Offer.class).add(
Expression.eq("productId", productId)).add(
Expression.eq("side", side)).list();
} catch (HibernateException ex) {
throw new BaseException(ErrorIds.DB_TECHNICAL_ERROR, ex);
}
Here, the newly entered offer is missing...

WHY? I tried to change caching from Eh to Hashtable, etc.... but still the same thing.

Thanks for your help...
David.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.