Forums

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

Jira Plugin with Connections to external Databases

Francois Fernandes
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!
May 21, 2018

Hi community,

currently, I'm working on a JIRA plugin, that requires a connection to an external database.

To make the plugin as flexible as possible, I do not want to hardcode the DB connection. Instead there should be a way to configure the connection to the external DB using the UI.

 

My question now is:

Are there any best practices on how to manage DB connections in a Plugin? Or are there even libraries, helping in the connection management?

 

Currently I'm thinking of storing the connection information using the PluginSettings and managing the lifecycle of the connection manually within a OSGi component.

1 answer

1 vote
Charly [DEISER]
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.
May 22, 2018

Hi @Francois Fernandes

To store this info you can use Active Objects (https://developer.atlassian.com/server/framework/atlassian-sdk/active-objects/).

 

Yes. there are libraries to help you connect with this external databases (ie: https://mvnrepository.com/artifact/mysql/mysql-connector-java)

 

Hope this helps

Francois Fernandes
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!
May 22, 2018

Hi @Charly [DEISER],

 

thank you for your suggestion regarding Active Objects. I haven't considered using Active Objects for the configuration yet. But I'll certainly give it a shot.

 

Regarding the libraries: I'm aware of the drivers and the concept of JDBC in general. My question was, whether or not, there are libraries providing the connection management and a configuration UI for database connections.

I think the answer to that question is no. I'll have to implement all that myself (which is fine. I was hoping to reduce the amount of time that is required for the connection Administration UI).

Charly [DEISER]
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.
May 22, 2018

Sorry about that. Yes i believe there are no libraries to help you with the UI, etc.

Regards

Suggest an answer

Log in or Sign up to answer