Hibernate not committing between requests

Adam Young ayoung at redhat.com
Fri Mar 26 00:55:19 UTC 2010


I have a nosetest that bascially does the following

get Pool
create entitlement
get Pool
unbind entitlement


So four http calls. The create and unbind calls change the consumed 
quantity of the pool object.  I've been seeing inconsistant values for this.

   I did full SQL logging, and I've been looking for any insert or 
update statements.  Here's what I get:

[ayoung at ayoung candlepin]$ grep -i insert  /tmp/catalina.out
Hibernate: insert into cp_consumer (consumer_idcert_id, name, owner_id, 
parent_consumer_id, type_id, uuid, id) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into cp_id_cert (cert, key, serial, id) values (?, ?, 
?, ?)


[ayoung at ayoung candlepin]$ grep -i update  /tmp/catalina.out
Hibernate: update cp_consumer set consumer_idcert_id=?, name=?, 
owner_id=?, parent_consumer_id=?, type_id=?, uuid=? where id=?

No updates, no inserts.  I've  marked each of the Resource methods as 
@Transactional, and tried that on merthods inside the Entitler as well.  
No love.  Hibernate is transaction resistant.  Thi



More information about the candlepin mailing list