[forge-dev] Firing ResourceEvents before CommandExecuted event?
Jevgeni Zelenkov
jevgeni.zelenkov at googlemail.com
Tue Jun 19 15:48:14 EDT 2012
Hi guys,
I am having an issue with Events in Forge. I would like to get a list
of Resources modified by a forge command, after a forge command has
been executed.
Fortunately, forge fires events when command execution completes
(either successfully, or unsuccessfully) and when resources are
created/modified/deteled/etc. Sadly, it fires CommandExecuted event
before any of ResourceEvents. (EventBusInvoker listens to
CommandExecuted event and fires all ResourceEvents queued in the
EventBus).
I expect ResourceEvents to be fired before the CommandExecuted event
(which would correspond to what actually happends). I tried commenting
out code inside of EventBusInvoker's fire method and adding
"bus.fireAll();" into Execution class (right before firing
CommandExecuted event) but that doesn't seem to work.
How could I fire ResourceEvents before CommandExecuted event? Or is
there another way to get a list of modified resources during forge
command exection?
What does this line do? Is forge multi-threaded?
"Thread.currentThread().setContextClassLoader(current);"
Jevgeni
More information about the forge-dev
mailing list