All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.sylinx.hbatis.ext.transaction.Transactional Maven / Gradle / Ivy

There is a newer version: 2.0.0.RELEASE
Show newest version
package cn.sylinx.hbatis.ext.transaction;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * hbatis 事务注解(guice支持)
 * 
 * @author han
 *
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Transactional {

	/**
	 * 数据源
	 * 
	 * @return
	 */
	String datasource() default "";

	/**
	 * 
	 * 事务隔离级别,默认使用全局定义事务类型
	 * -1:表示使用全局定义的事务类型,否则取值以下其一:
	 * Connection.TRANSACTION_NONE
	 * Connection.TRANSACTION_READ_UNCOMMITTED
	 * Connection.TRANSACTION_READ_COMMITTED
	 * Connection.TRANSACTION_REPEATABLE_READ
	 * Connection.TRANSACTION_SERIALIZABLE
	 * 
* * @return */ int transactionIsolation() default -1; /** * 是否动态数据源,是则取:DynamicDatasourceProvider.create.getDatasource() * * @return */ boolean dynamic() default false; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy