Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

Jetty/Howto/Deploy 3rd Party Products/JIRA

< Jetty‎ | Howto‎ | Deploy 3rd Party Products
Revision as of 15:52, 28 July 2010 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


JIRA is a bug and issue tracker.

These instructions have been tested against:

Jetty JIRA Servlet / JSP JVM Transaction Manager / DataSource
7.0.0.RC1 3.13.4 2.5 / 2.1 1.5 Atomikos 3.5.5 / HSQLDB


Prepare the JIRA Web Application

Start from the JIRA Standalone Distribution, and:

  • Copy $JIRA/common/lib/hsqldb- to $JETTY/lib/ext/hsqldb/hsqldb- (create the directories as needed).
    This is to install the JDBC driver. Use a different JDBC driver if you don't use HSQLDB.
  • Copy $JIRA/atlassian-jira to $JETTY/contexts-available/atlassian-jira
  • Modify $JETTY/contexts-available/atlassian-jira/WEB-INF/web.xml:
    • add a <resource-ref> element for the datasource:
    • if you want to use email notifications, no configuration is needed apart the one available from the JIRA administration pages.
  • Modify $JETTY/contexts-available/atlassian-jira/WEB-INF/classes/entityengine.xml:
    • modify the JNDI name for the user transaction from java:comp/env/UserTransaction to java:comp/UserTransaction
    • make sure the JNDI name for the data source is java:comp/env/jdbc/JiraDS
    • If you use a different database, make sure that the attribute field-type-name of the datasource element is set to the appropriate database type (see here, section 2, for the possible values)
  • Setup the transaction manager:
    • unzip and copy to $JETTY/resources
    • download Atomikos TransactionEssentials and copy:
      • $ATOMIKOS/dist/transactions-essentials-all.jar to $JETTY/lib/ext/atomikos/transactions-essentials-all.jar (create the directories as needed)
      • $ATOMIKOS/lib/jta.jar to $JETTY/lib/ext/atomikos/jta.jar (or alternatively make sure the JTA classes are available to Jetty)
    • create the server-wide transaction manager Jetty configuration file $JETTY/etc/jetty-tm.xml with the following content:
      <?xml version="1.0"?>
      <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "">
      <Configure id="Server" class="org.eclipse.jetty.server.Server">
          <Call class="java.lang.System" name="setProperty">
              <Arg><SystemProperty name="jetty.home" default="." />/resources/</Arg>
          <New id="user-tx" class="">
                  <New class="com.atomikos.icatch.jta.UserTransactionImp" />
  • Create the JIRA web application context configuration file $JETTY/contexts/jira.xml with the following content:
    <?xml version="1.0"  encoding="UTF-8"?>
    <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "">
    <Configure class="org.eclipse.jetty.webapp.WebAppContext">
        <New id="jira-ds" class="">
                <New class="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean">
                    <Set name="uniqueResourceName">jirads</Set>
                    <Set name="Url">jdbc:hsqldb:./database/jiradb</Set>
                    <Set name="driverClassName">org.hsqldb.jdbcDriver</Set>
                    <Set name="user">sa</Set>
                    <Set name="minPoolSize">1</Set>
                    <Set name="maxPoolSize">10</Set>
        <Set name="contextPath">/jira</Set>
        <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/contexts-available/atlassian-jira/</Set>
        <Set name="configurationClasses">
            <Array type="java.lang.String">

    A note for usage with MySQL: it could be useful to add a further property to the AtomikosNonXADataSourceBean configuration that sets the testQuery that will be use to validate the connection:

    <New class="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean">
        <Set name="testQuery">select 1</Set>

    See also this page for further details.

Start Jetty

Start Jetty with the following command from the $JETTY directory:

java -jar start.jar OPTIONS=default,plus,jsp etc/jetty.xml etc/jetty-tm.xml

Back to the top