0 Replies Latest reply on Aug 12, 2015 8:47 AM by Daniela Kolarova

    Listeners execution order, is it possible to change the execution order from bottom to the top for after methods?

    Daniela Kolarova Newbie

      In our project I decided to use listeners for instrumentation functions (e.g. logging, custom scopes creation ...). The problem that I faced was that I need the listeners  "before" method to be called the in the order (from the first to the last) are defined in the configuration file, but at least in my case (although it sounds kind of logically) I need the "after" methods of the listeners to be executed from the last to the last to the first. May be it is my interpretation but I understand listeners as functional wrappers working the following way:

       

      listener1.before

      listener2.before

       

      execute<Part>

       

      listener2.before

       

      listener1.before

       

      Is it possible to change the execution order?