前のトピック: 主なデータベース用の DDL次のトピック: スキーマの EclipseLink プロパティ


セッションの EclipseLink プロパティ

セッションの EclipseLink 拡張を設定するため、およびターゲット データベースおよびアプリケーション サーバとして、persistence.xml ファイルで定義できる EclipseLink JPA 永続性ユニット プロパティを、以下に示します。

eclipselink.session-name

EclipseLink セッションが静的なセッション マネージャに格納される名前を指定します。 このオプションは、JPA のコンテキスト外の EclipseLink 共有セッションにアクセスする必要がある場合に使用します。 また、このオプションは、EclipseLink sessions.xml ファイルを介して設定される既存の EclipseLink セッションを使用するためにも使用します。

有効な値: サーバ展開で一意の有効な EclipseLink セッション名。

例:

persistence.xml file<property value="MySession"/>

例:

property Mapimport org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.SESSION_NAME, "MySession"); 

デフォルト: EclipseLink で生成された一意の名前。

eclipselink.sessions-xml

EclipseLink セッション設定ファイル sessions.xml からロードされる永続的な情報を指定します。

このオプションは、アノテーションおよび展開 XML の代わりとして使用できます。 このプロパティを指定すると、EclipseLink は、persistence.xml、ORM.xml、およびその他のマッピング ファイルからすべてのクラス アノテーションおよびオブジェクト リレーショナル マッピングを上書きします。

eclipselink.session-name プロパティを設定することによりセッションを指定します。

注: このプロパティの値を指定しないと、sessions.xml ファイルは使用されません。

有効な値: セッション XML ファイルのリソース名。

例:

persistence.xml file<property value="mysession.xml"/>例: property Mapimport org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.SESSIONS_XML, "mysession.xml");

eclipselink.session-event-listener

ブートストラップ中に追加される記述子イベント リスナを指定します。

有効な値: org.eclipse.persistence.sessions.SessionEventListener インターフェースを実装するクラスの修飾クラス名。

例:

Persistence.xml file<property value="mypackage.MyClass.class"/>例: property Mapimport org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.SESSION_EVENT_LISTENER_CLASS, "mypackage.MyClass.class");

eclipselink.session.include.descriptor.queries

記述子からセッションへのすべての指定されたクエリのデフォルト コピーを有効または無効にします。 これらのクエリには、EclipseLink API、記述子修正メソッドなどを使用して定義されるクエリが含まれます。

有効な値:

例:

Persistence.xml file<property value="false"/>例: property Mapimport org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.INCLUDE_DESCRIPTOR_QUERIES, "false"); 

デフォルト: true。

eclipselink.target-database

JPA アプリケーションで使用するデータベースのタイプを指定します。

有効な値:

persistence.xml ファイルの org.eclipse.persistence.config.TargetDatabase で使用する有効な値は、以下のとおりです。

例:

Persistence.xml file<property value="Oracle"/>例: property Mapimport org.eclipse.persistence.config.TargetDatabase;import org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.TARGET_DATABASE, TargetDatabase.Oracle); 

デフォルト値: Auto。

eclipselink.target-server

JPA アプリケーションが使用するアプリケーション サーバのタイプを指定します。

有効な値:

persistence.xml ファイルの org.eclipse.persistence.config.TargetServer で使用する有効な値は、以下のとおりです。

例:

persistence.xml file<property value="OC4J_10_1_3"/>例: property Mapimport org.eclipse.persistence.config.TargetServer;import org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.TARGET_SERVER, TargetServer.OC4J_10_1_3); 

デフォルト値: None。