WebSphere Application Server Network Deployment for i5/OS, Version 6.1   
             オペレーティング・システム: i5/OS

             目次と検索結果のパーソナライズ化

アクティブな作業域の名前の取得

このタスクについて

アプリケーションは UserWorkArea インターフェースの getName メソッドを使用して、 現行の作業域の名前を取得します。 スレッドが作業域と関連付けられていない場合は、getName メソッドはヌルを戻します。 スレッドが作業域と関連付けられているかどうかを判別するには、この方法をお勧めします 次のコード例では、作業域の名前は、その作業域が開始されたクラスの名前に対応しています。

public class SimpleSampleBeanImpl implements SessionBean {

    ...

    public String [] test() {
       // Get the work-area reference from JNDI.
       ...

       // Retrieve the name of the work area. In this example,
       // the name is used to identify the class in which the
       // work area was begun.
       String invoker = userWorkArea.getName();
       ...
   }
}

次の作業

作業域について詳しくは、API 文書の『com.ibm.websphere.workarea パッケージ』を参照してください。生成済み API 文書は、インフォメーション・センターの目次で、 「参照」 > 「Developer」 > 「API documentation」 > 「Application programming interfaces」の順にたどって入手できます。




関連タスク
作業域プロパティーのオーバーライド
作業域のプロパティーの取得
作業域プロパティーのモードの照会
作業域プロパティーの削除
関連資料
retrieveAllKeys メソッド
タスク・トピック    

ご利用条件 | フィードバック

最終更新: Jan 21, 2008 8:28:52 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.iseries.doc/info/iseriesnd/workarea/tasks/twa_getname.html