public int deleteAll(final String id){
int re=0;
try{
Object i=this.getHibernateTemplate().execute(
new HibernateCallback() {
public Object doInHibernate(Session session)
throws HibernateException, SQLException {
int i=session.createQuery("update A set state='已删除' where id='"+id+"'").executeUpdate();
int j=session.createQuery("update B set state='已删除' where id='"+id+"'").executeUpdate();
int k=session.createQuery("update C set state='已删除' where id='"+id+"'").executeUpdate();
return null;
}
}
);
}catch(Exception e){
re=0;
}
return re;
}
如上程序,,,如何把里面的三个update语句处在同一事务中 ???
急............