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

📄 localtransaction.java

📁 在ArcGIS中应用EJB的实例
💻 JAVA
字号:
package com.esri.arcgis.samples.ejb;

/**
 * The LocalTransaction implementation. The LocalTransaction
 * class defines a management contract. A LocalTransaction means that the transaction
 * is local to the resource manager. No external transaction managers are involved.
 */


public class LocalTransaction implements javax.resource.spi.LocalTransaction {
  
  /**
   * Constructs an instance of the LocalTransaction object.
   */
    
  public LocalTransaction() {
  }
  
  /**
   * The application server calls the begin method to explicitly start a local transaction.
   * @throws javax.resource.ResourceException
   */

  public void begin() throws javax.resource.ResourceException {
      System.out.println("Local Transaction Begin");
  }
  
  /**
   * When the work of the transaction completes the application server commits the transactional changes made to the EIS.
   * Both the commit and rollback methods end the current transaction.
   * @throws javax.resource.ResourceException
   */

  public void commit() throws javax.resource.ResourceException {
      System.out.println("Local Transaction Commited");
  }
  
  /**
   * The rollback method rolls back the EIS to the state it was in prior to the start of the transaction.
   * Both the commit and rollback methods end the current transaction.
   * @throws javax.resource.ResourceException
   */

  public void rollback() throws javax.resource.ResourceException {
      System.out.println("Local Transaction Rolled back");
  }

}

⌨️ 快捷键说明

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