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

📄 swapbean.java

📁 RESIN 3.2 最新源码
💻 JAVA
字号:
package example;import javax.ejb.Stateless;import javax.ejb.TransactionAttribute;import static javax.ejb.TransactionAttributeType.REQUIRED;import static javax.ejb.TransactionAttributeType.SUPPORTS;/** * Implementation of the Swap bean. */@Stateless(name="swap")public class SwapBean implements Swap {  /**   * Swaps the teacher inside a transaction.   */  @TransactionAttribute(REQUIRED)  public void swap(Course a, Course b)  {    String teacher = a.getTeacher();    a.setTeacher(b.getTeacher());    b.setTeacher(teacher);  }    /**   * Returns the teacher.   */  @TransactionAttribute(SUPPORTS)  public String getTeacher(Course a)  {    return a.getTeacher();  }}

⌨️ 快捷键说明

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