I wonder if I can get a JDBC connection to the JIRA/Confluence database from plugin code and access the tables created by the ActiveObjects plugin.
Is that possible?
If so: Would that still work reliably on a different JIRA/Confluence instance with different configuration, specifically with a different database vendor?
You can definitely get the DS info or Connection from plugin code and use it to access AO tables.
DatasourceInfo datasourceInfo = new DefaultOfBizConnectionFactory().getDatasourceInfo(); Connection connection = new DefaultOfBizConnectionFactory().getConnection();
AO tables follows a unique naming strategy, which you can find at https://developer.atlassian.com/docs/atlassian-platform-common-components/active-objects/developing-your-plugin-with-active-objects/active-objects-faq/table-names. The names stay the same across instances.
Having said that, it is recommended to use the ActiveObjects APIs to interact with the AO tables.
I get null when I try accessing JDBC info
JdbcDatasourceInfo jdbcDatasourceInfo = new DefaultOfBizConnectionFactory().getDatasourceInfo().getJdbcDatasource();
However the JNDI Datasource works
Any clues ?
I am using SDK with
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :). In the spirit of this month's august-challenge, we're sourcing stories of Jira Service Desk activation fro...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs