Documentation for JIRA 5.1.x. Documentation for other versions of JIRA is available too.

The Entity Engine from the OFBiz project is what JIRA uses to persist data to a database. You can find out more about why we chose the EE at the bottom of this page. See the configuration overview for a conceptual overview of what is being done here.

On this page:

JIRA エンティティ エンジンの構築

The configuration of the Entity Engine is done through an XML file called entityengine.xml. This file is used to define parameters for persistence servers.

For JIRA WAR distributions, this file is located in the edit-webapp/WEB-INF/classes/entityengine.xml subdirectory of the JIRA Installation Directory.

Ensure that your entityengine.xml XML file is well-formed when making changes. Some application server configurations may "swallow" the error messages you should get in your log file if entityengine.xml is not well-formed and instead, report spurious error messages.

Transaction Factory

デフォルトでは、エンティティ エンジンは JNDI を使用してアプリケーション サーバーから JTA トランザクション ファクトリーを取得しようとします。以下のコード サンプルは、Apache Tomcat アプリケーション サーバーに対するさまざまな値を示しています。

Tomcat 5.5 (see also Installing JIRA on Tomcat 5.5):

<transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory">
  <user-transaction-jndi jndi-server-name="default"
    jndi-name="java:comp/env/UserTransaction"/>
  <transaction-manager-jndi jndi-server-name="default"
    jndi-name="java:comp/env/UserTransaction"/>
</transaction-factory>

エンティティ モデルの変更

エンティティ モデルは、JIRA がデータベースで使用する表と列のレイアウトを表します。JIRA の内部動作を変えることなく、完全に変更できます。

提供されたモデルは、ほとんどすべてのデータベースで使用できます(列と表の名前が SQL 準拠であることを確認する必要があります)。

The entity model is configured through an XML file called entitymodel.xml (located in the webapp/WEB-INF/classes/entitydefs/entitymodel.xml subdirectory of JIRA WAR distribution's Installation Directory). To edit this file, copy it to the edit-webapp/WEB-INF/classes/entitydefs/entitymodel.xml subdirectory and make changes there. When the WAR is built using build.(sh|bat), the version of the file in the edit-webapp subdirectory will be used.

The format of the file is fairly self explanatory. Essentially, JIRA always refers to the entity-name and field-name attributes within the code. The type attribute of a <field> tag should always match the type attribute of a <field-type-def> tag in your fieldtype-*.xml files.

To change where entities and fields are persisted in your database, simply add or edit the attribute table-name (for entities) or col-name (for fields).

エンティティ エンジンを選ぶ理由

EE over CMPorBMPentity bean を選ぶ理由

  • アプリケーションサーバー間の移植性に優れている
  • テーブル スキーマが自動的に作成・更新される
  • フィールドタイプの定義を使用し、新しいデータベースへのサポートを短時間で追加できる
  • 多くの CMP 実装よりも短時間で実行でき、優れたキャッシング機能を搭載している

このドキュメントは JIRA 用のエンティティ エンジンの構成に対応しています(ただし多くのアプリケーションに適用可能である必要があります)。エンティティ エンジン自体およびその内部動作についての詳細は、以下を参照してください。