Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jetty Version

Jira Version

Tx Mgr & Datasource

JVM

Servlet & JSP

6.0.1

3.6.5

JOTM 2.1.10 & HSQL 1.7

1.5

2.5 & 2.1

6.1

3.6.5

JOTM 2.1.10 & HSQL 1.7

1.5

2.5 & 2.1

6.1

3.6.5

Atomikos 3.1.0 & HSQL 1.7

1.5

2.5 & 2.1

6.1

3.6.5

Atomikos 3.1.0 & HSQL 1.7

1.4

2.5 & 2.0

6.1.1

3.8.1

JOTM 2.1.10 & HSQL 1.8.0.5

1.6

2.5 & 2.0

6.1.9

3.12.1

Atomikos 3.2.3 & HSQL 1.8.0.7

1.5.0_11

2.5 & 2.1

Prepare the JIRA webapp

  1. if you've downloaded the standalone distribution of JIRA:
    1. copy the commons/lib/hsqldb-*.jar into $jetty.home/lib/ext
    2. copy the atlassian-jira directory into your $jetty.home/webapps-plus directory (create webapps-plus if it doesn't exist, e.g. on 6.0).
    3. edit $jetty.home/webapps-plus/atlassian-jira/WEB-INF/classes/entityengine.xml to change from the tomcat 5-specific setup for the JNDI binding for the UserTransaction. It must be java:comp/UserTransaction and NOT java:comp/env/UserTransaction.
  2. if you've downloaded the webapp distribution of JIRA:
    1. download the hsqldb jar from the JIRA site (if you're not using the latest JIRA, go here and find the right docs version) and copy to $jetty.home/lib/ext
    2. without further configuring anything, build the webapp with build.sh/build.bat, following the readme.txt instructions.
    3. make the directory $jetty.home/webapps-plus/atlassian-jira.
    4. expand the atlassian-jira-3.6.5.war into it.
    5. edit $jetty.home/webapps-plus/atlassian-jira/WEB-INF/classes/entityengine.xml to ensure that the JNDI binding for the UserTransaction is java:comp/UserTransaction. Also check that if you are using hsqldb that the <datasource> element at the bottom of the file has attribute field-type-name="hsql".
  3. regardless of which distribution you downloaded, now edit the $jetty.home/webapps-plus/atlassian-jira/WEB-INF/web.xml file:
    1. add a <resource-ref> for the DataSource used by JIRA:
      Code Block
      xml
      xml
      <resource-ref>
              <description>Database for JIRA</description>
              <res-ref-name>jdbc/JiraDS</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
      </resource-ref>
      
    2. if you want to use a mail Session JNDI lookup, then also add a <resource-ref> for it too:
      Code Block
      xml
      xml
      <resource-ref>
          <res-ref-name>mail/Session</res-ref-name>
          <res-type>javax.mail.Session</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
      
      Warning

      It is important that you copy the jira webapp into the directory that is setup to deploy webapps using JNDI. If you are using the default jetty setup from the distribution, then this directory will be $jetty.home/webapps-plus not $jetty.home/webapps.

...

  1. Configuration
    On your jetty-plus.xml, uncomment(if its commented out) the ff:
    Code Block
    xml
    xml
        <Call name="addLifeCycle">
          <Arg>
            <New class="org.mortbay.jetty.deployer.WebAppDeployer">
              <Set name="contexts"><Ref id="Contexts"/></Set>
              <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps-plus</Set>
              <Set name="parentLoaderPriority">false</Set>
              <Set name="extract">true</Set>
              <Set name="allowDuplicates">false</Set>
              <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
              <Set name="configurationClasses"><Ref id="plusConfig"/></Set>
            </New>
          </Arg>
        </Call>
    
  2. Running:
    Code Block
    java -jar start.jar etc/jetty.xml etc/jetty-plus.xml etc/jetty-jira-jndi.xml
    
    Tip
    titleShortening the runline

    You can move all of the jetty xml configuration into a single file if you want to shorten the runline. Better yet, put it all in etc/jetty.xml and you won't even have to specify any config file on the runline, as it is the default:

    Code Block
    java -jar start.jar
    

...

  1. Configuration:
    Create a "jira-context.xml" in $jetty.home/contexts and append the ff:
    Code Block
    xml
    xml
    <?xml version="1.0"  encoding="ISO-8859-1"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    <Configure class="org.mortbay.jetty.webapp.WebAppContext">
    
      <Set name="contextPath">/</Set>
    
        <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps-plus/atlassian-jira</Set>
    
        <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
    
       
      <!--  NEEDED WHEN USING JNDI -->
      <Set name="configurationClasses">
      <Array id="plusConfig" type="java.lang.String">
        <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
        <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
        <Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
        <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
        <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
      </Array>
        </Set>
    
    </Configure>
    
  2. Running:
    Code Block
    java -jar start.jar etc/jetty.xml etc/jetty-jira-jndi.xml
    

...

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery