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.
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
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry about that. Yes i believe there are no libraries to help you with the UI, etc.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.