Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

plugin event listener async

Tim B November 6, 2012

Hi,

I am currently developping a plugin with this tutorial: https://developer.atlassian.com/display/JIRADEV/Writing+JIRA+event+listeners+with+the+atlassian-event+library

However I am concerned about the impact this plugin will have upon creating issues. Is there any way to create this listener so it will be handled async?

Kind regards.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Jannik Luyten
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.
June 9, 2013

I just solved the problem by stumbling on this little tutorial: https://bitbucket.org/atlassianlabs/async-events-tutorial

It does exactly what is needed. Verified!

Bottom line: listen for sync event and async events, when the sync event is called, publish an async event, which is then picked up by the async event listener.

0 votes
Radu Dumitriu
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.
June 9, 2013

So, it is hard to create a singleton, put an ExecutorService into it, add some startup / shutdown hooks, start it on the plugin start, stop it on the plugin stop, submit a task via executorPool.submit(runnable) ?

That's pretty basic multithreaded stuff.

Deleted user January 13, 2015

Right, but you're spawning your own threads instead of re-using JIRA's thread pool.

0 votes
Jannik Luyten
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.
June 9, 2013

I have the same question. Do you have an answer by now, TimB?

TAGS
AUG Leaders

Atlassian Community Events