WebSphere Application Server, Version 6.1   
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows, Windows Vista

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

ユーザー定義の作業域区画へのアクセス

このタスクについて

作業域区画サービスは、作業域区画マネージャー・インターフェースのインプリメンテーションにバインディングされた Java Naming and Directory Interface (JNDI) を、java:comp/websphere/WorkAreaPartitionManager という 名前で提供します。独自の区画にアクセスする必要のあるアプリケーションは、 次のコード例に示すように、その JNDI 名で検索を実行することができ、次に 作業域区画マネージャーで getWorkAreaPartition メソッドを使用できます。

import com.ibm.websphere.workarea.*;
import javax.naming.*;

public class SimpleSampleServlet {
  ...

         //Variable to hold our WorkAreaPartitionManager implementation
         WorkAreaPartitionManager partitionManager = null;
         try {
             InitialContext initialContext = new InitialContext();
             partitionManager = (WorkAreaPartitionManager) 
            initialContext.lookup("java:comp/websphere/WorkAreaPartitionManager");
         } catch (Exception e) {...}

         //Variable used to hold the retrieved WorkArea Partition
         UserWorkArea myPartition = null;
         try{
             myPartition = partitionManager.getWorkAreaPartition(partitionName);
         }catch(NoSuchPartitionException e){...}
}

次の作業

次のステップでは、begin メソッドを使用して新規の作業域を作成し、これを呼び出し元のスレッドに関連付けます。 これについては、トピック新規の作業域の開始で説明しています。



関連概念
作業域サービスの概要
作業域区画サービス
関連タスク
作業域区画の構成
関連資料
作業域区画マネージャーのインターフェース
タスク・トピック    

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

最終更新: Jan 21, 2008 5:05:53 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/workarea/tasks/twa_partitionbinding.html