EJB 非同期メソッドを呼び出すクライアント・コードの開発

このトピックにあるサンプル・コードを使用して、EJB 非同期メソッドを呼び出すクライアント・コードを開発することができます。

始める前に

このタスクは、以下に示すインターフェース実装クラスと Bean 実装クラスが存在するという前提に基づいています。
public interface AcmeRemoteInterface {
   void fireAndForgetMethod ();
   Future<Integer> methodWithResults() throws AcmeException1, AcmeException2;
}
@Stateless
@Remote(AcmeRemoteInterface.class)
@Asynchronous
public class AcmeAsyncBean {
   public void fireAndForgetMethod () {
      // do non-critical work
   }

   public Integer methodWithResults() {
      Integer result;
      // do work, and then return results
      return result;
   }
}

このタスクについて

手順


トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tejb_clientcode
ファイル名:tejb_clientcode.html