shikhar97gupta commented on code in PR #937:
URL: https://github.com/apache/activemq/pull/937#discussion_r1036262779
##########
activemq-broker/src/main/java/org/apache/activemq/broker/scheduler/Job.java:
##########
@@ -78,4 +80,6 @@ public interface Job {
*/
public int getExecutionCount();
+ public abstract ActiveMQDestination getDest();
Review Comment:
Something like this?
getAllJobs JMX operation:
```diff
public class JobSchedulerView implements JobSchedulerViewMBean {
public TabularData getAllJobs(String startTime, String finishTime) throws
Exception {
OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
CompositeType ct = factory.getCompositeType();
TabularType tt = new TabularType("Scheduled Jobs", "Scheduled
Jobs", ct, new String[] { "jobId" });
TabularDataSupport rc = new TabularDataSupport(tt);
long start = JobSupport.getDataTime(startTime);
long start = JobSupport.getDataTime(startTime);
long finish = JobSupport.getDataTime(finishTime);
List<Job> jobs = this.jobScheduler.getAllJobs(start, finish);
+ OpenWireFormat wireFormat = new OpenWireFormat();
for (Job job : jobs) {
+ Message msg = (Message) wireFormat.unmarshal(new
ByteSequence(job.getPayload()));
+ ActiveMQDestination destination = (ActiveMQDestination)
msg.getJMSDestination();
+ job.setDestinationName(destination.getPhysicalName());
rc.put(new CompositeDataSupport(ct, factory.getFields(job)));
}
return rc;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]