Announcement Announcement Module
Collapse
No announcement yet.
Dynamically adding listeners to the job Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamically adding listeners to the job

    This might sound a bit silly - but is there a way to cleanly add/remove extra JobExecutionListeners to the job programmatically?

    My use case is such:

    OSGi dm-server. Bundle A - bunch of SI glue, triggers jobs. Number of bundles that contain job configurations and code. Job is published as an OSGi service with JobFactory/JobFactoryReference. Bundle A has a <osgi:list /> and JobRegistry to bring them all together.

    What I wanted to do is on registration of the new job, add one additional JobExecutionListener to the Job so it can put a message on an SI channel on success/fail. Thus no extra work on the side of Job developer, no need to know about SI or import this Listener as a Service.

    CompositeJobExecutionListener is private in AbstractJob. I can get around this issues right now by decorating Simple/Flow job but don't want to loose namespace support.
Working...
X