Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Deploy 3rd Party Products/JIRA"

Line 41: Line 41:
 
* Create the context file <tt>$JETTY/contexts/jira.xml</tt> and copy the following:
 
* Create the context file <tt>$JETTY/contexts/jira.xml</tt> and copy the following:
 
*; <pre><?xml version="1.0"  encoding="UTF-8"?>
 
*; <pre><?xml version="1.0"  encoding="UTF-8"?>
*; <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"&gt;
+
*; <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
 
*;  
 
*;  
*; &lt;Configure class="org.eclipse.jetty.webapp.WebAppContext"&gt;
+
*; <Configure class="org.eclipse.jetty.webapp.WebAppContext">
 
*;  
 
*;  
*;    &lt;Call class="java.lang.System" name="setProperty"&gt;
+
*;    <Call class="java.lang.System" name="setProperty">
*;        &lt;Arg&gt;com.atomikos.icatch.file&lt;/Arg&gt;
+
*;        <Arg>com.atomikos.icatch.file</Arg>
*;        &lt;Arg&gt;&lt;SystemProperty name="jetty.home" default="." /&gt;/resources/jta.properties&lt;/Arg&gt;
+
*;        <Arg><SystemProperty name="jetty.home" default="." />/resources/jta.properties</Arg>
*;    &lt;/Call&gt;
+
*;    </Call>
 
*;  
 
*;  
*;    &lt;New id="user-tx" class="org.eclipse.jetty.plus.jndi.Transaction"&gt;
+
*;    <New id="user-tx" class="org.eclipse.jetty.plus.jndi.Transaction">
*;        &lt;Arg&gt;
+
*;        <Arg>
*;            &lt;New class="com.atomikos.icatch.jta.UserTransactionImp" /&gt;
+
*;            <New class="com.atomikos.icatch.jta.UserTransactionImp" />
*;        &lt;/Arg&gt;
+
*;        </Arg>
*;    &lt;/New&gt;
+
*;    </New>
 
*;  
 
*;  
*;    &lt;New id="jira-ds" class="org.eclipse.jetty.plus.jndi.Resource"&gt;
+
*;    <New id="jira-ds" class="org.eclipse.jetty.plus.jndi.Resource">
*;        &lt;Arg&gt;jdbc/JiraDS&lt;/Arg&gt;
+
*;        <Arg>jdbc/JiraDS</Arg>
*;        &lt;Arg&gt;
+
*;        <Arg>
*;            &lt;New class="com.atomikos.jdbc.nonxa.NonXADataSourceBean"&gt;
+
*;            <New class="com.atomikos.jdbc.nonxa.NonXADataSourceBean">
*;                &lt;Set name="Url"&gt;jdbc:hsqldb:./database/jiradb&lt;/Set&gt;
+
*;                <Set name="Url">jdbc:hsqldb:./database/jiradb</Set>
*;                &lt;Set name="driverClassName"&gt;org.hsqldb.jdbcDriver&lt;/Set&gt;
+
*;                <Set name="driverClassName">org.hsqldb.jdbcDriver</Set>
*;                &lt;Set name="user"&gt;sa&lt;/Set&gt;
+
*;                <Set name="user">sa</Set>
*;            &lt;/New&gt;
+
*;            </New>
*;        &lt;/Arg&gt;
+
*;        </Arg>
*;    &lt;/New&gt;
+
*;    </New>
 
*;  
 
*;  
*;    &lt;Set name="contextPath"&gt;/jira&lt;/Set&gt;
+
*;    <Set name="contextPath">/jira</Set>
 
*;  
 
*;  
*;    &lt;Set name="resourceBase"&gt;&lt;SystemProperty name="jetty.home" default="."/&gt;/contexts-available/atlassian-jira/&lt;/Set&gt;
+
*;    <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/contexts-available/atlassian-jira/</Set>
 
*;  
 
*;  
*;    &lt;Set name="configurationClasses"&gt;
+
*;    <Set name="configurationClasses">
*;        &lt;Array type="java.lang.String"&gt;
+
*;        <Array type="java.lang.String">
*;            &lt;Item&gt;org.eclipse.jetty.webapp.WebInfConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.webapp.WebXmlConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.webapp.MetaInfConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.webapp.FragmentConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.plus.webapp.EnvConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.plus.webapp.Configuration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.plus.webapp.Configuration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.webapp.JettyWebXmlConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
*;            &lt;Item&gt;org.eclipse.jetty.webapp.TagLibConfiguration&lt;/Item&gt;
+
*;            <Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
*;        &lt;/Array&gt;
+
*;        </Array>
*;    &lt;/Set&gt;
+
*;    </Set>
 
*;  
 
*;  
*; &lt;/Configure&gt;</pre>
+
*; </Configure></pre>

Revision as of 13:23, 21 July 2009


How to Deploy JIRA

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 1.8.0.5

Steps

Prepare the JIRA Web Application

Start from the JIRA Standalone Distribution, and:

  • Copy $JIRA/common/lib/hsqldb-1.8.0.5.jar to $JETTY/lib/ext/hsqldb/hsqldb-1.8.0.5.jar (create the directories as needed)
  • 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:
      <resource-ref>
      <res-ref-name>jdbc/JiraDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>SERVLET</res-auth>
      </resource-ref>
    • if you want to use JavaMail Session, add a <resource-ref> for it too:
      <resource-ref>
      <res-ref-name>mail/Session</res-ref-name>
      <res-type>javax.mail.Session</res-type>
      <res-auth>SERVLET</res-auth>
      </resource-ref>
  • 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
  • Setup the transaction manager:
    • unzip and copy jta.properties 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 context file $JETTY/contexts/jira.xml and copy the following:
    <?xml version="1.0"  encoding="UTF-8"?>
    <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http
    //www.eclipse.org/jetty/configure.dtd">
    <Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Call class="java.lang.System" name="setProperty">
    <Arg>com.atomikos.icatch.file</Arg>
    <Arg><SystemProperty name="jetty.home" default="." />/resources/jta.properties</Arg>
    </Call>
    <New id="user-tx" class="org.eclipse.jetty.plus.jndi.Transaction">
    <Arg>
    <New class="com.atomikos.icatch.jta.UserTransactionImp" />
    </Arg>
    </New>
    <New id="jira-ds" class="org.eclipse.jetty.plus.jndi.Resource">
    <Arg>jdbc/JiraDS</Arg>
    <Arg>
    <New class="com.atomikos.jdbc.nonxa.NonXADataSourceBean">
    <Set name="Url">jdbc
    hsqldb:./database/jiradb</Set>
    <Set name="driverClassName">org.hsqldb.jdbcDriver</Set>
    <Set name="user">sa</Set>
    </New>
    </Arg>
    </New>
    <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">
    <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
    <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
    <Item>org.eclipse.jetty.plus.webapp.Configuration</Item>
    <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
    </Array>
    </Set>
    </Configure>

Back to the top