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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 135 Next »

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}

Severity

Low
Article ID: JIRAKB1600323854

  • No labels