| EJB 参照名の定義に WebSphere バインディングを使用する |
|
WebLogic 固有のデプロイメント記述子である weblogic.xml や weblogic-ejb-jar.xml には、 EJB 参照が含まれることがあります。 これらの参照は、EJB 参照をその JNDI 名にマップします (下記の例を参照してください)。参照が WebSphere traditional および Liberty 上で正常に動作するためには、情報を WebSphere Application Server の バインディング・ファイルに移動する必要があります。 この規則により、weblogic.xml および weblogic-ejb-jar.xml にある EJB 参照にフラグを立てます。 このルールの自動修正は、 配置記述子で定義されている EJB 参照情報 WebLogic-specific 配備記述子 で定義された EJB 参照情報を取得し、標準のデプロイメント記述子と WebSphere Application Server バインディング・ ファイルに移行します。 例えば、EJB MyBean を参照する WebLogic Web モジュールについて考慮してみましょう。 参照は、以下の weblogic.xml 例で定義されています。weblogic.xml の構造 < Weblogic-Web アプリケーション> < span class="indent"> < /span> < span class="indent"> < /span> < reference-descriptor> < span class="indent"> < /span> < span class="indent"> < /span> < span class="indent"> < /span> < span class="indent"> < /span> < ejb-reference-description> <ejb-ref-name>MyBean</ejb-ref-name> <jndi-name>EJB/MyBean</jndi-name> </ejb-reference-description> </reference-descriptor> </weblogic-web-app> JNDI 名がバインディング・ファイルに追加されます。 これは web.xml で定義されている既存の参照を参照します。 同様に、EJB 参照が EJB プロジェクト内に見つかると、 情報は weblogic-ejb-jar.xml ファイルから EJB バインディング・ファイルに移動します。 以下の例は weblogic-ejb-jar.xml 内の MyBean を参照する MyBean2 を示します。 |