![](https://csdnimg.cn/release/download_crawler_static/12692661/bg14.jpg)
•
The JNDI address of its database connection (a java.sql.DataSource object).
•
What type of database it is dealing with.
•
The JNDI address of a Transaction Manager (a javax.transaction.UserTransaction object).
This is all done in the entityengine.xml file, as described in the database configuration
guide. You'll find a copy of entityengine.xml is edit-webapp/WEB-INF/classes,
ready to be edited.
There are a few app servers which, for various reasons, we have been unable to use the normal
JNDI lookup procedure to obtain a datasource/transaction manager. See the individual app server
guides for more details on how these are configured — it generally means that more
configuration details end up in entityengine.xml.
2.6.2. Entity Engine
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.
2.6.2.1. Configuring the Entity Engine for 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 such as
JDBC datasource parameters.
For JIRA, this file is located in the distribution at
edit-webapp/WEB-INF/classes/entityengine.xml.
As outlined in the overview, the settings which generally need to be configured are:
•
Transaction Factory - see below
•
field type - edit the field-type-name attribute of the <datasource> tag.
•
datasource location:
• edit the jndi-name attribute of the <jndi-jdbc> tag relevant to your database.
• For certain schema-aware databases (Postgres, DB2), add a schema-name attribute
specifying the schema the database uses. See note in entityengine.xml
• For databases with table/column name length limits (eg. DB2 on certain platforms), you
may need to set a constraint-name-clip-length parameter. See note in entityengine.xml
Transaction Factory
By default the Entity Engine tries to obtain a JTA transaction factory from the application server
using JNDI. This table shows the different values for different application servers:
Orion, Tomcat 4.x, Tomcat 5.0 & Weblogic (see also the Orion, Resin, Tomcat
and Weblogic guides)
<transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory">
<user-transaction-jndi jndi-server-name="default"
jndi-name="java:comp/UserTransaction"/>
<transaction-manager-jndi jndi-server-name="default"
jndi-name="java:comp/UserTransaction"/>
</transaction-factory>
Tomcat 5.5 (see also the Tomcat 5.5 install guide)
<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"/>
JIRA Documentation
Page 20
Copyright © 2002-2005 Atlassian All rights reserved.