You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by osamuo <os...@yahoo.co.jp> on 2008/01/21 03:52:34 UTC
T5 : tapestry-hibernate : rollback when exception was thrown
I am using the tapestry-hibernate and 'hibernate.connection.autocommit' in
hibernate.cfg.xml is set to false.
After throwing a exception, transaction was committed.
So I called HibernateSessionManager#abort(), but the transaction was still
committed.
Please tell me how to rollback the current transaction when a exception was
thrown!!!
--------------------------------
@Inject
Session session;
public Object onSubmit(){
User user = new User();
user.setName( "tapestry" );
session.save( user );
throw new RuntimException() // for test
}
-----------------------------------------
Osamuo
--
View this message in context: http://www.nabble.com/T5-%3A-tapestry-hibernate-%3A-rollback-when-exception-was-thrown-tp14990335p14990335.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 : tapestry-hibernate : rollback when exception was thrown
Posted by Foror <fo...@mail.ru>.
Try session.connection().commit();
o> Please tell me how to rollback the current transaction when a exception was
o> thrown!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org