Project

General

Profile

Best way to progamically start/stop a component?

Gabriel Rossetti
Added over 3 years ago

Hi all,

I need to be able to start & stop components, from another component. What is the best way to do this?

Thanks,

Gabriel


Replies (2)

Added by Gabriel Rossetti over 3 years ago

In the end I did (in java) like the CompManager admin script does. I think I found a bug in it BTW:

In the "@if (action == ACTION_REMOVE)@" part you forget to do:

mrProps.remove(MessageRouterConfig.MSG_RECEIVERS_PROP_KEY + comp_name + ".class")

Added by Wojciech Kapcia TigaseTeam about 3 years ago

Provided excerpt won't work (we would need to get component class first) but - it's not really needed - MessageRouter reinitializes all components based on the list of component names so it's enough to create new list of active components and based on that reload MR.

    (1-2/2)