use hibernate.
auto commit is off, I checked the hibernate logging.
code is like this:
try{
tx.begin();
em.persist(entity);
tx.commit();
}catch(Exception ex)
{
tx.rollabck();
}
after em.persist() is executed, the data is in my database! tx.commit() seems to be useless here.
Can anyone help me with that please ?
[Message sent by forum member 'bobxu']
http://forums.java.net/jive/thread.jspa?messageID=475823