博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MyBatis之Transaction
阅读量:4203 次
发布时间:2019-05-26

本文共 957 字,大约阅读时间需要 3 分钟。

MyBatis官方文档

  • ORM框架

方法说明

  • 获取数据库连接
  • 事务提交
  • 事务回滚
  • 关闭数据库连接
  • 获取事务超时时间

源码

package org.apache.ibatis.transaction;import java.sql.Connection;import java.sql.SQLException;/** * Wraps a database connection. * Handles the connection lifecycle that comprises: its creation,  * preparation, commit/rollback and close.  * @author Clinton Begin */public interface Transaction {
/** * Retrieve inner database connection * @return DataBase connection * @throws SQLException */ Connection getConnection() throws SQLException; /** * Commit inner database connection. * @throws SQLException */ void commit() throws SQLException; /** * Rollback inner database connection. * @throws SQLException */ void rollback() throws SQLException; /** * Close inner database connection. * @throws SQLException */ void close() throws SQLException; /** * Get transaction timeout if set * @throws SQLException */ Integer getTimeout() throws SQLException;}

转载地址:http://mnvli.baihongyu.com/

你可能感兴趣的文章
【一天一道LeetCode】#118. Pascal's Triangle
查看>>
【一天一道LeetCode】#119. Pascal's Triangle II
查看>>
【unix网络编程第三版】ubuntu端口占用问题
查看>>
【一天一道LeetCode】#120. Triangle
查看>>
【unix网络编程第三版】阅读笔记(三):基本套接字编程
查看>>
同步与异步的区别
查看>>
IT行业--简历模板及就业秘籍
查看>>
JNI简介及实例
查看>>
DOM4J使用教程
查看>>
JAVA实现文件树
查看>>
linux -8 Linux磁盘与文件系统的管理
查看>>
linux 9 -文件系统的压缩与打包 -dump
查看>>
PHP在变量前面加&是什么意思?
查看>>
ebay api - GetUserDisputes 函数
查看>>
ebay api GetMyMessages 函数
查看>>
wdlinux
查看>>
关于mysql升级到5.5报错问题
查看>>
magento - 通过storeid,分类id,天数(几天内)得到产品
查看>>
一个很不错的bash脚本编写教程,至少没接触过BASH的也能看懂!
查看>>
Redis和Memcache对比及选择
查看>>