-
1. Re: How to Stop/Start Scheduling Programmtically?
dakbari Sep 25, 2009 5:17 AM (in response to dakbari)I've found a start() and stop() method in org.jboss.soa.esb.schedule.ScheduleProvider but they are all deprecated.
What to use instead? -
2. Re: How to Stop/Start Scheduling Programmtically?
dakbari Sep 25, 2009 5:53 AM (in response to dakbari)Or did that start/stop responsibility shift to org.jboss.soa.esb.listeners.ScheduleListener?
-
3. Re: How to Stop/Start Scheduling Programmtically?
kconner Sep 25, 2009 11:55 AM (in response to dakbari)Yes, they should now be implementations of ScheduleListener and tied into the lifecycle events.
Each listener has an MBean associated with it, accessible via JMX and through which the listener can be stopped/started.
You can also invoke these methods through jmx-console and through the admin console.
Kev -
4. Re: How to Stop/Start Scheduling Programmtically?
dakbari Sep 29, 2009 3:42 AM (in response to dakbari)Thanks Kevin
-
5. Re: How to Stop/Start Scheduling Programmtically?
sukhdesi Aug 30, 2010 9:54 PM (in response to kconner)How can I configure mbean associated with listener. Can you please send configuration.
-
6. Re: How to Stop/Start Scheduling Programmtically?
tfennelly Aug 31, 2010 4:52 AM (in response to sukhdesi)sukhdev singh wrote:
How can I configure mbean associated with listener. Can you please send configuration.
Depends on what you mean by "configure" but:
- The MBean instance is automatically configured in JMX, so nothing to configure in terms of creating the instance.
- As fat as stopping/starting... you can use the JMX Console to do it manually (see AS docs), or use the JMX API to do it programmatically (see AS and Javadoc API docs).
-
7. Re: How to Stop/Start Scheduling Programmtically?
hauch Aug 31, 2010 7:10 AM (in response to tfennelly)Another approach is to let your MessageComposer return null if you don't want the service to run.
<code>
public Message composeMessage() throws SchedulingException {if (ignore()) {logger.warn("Scheduled process ignored due to configuration");return null; // not processing of the pipeline - see comment on ScheduledEventMessageComposer}return MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);}</code>