When managing transactions, you can call begin, commit, and rollback methods on a Hibernate object.
当管理事务的时候,您可以在Hibernate对象上调用开始、提交以及回滚方法。
In this technique, you would set the autoCommit property on the connection object to false and manually commit or roll back the connection. Listing 2 illustrates this technique.
在此技巧中,您将Connection对象上的autocommit属性设置为false,并手动提交或回滚连接。
In this case, you must invoke the commit method on the Connection object if all is well; otherwise, invoke the rollback method if an exception occurs.
在本例中,如果一切正常,您必须调用Connection对象上的commit方法;否则,如果出现异常,则调用rollback方法。
This setup allows the application to more easily commit or rollback any changes to an object graph.
这种设置允许应用程序更加容易地提交或回滚对对象图的任何更改。
Provides functionality to commit or rollback changes to an object that is used as a data source.
提供提交或回滚对用作数据源的对象所做更改的功能。
Provides functionality to commit or rollback changes to an object that is used as a data source.
提供提交或回滚对用作数据源的对象所做更改的功能。
应用推荐