⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transactiondao.java

📁 精通EJB3源码
💻 JAVA
字号:
package com.foshanshop.ejb3;

import com.foshanshop.ejb3.bean.Product;

public interface TransactionDAO {
	/**
	 * 产生系统异常
	 */
    public void systemException();
	/**
	 * 产生应用异常
	 */
    public void AppException() throws AppException ; 
    /**
     * 手工设置事务回滚
     */
    public void setRollback();
    /**
     * 一个事务属性为REQUIRED的方法在一个事务范围外执行
     * @param product
     */
    public void requried_notInTransaction();
    /**
     * 一个事务属性为REQUIRED的方法在一个事务范围内执行
     * @param product
     */
    public void requried_inTransaction();
    /**
     * 一个事务属性为NOT_SUPPORTED的方法在一个事务范围内执行
     * @param product
     * @return
     */
    public Product notSupported_runInTransaction(Product product);
    /**
     * 一个事务属性为MANDATORY的方法在一个事务范围内执行
     */
    public void mandatory_inTransaction();
    /**
     * 一个事务属性为MANDATORY的方法在一个事务范围外执行
     */
    public void mandatory_notInTransaction();
    /**
     * 一个事务属性为REQUIRES_NEW的方法在一个事务范围内执行
     */
    public void requirednew_inTransaction();
    /**
     * 一个事务属性为REQUIRES_NEW的方法在一个事务范围外执行
     */
    public void requirednew_notInTransaction();
    /**
     * 一个事务属性为SUPPORTS的方法在一个事务范围内执行
     */ 
    public Product support_inTransaction();
    /**
     * 一个事务属性为SUPPORTS的方法在一个事务范围外执行
     */
    public Product support_notInTransaction();
    
    /**
     * 一个事务属性为NEVER的方法在一个事务范围内执行
     */ 
    public Product never_inTransaction(int productid);
    /**
     * 一个事务属性为NEVER的方法在一个事务范围外执行
     */
    public Product never_notInTransaction(int productid);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -