0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GlassFish(v4.1.1) 設定

Last updated at Posted at 2016-02-14

1 Oracle JDBC 設定

  • jar 配置

    GlassFish のインストール先にある「glassfish\lib」ディレクトリへコピー

- GlassFish起動
起動が完了したら管理コンソールにログイン
- JDBCコネクションプール作成
--1 [Resources > JDBC > JDBC Connection Pools]を選択
--2 「New...」ボタンをクリックして新しくコネクションプールを作成
--3 以下を入力して「Next」ボタンをクリック
   [Pool Name]:任意
   [Resource Type]:javax.sql.DataSource
   [Database Driver Vendor]:Oracle
--4 以下を入力して「Finish」ボタンをクリック
   [Datasource Classname]:oracle.jdbc.pool.OracleDataSource
   [User]:接続ユーザ
   [Password]:接続パスワード
   [URL]:jdbc:oracle:thin:@ホスト名:ポート:SID
※2でInternal Server Error 発生の可能性あり
 その場合、以下コマンド実施
``` asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --restype javax.sql.DataSource --property user=接続ユーザ:password=接続パスワード:url="jdbc\:oracle\:thin\:@ホスト名\:ポート\:SID" プール名 ```
- JDBCコネクションプール作成
--1 [Resources > JDBC > JDBC Resources]を選択
--2 「New...」ボタンをクリックして新しくJDBCリソースを作成
--3 以下を入力して「OK」ボタンをクリック
   [JNDI Name]:任意
   [Pool Name]:プール名
※コネクションプール作成でエラーの場合、以下コマンド実施
``` asadmin create-jdbc-resource --connectionpoolid プール名 任意 ```

2 認証認可の設定

  • レルム作成

    --1 [Configurations > server-config > Security > Realms]を選択
    --2 「New...」ボタンをクリックして新しくレルムを作成

    --3 以下を入力して「OK」ボタンをクリック

       [Name]:任意

       [Class Name]:com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm

       [JAAS Context]:jdbcRealm

       [JNDI]:JNDI名

       [UserTable]:Userテーブル名

       [User Name Column]:User Id カラム名

       [Password]:Password カラム名

       [Group Table]:Groupテーブル名

       [Group Table User Name Column]:Group User Id カラム名

       [Group Name Column]:Group カラム名

       [Password Encryption Algorithm]:digest-algorithm

       [Digest Algorithm]:SHA-256

       [Encoding]:Hex
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?