Port Jira connect plugin's database to server plugin

I am porting existing JIRA connect plugin to server architecture. In connect, i was using mysql database with jdbc connection.

1> Can i directly use connect's mysql database in server plugin?

 2> If not, then i am fine with Active Object too. But i am not getting exact detailed documentation on active objects. (How to create combo unique key, Joins between tables). 

2 answers

1 accepted

2 votes
Accepted answer

Server plugins should use Active Objects to store data - this is the recommended approach. If for some reason AO does not work for you you can always connect to other database, but this makes things a lot more complicated - for example:

  • You should bundle the appropriate JDBC connector
  • You need a UI for providing db connection settings - host, port, user, etc..
  • Who will create the database for your add-on ?
  • etc...

Here're some useful guides on Active Objects



And about the JOINS




@Boris Georgiev Thanks Boris. Actually i checked all above links but not getting any good example for how to add combo unique key, On DELETE cascade on foreign key, add procedures and triggers in active objects.


  • You can't create multi column keys - https://ecosystem.atlassian.net/browse/AO-96
  • AO does not support procedures and triggers - you might need to re-design your application and move this logic into the Java persistence layer
  • Also I don;t think there is a CASCADE delete, so you should also handle that in Java


@Boris Georgiev [Botron] : Thanks Boris. I think yes i need to do everything using JAVA now. sad  I wanted to reuse connect plugin code as much as i can in server plugin.

1 vote

Yes, as long as it's not the JIRA database - you must never write to a JIRA database directly.

@Nic Brough [Adaptavist] SO active objects is the only option in server plugin for Database. Right?


You can't use the database in Connect either, so I'm not sure what you're doing.  I'd assumed you were reading an external database and your addon will continue to do that.


@Nic Brough [Adaptavist] : yes you are right. In case of connect i am using external database. But in server plugin, i don't want to use external database. I want to port that external database in JIRA itself through active objects.

Ah, good, I did understand it correctly then!  Thanks!  Boris has beaten me to all the links I'd recommend.

The only thing I'd add is that you should stop thinking about doing things at a database level (forget triggers and keys etc) - you need to use the functions for handling AO as documented in Boris' links.

@Nic Brough [Adaptavist] Thanks Nic. Its clear now.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

249 views 6 0
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you