ページの先頭行へ戻る
Interstage Application Server/Interstage Web Server J2EE ユーザーズガイド

5.2.4 J2EEアプリケーションクライアントの設定

ユーザ認証の設定

J2EEアプリケーションクライアントでユーザ認証を行うには、JNDI環境プロパティに次の設定が必要です。

FJUserIDとFJPasswordは、次のいずれかの方法で設定してください。
なお、環境プロパティが重複して指定された場合は、以下の順で上書きされます(“3”で指定された環境プロパティが最も優先されます)。

  1. FJjndi.propertiesファイル

  2. new javax.naming.InitialContext(Hashtable environment)の引数environment

  3. アプリケーション起動時のコマンドラインでの引数(-D)

JNDI環境プロパティの設定例を次に示します。

  • FJjndi.propertiesファイルによる設定

    FJUserID=user01
    FJPassword=pass01
    com.fujitsu.interstage.j2ee.DeploymentDescriptorClient=/export/home/j2eeapl/application-client.xml

  • new InitialContextの引数による設定

    ・・・
    Context ctx = null;
    try {
      Hashtable env = new Hashtable (5);
      env.put ("java.naming.factory.initial",
        "com.fujitsu.interstage.j2ee.jndi.InitialContextFactoryForClient");
      env.put ("FJUserID", "user01");
      env.put ("FJPassword", "pass01");
      env.put ("com.fujitsu.interstage.j2ee.DeploymentDescriptorClient",
        "/export/home/j2eeapl/application-client.xml");
      ctx = new InitialContext(env);
    }
    catch (NamingException ne) {
      ne.printStackTrace();
    }
    ・・・

  • アプリケーション起動時の引数による設定

    java -Djava.naming.factory.initial=com.fujitsu.interstage.j2ee.jndi.InitialContextFactoryForClient -Dcom.fujitsu.interstage.j2ee.DeploymentDescriptorClient=/export/home/j2eeapl/application-client.xml -DFJUserID=user01 -DFJPassword=pass01 ClientAPP


リソース接続者管理機能の設定

リソース接続者管理機能の設定については、“5.1.5 リソース接続者管理機能”を参照してください。