Enterprise Bean定義ファイルについて
Enterprise Bean定義ファイルはXML形式で記述します。
Enterprise Bean定義ファイルは、以下の上位タグと、それぞれの上位タグの配下にある下位タグで構成されています。
下位タグについては、それぞれの上位タグの表を参照してください。
<ejbdef> <ejb-jar> <!--ejb-jarタグの下位タグ--> </ejb-jar> <fujitsu-bean-definition> <!--fujitsu-bean-definitionタグの下位タグ--> </fujitsu-bean-definition> <fujitsu-cmp-definition(またはfujitsu-cmp2x-mapping-definition)> <!--fujitsu-cmp-definitionタグ(またはfujitsu-cmp2x-mapping-definitionタグ)の下位タグ--> </fujitsu-cmp-definition(または/fujitsu-cmp2x-mapping-definition)> </ejbdef>
注意
fujitsu-cmp-definitionタグとfujitsu-cmp2x-mapping-definitionタグは、同時に定義できません。
EJB2.1に準拠したEJBアプリケーションの場合には、ejb-jarタグ配下の定義の移出入ができません。配備前に、開発環境においてejb-jar.xmlファイルを編集してください。
タグの構成と内容
表の見方
タグ名:定義ファイルの中のXMLタグ名
値:定義ファイル内のXMLの値
意味:タグの意味(Interstage管理コンソールで表示される項目は、Interstage管理コンソールでの項目名です。)
編集:値の編集可否(○:編集可能 ×:編集不可能)
Interstage管理コンソール画面との対応:Interstage管理コンソール画面との対応
?付きのタグは省略できます。
+付きのタグは繰り返し指定できるタグです。
編集可能な項目は、値を選択するものについては、指定された値が選択肢に存在するかチェックします。数値型の場合は、値の型と、範囲のチェックを行います。
編集可能な項目で、Enterprise Beanの定義情報に項目が存在する場合は、Enterprise Beanの定義ファイルの値に編集されます。
編集可能な項目で、Enterprise Beanの定義情報に項目が存在しない場合は、Enterprise Beanの定義情報に項目が追加されます。
編集できない項目は、定義ファイルの値とEnterprise Beanの定義情報の値を比較し、異なっていた場合はエラーとなります。
注意
Interstage管理コンソールで“<”、“>”、“&”を入力した場合、exportで出力した定義ファイルには、それぞれ“<”、“>”、“&”と表示されます。
また定義ファイル内に、“<”、“>”、“&”を入力して、importすると以下のエラーが表示されます。定義ファイル内では、“<”、“>”、“&”は、それぞれ“<”、“>”、“&”と記述してください。
定義ファイル(ファイル名)の読込み中にエラーが発生しました。 不明なマークアップがあります。 file:///(XX) : 行 XX, 桁 XX で上記エラーを検出しました。 EJB3504S-20-093-0203
Enterprise Bean定義情報をexportした場合、Enterprise Bean定義ファイルの“password”には、パスワードの文字数分“*”が出力されます。この値を変更しないでimportした場合、そのままの文字列がEnterprise Bean定義情報に反映されるので注意してください。
ejb-jarタグの構成と内容
ejb-jarタグはEJB2.0規約以前に準拠したEJBアプリケーションのみ有効となります。EJB2.0規約のEJBアプリケーションを使用する場合のタグについて以下に説明します。
タグ名 | 意味 | ||
---|---|---|---|
ejb-jar? |
| ||
| enterprise-beans |
| |
| Session Beanに関する定義 | ||
Entity Beanに関する定義 | |||
Message-driven Beanに関する定義 | |||
CMRマッピングに関する定義 | |||
セキュリティやトランザクションに関する定義 |
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | ||
---|---|---|---|---|---|---|
ejb-name? | 任意の文字列 | Enterprise Bean名 | × | EJBアプリケーション情報 | ||
home? | 任意の文字列 | Homeインタフェース名 | × | |||
remote? | 任意の文字列 | Remoteインタフェース名 | × | |||
local-home? | 任意の文字列 | LocalHomeインタフェース名 | × | |||
local? | 任意の文字列 | Localインタフェース名 | × | |||
ejb-class? | 任意の文字列 | Enterprise Beanクラス名 | × | |||
session-type? | 以下の値から選択
| セション種別 | × | |||
transaction-type? | 以下の値から選択
| トランザクション管理種別 | ○ | |||
env-entry+ |
|
|
| 環境プロパティ | ||
| description? | 任意の文字列 | 説明 | × | ||
env-entry-name | 任意の文字列 | プロパティ名 | × | |||
env-entry-type | 以下の値から選択
| 型 | ○ | |||
env-entry-value? | 以下の範囲の値
| 値 | ○ | |||
ejb-ref+ |
|
|
| 参照EJB | ||
| description? | 任意の文字列 | 説明 | × | ||
ejb-ref-name | 任意の文字列 | Enterprise BeanのJNDI名 | × | |||
ejb-ref-type | 以下の値から選択
| Enterprise Bean種別 | × | |||
home | 任意の文字列 | Homeインタフェース名 | × | |||
remote | 任意の文字列 | Remoteインタフェース名 | × | |||
ejb-link? | 任意の文字列 | Enterprise Bean名 | × | |||
ejb-local-ref+ |
|
|
| 参照LocalEJB | ||
| description? | 任意の文字列 | 説明 | × | ||
ejb-ref-name | 任意の文字列 | Enterprise BeanのJNDI名 | × | |||
ejb-ref-type | 以下の値から選択
| Enterprise Bean種別 | × | |||
local-home | 任意の文字列 | LocalHomeインタフェース名 | × | |||
local | 任意の文字列 | Localインタフェース名 | × | |||
ejb-link? | 任意の文字列 | Enterprise Bean名 | × | |||
security-role-ref+ |
|
|
| 参照セキュリティロール | ||
| description? | 任意の文字列 | 説明 | × | ||
role-name | 任意の文字列 | コード化セキュリティロール名 | × | |||
role-link? | 任意の文字列 | セキュリティロール名 | × | |||
security-identity? (注1) |
|
|
| セキュリティアイデンティティ | ||
| description? (注1) | 任意の文字列 | 説明 | × | ||
use-caller-identity | なし(run-asとは排他指定) | 呼出し側のセキュリティを使用 | ○ | |||
run-as |
|
|
| |||
| description? | 任意の文字列 | 説明 | ○ | ||
role-name | 任意の文字列 | セキュリティロール名 | ○ | |||
resource-ref+ |
|
|
| 参照リソース | ||
| description? | 任意の文字列 | 説明 | × | ||
res-ref-name | 任意の文字列 | リソースマネージャー名 | × | |||
res-type | 任意の文字列 | クラス/インタフェース名 | × | |||
res-auth | 以下の値から選択
| リソース接続者 | × | |||
resource-env-ref+ |
|
|
| 参照環境リソース | ||
| description? | 任意の文字列 | 説明 | × | ||
resource-env-ref-name | 任意の文字列 | リソースマネージャー名 | × | |||
resource-env-ref-type | 任意の文字列 | クラス/インタフェース名 | × |
注1) run-asが指定された場合のみ有効です。
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |||
---|---|---|---|---|---|---|---|
ejb-name? | 任意の文字列 | Enterprise Bean名 | × | EJBアプリケーション情報 | |||
home? | 任意の文字列 | Homeインタフェース名 | × | ||||
remote? | 任意の文字列 | Remoteインタフェース名 | × | ||||
local-home? | 任意の文字列 | LocalHomeインタフェース名 | × | ||||
local? | 任意の文字列 | Localインタフェース名 | × | ||||
ejb-class? | 任意の文字列 | Enterprise Beanクラス名 | × | ||||
persistence-type? | 以下の値から選択
| Persistenceタイプ | × | ||||
prim-key-class? | 任意の文字列 | PrimaryKeyクラス名 | × | ||||
reentrant? | 以下の値から選択
| リエントラント種別 | × | ||||
cmp-version? | 以下の値から選択
| CMPバージョン | ○ | ||||
abstract-schema-name? | 任意の文字列 | 抽象スキーマ名 | ○ | ||||
primkey-field? | 任意の文字列 | PrimaryKeyフィールド名 | × | ||||
env-entry+ | sessionタグのenv-entryを参照 | ||||||
ejb-ref+ | sessionタグのejb-refを参照 | ||||||
ejb-local-ref+ | sessionタグのejb-local-refを参照 | ||||||
security-role-ref+ | sessionタグのsecurity-role-refを参照 | ||||||
security-identity? | sessionタグのsecurity-identityを参照 | ||||||
resource-ref+ | sessionタグのresource-refを参照 | ||||||
resource-env-ref+ | sessionタグのresource-env-refを参照 | ||||||
query+ |
|
|
| クエリ定義 | |||
| description? | 任意の文字列 | 説明 | × | |||
query-method |
|
|
| ||||
| method-name | 任意の文字列 | メソッド名 | × | |||
method-params |
|
|
| ||||
| method-param+ | 任意の文字列 | パラメタ | × | |||
result-type-mapping? | 以下の値から選択
| 結果タイプ | × | ||||
ejb-ql | 任意の文字列 | EJB QL | × |
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |
---|---|---|---|---|---|
ejb-name? | 任意の文字列 | Enterprise Bean名 | × | EJBアプリケーション情報 | |
ejb-class? | 任意の文字列 | Enterprise Beanクラス名 | × | ||
transaction-type? | 以下の値から選択
| トランザクション管理種別 | ○ | ||
message-selector? | 任意の文字列 | メッセージセレクタ | ○ | ||
message-driven-destination? |
|
|
| ||
| destination-type | 以下の値から選択
| Destinationタイプ | ○ | |
subscription-durability? | 以下の値から選択
| サブスクライバの永続性 | ○ | ||
env-entry+ | sessionタグのenv-entryを参照 | ||||
ejb-ref+ | sessionタグのejb-refを参照 | ||||
ejb-local-ref+ | sessionタグのejb-local-refを参照 | ||||
security-identity? | sessionタグのsecurity-identityを参照 | ||||
resource-ref+ | sessionタグのresource-refを参照 | ||||
resource-env-ref+ | sessionタグのresource-env-refを参照 |
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |||
---|---|---|---|---|---|---|---|
description? | 任意の文字列 | 説明 | × | CMRマッピング定義 | |||
ejb-relation+ |
|
|
| ||||
| description? | 任意の文字列 | 説明 | × | |||
ejb-relation-name? | 任意の文字列 | EJBリレーション名 | × | ||||
ejb-relationship-role |
|
|
| ||||
| description? | 任意の文字列 | 説明 | × | |||
ejb-relationship-role-name? | 任意の文字列 | EJBリレーションロール名 | × | ||||
multiplicity | 以下の値から選択
| 多重度 | × | ||||
cascade-delete? | なし | レコード削除 | × | ||||
relationship-role-source |
|
|
| ||||
| description? | 任意の文字列 | 説明 | × | |||
ejb-name | 任意の文字列 | Enterprise Bean名 | × | ||||
cmr-field? |
|
|
| ||||
| description? | 任意の文字列 | 説明 | × | |||
cmr-field-name | 任意の文字列 | CMRフィールド名 | × | ||||
cmr-field-type? | 任意の文字列 | 型 | × | ||||
ejb-relationship-role | 上記参照 |
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |||
---|---|---|---|---|---|---|---|
security-role+ |
|
|
| セキュリティロール | |||
| description? | 任意の文字列 | 説明 | × | |||
role-name | 任意の文字列 | セキュリティロール名 | × | ||||
method-permission+ |
|
|
| メソッドパーミッション | |||
| role-name+ | 任意の文字列 | セキュリティロール名 | ○ | |||
unchecked | - | メソッドパーミッションのチェック可否 | ○ | ||||
method+ |
|
|
| ||||
| description? | 任意の文字列 | 説明 | × | |||
ejb-name | 任意の文字列 | Enterprise Bean名 | × | ||||
method-intf? | 以下の値から選択
| インタフェース種別 | × | ||||
method-name | 任意の文字列 | メソッド名 | × | ||||
method-params? |
|
|
| ||||
| method-param+ | 任意の文字列 | メソッドパラメタリスト | × | |||
container-transaction+ |
|
|
| トランザクション | |||
| method+ |
|
|
| |||
| description? | 任意の文字列 | 説明 | × | |||
ejb-name | 任意の文字列 | Enterprise Bean名 | × | ||||
method-intf? | 以下の値から選択
| インタフェース種別 | × | ||||
method-name | 任意の文字列 | メソッド名 | × | ||||
method-params? |
|
|
| ||||
| method-param+ | 任意の文字列 | メソッドパラメタリスト | × | |||
trans-attribute | 以下の値から選択
| トランザクション属性 | ○ |
fujitsu-bean-definitionタグの構成と内容
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |||
---|---|---|---|---|---|---|---|
fujitsu-bean-definition? |
|
|
|
| |||
| description? | 任意の文字列 | メモ | ○ | Interstage拡張情報 | ||
version-entry? (注1) |
|
|
| ||||
| deploy-ejb-version? | 以下の値固定
| 準拠EJB規約バージョン | × | |||
deploy-java-version? | 以下の値から選択
| Deploy時の使用JDKバージョン | × | ||||
base? |
|
|
|
| |||
| jndi-name? (注2) | 任意の文字列 | Enterprise BeanのJNDI名 | × | EJBアプリケーション名 | ||
tran-timeout? | 以下の範囲の値
デフォルト値は0です。 | トランザクションタイムアウト値 | ○ | - | |||
tran-kind? (注1) | 以下の値から選択
| 分散トランザクション | ○ | ||||
local-mode? | 以下の値から選択
| ローカル呼出しを使用 | ○ | Interstage拡張情報 | |||
redirect? (注1) |
|
|
| - | |||
| redirect-mode? | 以下の値から選択
| 標準出力、標準エラー出力取得モード | ○ | |||
redirect-path? | 任意の文字列 | 標準出力、標準エラー出力ファイル | ○ | ||||
trace? (注1) |
|
|
| - | |||
| trace-mode? | 以下の値から選択
| トレースの取得モード | × | |||
trace-level? | 以下の範囲の値
| トレースの取得レベル | × | ||||
trace-buffer? | 0以上 | トレースの最大取得レコード数 | × | ||||
trace-path? | 任意の文字列 | トレースファイルを出力するディレクトリ名 | × | ||||
impl? |
|
|
| EJBアプリケーション情報 | |||
| impl-home-intfrep? | 任意の文字列 | HomeインタフェースリポジトリID | × | |||
impl-remote-intfrep? | 任意の文字列 | RemoteインタフェースリポジトリID | × | ||||
session-eb? (注2) |
|
|
| - | |||
| session-timeout? (注3) | 以下の範囲の値
デフォルト値は0です。 | セションタイムアウト値 | ○ | |||
session-idle-timeout? (注3) | 以下の範囲の値
デフォルト値は1800です。 | 無通信監視時間 | ○ | ||||
max-ejbobject? (注3) | 以下の範囲の値
デフォルト値は1024です。 | StatefulBean同時接続数 | ○ | ||||
initial-stateless-instance-count? (注4) | 以下の範囲の値
デフォルト値は0です。 | Stateless Beanの初期起動インスタンス数 | ○ | ||||
entity-eb? (注5) |
|
|
| Interstage拡張情報 | |||
| entity-timeout? | 以下の範囲の値
デフォルト値は120です。 | Entity BeanのEJB objectタイムアウト値 | ○ | |||
entity-instance-type? | 以下の値から選択
| Entity Beanのインスタンス管理モード | ○ | ||||
entity-instance-size? | 以下の範囲の値
デフォルト値は100です。 | Entity Beanのインスタンス数 | ○ | ||||
entity-instance-create-type? | 以下の値から選択
| Entity Beanのインスタンス生成モード | ○ | ||||
entity-batch-operations? (注7) | 以下の値から選択
| CMP1.1の複数レコードの一括更新 | ○ | ||||
message-driven-eb? (注6) |
|
|
| Message-driven Bean拡張情報 | |||
| message-type? | 以下の値から選択
| 受信対象種別 | ○ | |||
jms? |
|
|
| ||||
| max-messages? (注1) | 以下の範囲の値
デフォルト値は1です。 | メッセージバッファ最大値 | × | |||
subscription-name? | 任意の文字列 | サブスクライバの識別名 | ○ | ||||
connection-factory-name? | 任意の文字列 | JMSコネクションファクトリ名 | ○ | ||||
bean-pool-size? | 以下の範囲の値
デフォルト値は8です。 | 初期起動インスタンス数 | ○ | ||||
destination-name? | 任意の文字列 | Destination名 | ○ | ||||
retry-count? | 以下の範囲の値
デフォルト値は0です。
| リトライカウント | ○ | 異常時メッセージ退避定義 | |||
backup-connection-factory-name? | 任意の文字列
| 異常時ループ対処用JMSコネクションファクトリ名 | ○ | ||||
backup-destination-name? | 任意の文字列
| 異常時ループ対処用Destination名 | ○ | ||||
resourceadapter? |
|
|
| Message-driven Bean拡張情報 | |||
| resourceadapter-name? | 任意の文字列 | リソースアダプタ名 | ○ | |||
bean-pool-size? | 以下の範囲の値
デフォルト値は8です。 | 初期起動インスタンス数 | ○ | ||||
runas-entry? |
|
|
| セキュリティアイデンティティ | |||
| userid | 任意の文字列 | ユーザID | ○ | |||
password | 任意の文字列 | パスワード | ○ |
注1) 本バージョンでは定義しても無効なタグです。
注2) Session Beanで指定された場合のみ有効です。
注3) STATEFUL Session Beanで指定された場合のみ有効です。
注4) STATELESS Session Beanで指定された場合のみ有効です。
注5) Entity Beanで指定された場合のみ有効です。
注6) Message-driven Beanで指定された場合のみ有効です。
注7) CMP1.1で指定された場合のみ有効です。
注8) EJB2.1に準拠したEJBアプリケーションの場合には、ejb-jarタグ配下の定義の移出入ができません。配備前に、開発環境においてejb-jar.xmlファイルを編集してください。
fujitsu-cmp-definitionタグの構成と内容
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |||
---|---|---|---|---|---|---|---|
fujitsu-cmp-definition? (注1) |
|
|
|
| |||
| datasource-name? | 任意の文字列 | データソース名 | ○ | CMFマッピング定義 | ||
schema-name? | 任意の文字列 | スキーマ名 | ○ | ||||
table-name? | 任意の文字列 | テーブル名 | ○ | ||||
select-for-update? | 以下の値から選択
| findByPrimaryKeyメソッドにFOR UPDATE句を付加 | ○ | finderメソッド定義 | |||
stream-data? | 以下の値から選択
| CMPデータのstream転送 | ○ | CMFマッピング定義 | |||
field-map+ |
|
|
| ||||
| field-map-entry+ |
|
|
| |||
| field-name | 任意の文字列 | フィールド名 | × | |||
field-type? | 任意の文字列 | 型 | × | ||||
dbcolumn-name | 任意の文字列 | DBカラム名 | ○ | ||||
finder-map+ |
|
|
| finderメソッド定義 | |||
| finder-map-entry+ |
|
|
| |||
| finder-key-name | 任意の文字列 | メソッドシグネチャ | × | |||
finder-query-string | 任意の文字列 | 検索条件 | ○ |
注1) fujitsu-cmp2x-mapping-definitionとは排他指定です。また、CMP1.1で指定された場合のみ有効です。
fujitsu-cmp2x-mapping-definitionタグの構成と内容
タグ名 | 値 | 意味 | 編集 | Interstage管理コンソール画面との対応 | |||||
---|---|---|---|---|---|---|---|---|---|
fujitsu-cmp2x-mapping-definition? (注1) |
|
|
|
| |||||
| datasource-name? | 任意の文字列 | データソース名 | ○ | CMFマッピング定義 | ||||
ejb? |
|
|
| ||||||
| ejb-name | 任意の文字列 | Enterprise Bean名 | × | |||||
schema-name | 任意の文字列 | スキーマ名 | ○ | ||||||
table-name | 任意の文字列 | テーブル名 | ○ | ||||||
optimize-finders? | 以下の値から選択
| 複数件検索の高速化 | ○ | ||||||
concurrency-mode? | 以下の値から選択
| 同時更新データの一貫性保証 | ○ | ||||||
stream-data? | 以下の値から選択
| CMPデータのstream転送 | ○ | ||||||
field-map2x |
|
|
| ||||||
| field-map-entry2x+ |
|
|
| |||||
| default-dbcolumn-name | 任意の文字列 | 内部フィールド名 | × | |||||
is-primary-key | 以下の値から選択
| プライマリキー | × | ||||||
foreign-key? |
|
|
| CMRマッピング定義 | |||||
| foreign-ejb-name | 任意の文字列 | Enterprise Bean名 | × | |||||
field-name | 任意の文字列 | CMPフィールド名 | × | CMFマッピング定義 | |||||
dbcolumn-name | 任意の文字列 | DBカラム名 | ○ | ||||||
join-object+ |
|
|
| CMRマッピング定義 | |||||
| join-name | 任意の文字列 | 内部クラス名 | × | |||||
schema-name | 任意の文字列 | スキーマ名 | ○ | ||||||
table-name | 任意の文字列 | テーブル名 | ○ | ||||||
optimize-relationships? | 以下の値から選択
| relationshipのgetアクセッサの高速化 | ○ | ||||||
source |
|
|
| ||||||
| ejb-name | 任意の文字列 | Enterprise Bean名 | × | |||||
cmr-field-name? | 任意の文字列 | CMRフィールド名 | × | ||||||
sink |
|
|
| ||||||
| ejb-name | 任意の文字列 | Enterprise Bean名 | × | |||||
cmr-field-name? | 任意の文字列 | CMRフィールド名 | × | ||||||
field-map2x | ejbタグのfield-map2xを参照 |
注1) fujitsu-cmp-definitionとは排他指定です。また、CMP2.0で指定された場合のみ有効です。