Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too.

Successfully configuring the DataSource on JBoss requires the following steps:

  • deployment of the DataSource Connection Pool inside JBoss (see database specific templates in $JBOSS_HOME/docs/examples/jca)
    jira-ds.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
      <local-tx-datasource>
        <jndi-name>JBOSS_JNDI_NAME</jndi-name>
        <connection-url>jdbc:DRIVER:DB_HOSTNAME:DB_PORT/ETC</connection-url>
        <driver-class>JAVA DRIVER CLASS</driver-class>
        <!-- other connection parameters such as authentication tokens, pool configurations, etc... -->
      </local-tx-datasource>
    </datasources>
    
  • binding the JNDI name to a java:comp/env namespace object using the container specific deployment descriptor WEB-INF/jboss-web.xml
    jboss-web.xml
    <jboss-web>
       <resource-ref>
          <res-ref-name>jdbc/JiraDS</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <jndi-name>java:JBOSS_JNDI_NAME</jndi-name>
       </resource-ref>
    </jboss-web>
    
  • declare the DataSource in said namespace in WEB-INF/web.xml:
    web.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>
            <res-sharing-scope>Unshareable</res-sharing-scope>
        </resource-ref>
    

Unknown macro: {htmlcomment}

深刻度

Low
Article ID: JIRAKB223220045