It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to publish events that will trigger same listener in two Jira plugin Edited

1. i have created two jira plugin. 

ex: plugin-one, plugin-two

2. created a Event which extend Jira AbstractEvent class in both plugins

ex : MyVeryOwnEvent extends AbstractEvent

3. created two listeners in two plugin which listen for MyVeryOwnEvent and registered with publisher

ex : 


    public void receiveMyEvent(MyVeryOwnEvent event){


       System.err.println("Got from plugin one "+event.getName());



    public void afterPropertiesSet() throws Exception {

        // register ourselves with the EventPublisher

    System.err.println("register from plugin one ");



4. created servlet in plugin one and inside that that will create MyVeryOwnEvent and publish it.


    private EventPublisher eventPublisher;


    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {

        String name = req.getParameter("name");


        MyVeryOwnEvent evt = new MyVeryOwnEvent(name);


        this.eventPublisher.publish( evt);





when i called the servlet only plugin one listener is getting triggered. i want to trigger both listeners in plugin one and two. could you please help me to resolve this. is there any way to publish event globally ?  thanks



0 answers

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you