Interstage Application Server シングル・サインオン運用ガイド
|
目次
索引

|
7.1.2.2 LoginContextのインスタンス化
次に、LoginContextのインスタンス化を行います。コードを以下に示します。
LoginContext loginContext = new LoginContext("com.fujitsu.interstage.sso",
subject, myHandler); |
LoginContextを以下の引数を指定して、インスタンス化します。

JDK1.3の場合、Javaアプリケーションが複数スレッドから同時にLoginContextのインスタンス化を行った場合にjava.lang.SecurityExceptionが発生する場合があります。JDK1.4を使用するか、LoginContextのインスタンス生成処理をsynchronizedにする必要があります。以下にコード例を示します。
LoginContext loginContext = null;
synchronized (LoginContext.class) {
loginContext = new LoginContext("com.fujitsu.interstage.sso",
subject, myHandler);
} |
All Rights Reserved, Copyright(C) 富士通株式会社 2005