Active object tables not getting created in jira database in jira5.0.2

Ramesh Udari1 May 25, 2013

Hi,

We are using JIRA5.0.2 and we have implmented active objects plugins for our own entiites. Plugin is deployed successfull showing in plugin section but when go to jira database to find the ao table , it is not getting created autometically after deploying AO plugins. And there is no error in logs also. How to debug where the problme occured and when tables will be created after deploying active object plugin. Help is highly appriciated.

Regards,

Tom

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Onkar Ahire
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 25, 2013

https://answers.atlassian.com/questions/153872/how-to-store-data-into-database

link will help you to develop active object.

-----------------------------------------------------------------

Pom.xml

<dependency>

<groupId>com.atlassian.labs</groupId>

<artifactId>activeobjects-plugin</artifactId>

<version>0.5</version>

<type>atlassian-plugin</type>

</dependency>

atlassian-plugin.xml

<ao key="ao-issueConfig">

<description>The module configuring the Active Objects service used by this plugin</description>

<entity>com.POJOCLASSREF</entity>

</ao>

POJOCLASSREF.java

public interface POJOCLASSREF extends Entity

{

// getter and setter methods

}

MainJAVACLASS.java

Depends on plugin module you can use ao, eg. Use ActiveObject in construction injection.

public class MainJAVACLASS

{

private final ActiveObjects ao;

}

public MainJAVACLASS(ActiveObject ao)

{

this.ao=ao;

}

and use ao object where ever you want in bussiness logic.

to store data in to DB

use ao scenario like this

ao.executeInTransaction(new TransactionCallback<POJOCLASSREF>() {

public IssueConfig doInTransaction()

{

final POJOCLASSREF pojoref=ao.create(POJOCLASSREF.class);

// USE SETTER METHOD TO SET PARAMETERS TO STORE IN DB

return pojoref;

}

});

----------------------------------------------------------------------

Onkar Ahire
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 25, 2013

Below link does contain brief discussion on Active objects, above steps is one of them.

https://answers.atlassian.com/questions/153872/how-to-store-data-into-database

0 votes
Jobin Kuruvilla [Adaptavist]
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 25, 2013

Do you have the AO definitions in atlassian-plugin.xml?

Ramesh Udari1 May 26, 2013

Hi Jobin,

I have AO definiation in in atlassian-plugin.xml, but here my question is that as soon as i deploy myplugin in to our jira application, will the ao tables be created autometically or do we need to do any coding for creating tables?.


Mizan
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 26, 2013

@Tom yes you will need to create an entity class which will define your table in the database . refer this tutorial .

Jobin Kuruvilla [Adaptavist]
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 26, 2013

@Tom you need to define entity classes but you don't need to do anything after restart. The tables will be created automatically on restart if the plugin has the correct AO and entity definitions in place.

TAGS
AUG Leaders

Atlassian Community Events