Cosminexus V9 アプリケーションサーバ 機能解説 基本・開発編(コンテナ共通機能)

[目次][用語][索引][前へ][次へ]

4.10 Message-driven Bean(サービス)の実装

TP1インバウンドアダプタを利用したMessage-driven Bean(サービス)の実装手順を次に示します。

  1. Message-driven Bean(サービス)の実装の準備
    TP1インバウンドアダプタを開始します。
  2. Message-driven Bean(サービス)の作成
    TP1インバウンドアダプタから呼び出すMessage-driven Bean(サービス)を作成します。
    次の作業を実施してください。
    • クラスパスの設定
    • リスナインタフェースの実装
    • onMessageメソッドでの業務ロジックの実装
    • ejb-jar.xmlの定義
    • cosminexus.xmlの定義
  3. Message-driven Bean(サービス)の開始
    Message-driven Bean(サービス)を含むJ2EEアプリケーションを開始します。
    参考
    アプリケーションサーバでは,TP1インバウンドアダプタから呼び出すMessage-driven Bean(サービス)のサンプルプログラムを提供しています。サンプルプログラムは,次に示すディレクトリに格納されています。
    • Windowsの場合
      <Application Serverのインストールディレクトリ>\CC\examples\tp1inbound
    • UNIXの場合
      /opt/Cosminexus/CC/examples/tp1inbound
     
<この節の構成>
4.10.1 Message-driven Bean(サービス)の実装の準備
4.10.2 クラスパスの設定
4.10.3 リスナインタフェースの実装
4.10.4 onMessageメソッドでの業務ロジックの実装
4.10.5 ejb-jar.xmlの定義
4.10.6 cosminexus.xmlの定義
4.10.7 Message-driven Bean(サービス)の開始