Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Reading data from an external datasource in a JIRA plug-in

James January 17, 2015

I am wiring a JIRA plugin that needs to read data from an external MS SQL Server database (data from our HR system).  The plugin will use this data in both servlets and event handlers.  I will need a connection pool and some way to inject the datasource connections into the instances DAO class used by the various components.

Searching produces information on changing the data source in JIRA but no answer on adding a second datasource definition.  It seems that this question has been asked before but not really answered.  

I am experienced with Spring and the DAO that reads that data works quite well with the datasource wired up in the Junit test.  Now I just have find out how to get the connection injected when the code is integrated into the plug-in.  I may yet be able to cobble something together but would rather do this using standard Atlassian components and techniques if possible.  This is my first plugin so I may just be missing something that is obvious to everyone else.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015

At first, check if this plugin is somehow usefull to you

https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.databasecf

 

James January 19, 2015

Thank you for the suggestion. This data isn't for the UI, it will be used in back-end logic. I am hoping to find the best practice for defining and accessing a second data source from a plugin.

Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015

i may be wrong but i think there is no "standard Atlassian" way to do this. I guess you will have to cobble something together. This might help you. See answer by Alex Perez https://answers.atlassian.com/questions/248841/how-to-add-external-data-source-when-i-develop-my-plugin

Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015
James January 19, 2015

Thank you for the links.

TAGS
AUG Leaders

Atlassian Community Events