-->
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: hibernate transaction rollback problem
PostPosted: Thu Aug 25, 2011 5:10 pm 
Newbie

Joined: Thu Aug 25, 2011 3:16 pm
Posts: 1
Hi, my problem is with transactions.

When i do call to deleteLocationsOfUser(3) the query execute inmediatly and never I can do rollback to transaction.

The code is:

@SuppressWarnings("unchecked")
public int deleteLocationsOfUser(final Long locid){
int del = hibernateTemplate.execute(new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException, SQLException {

SQLQuery query = session.createSQLQuery("delete from LOCATION where LO_ID = :locid");

query.setLong("locid", locid);
int del = query.executeUpdate();

return del;
}

});

return del;
}


Do you know what could have being?
Thank you.
Jorge


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.