https://issues.apache.org/jira/browse/AMQ-3088 - scheduled page error when scheduler is off

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1053683 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-12-29 17:48:58 +00:00
parent 663d5db7f1
commit d0a1a001a3
3 changed files with 23 additions and 0 deletions

View File

@ -19,6 +19,9 @@
<title>Messages Scheduled for Future Delivery</title>
</head>
<body>
<c:choose>
<c:when test="${requestContext.brokerQuery.jobSchedulerStarted}">
<div style="margin-top: 5em">
<table id="Jobs" class="sortable autostripe">
<thead>
@ -51,6 +54,14 @@
</c:forEach>
</tbody>
</table>
</c:when>
<c:otherwise>
<div style="margin-top: 5em">
<p align="center">Scheduler not started!</p>
</div>
</c:otherwise>
</c:choose>
</body>
</html>

View File

@ -203,4 +203,6 @@ public interface BrokerFacade {
*/
Collection<JobFacade> getScheduledJobs() throws Exception;
boolean isJobSchedulerStarted();
}

View File

@ -217,4 +217,14 @@ public abstract class BrokerFacadeSupport implements BrokerFacade {
}
return result;
}
public boolean isJobSchedulerStarted() {
try {
JobSchedulerViewMBean jobScheduler = getJobScheduler();
return true;
} catch (Exception e) {
return false;
}
}
}