Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

multiple data sources in JIRA plugin?

Matej
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 15, 2019

Hi fellow developers,

has anyone had success with specifying multiple data sources for JIRA in pom.xml?

While developing a plugin I want to access an external database using JNDI.

I want JIRA itself to use the h2 database that gets automatically created when executing `atlas-run`.

However, when I specify both data sources in pom.xml, maven build throws an error "JIRA does not support multiple data sources".

Is there any way to do this? I'm using plugin SDK version 8.0.16 and I define data sources like this:

<products>
<product>
<id>jira</id>
<instanceId>instanceId1</instanceId>
<version>${jira.version}</version>

<dataSources>

<dataSource>
<jndi>jdbc/JiraDS</jndi>
<url>jdbc:h2:file:${basedir}/target/instanceId1/home/database/h2db</url>
<username>sa</username>
<password/>
<driver>org.h2.Driver</driver>
<type>javax.sql.DataSource</type>
<schema>PUBLIC</schema>
</dataSource>

<dataSource>
<jndi>ExternalDb</jndi>
<url>jdbc:oracle:thin:@server:1521:schema</url>
<username>xxx</username>
<password>yyy</password>
<driver>oracle.jdbc.OracleDriver</driver>
<type>javax.sql.DataSource</type>
<libArtifacts>
<libArtifact>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.1</version>
</libArtifact>
</libArtifacts>
</dataSource>

</dataSources>
</product>
</products>

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events