activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1053683 - in /activemq/trunk: activemq-web-console/src/main/webapp/scheduled.jsp activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
Date Wed, 29 Dec 2010 17:48:59 GMT
Author: dejanb
Date: Wed Dec 29 17:48:58 2010
New Revision: 1053683

URL: http://svn.apache.org/viewvc?rev=1053683&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3088 - scheduled page error when scheduler is off

Modified:
    activemq/trunk/activemq-web-console/src/main/webapp/scheduled.jsp
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java

Modified: activemq/trunk/activemq-web-console/src/main/webapp/scheduled.jsp
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/webapp/scheduled.jsp?rev=1053683&r1=1053682&r2=1053683&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/webapp/scheduled.jsp (original)
+++ activemq/trunk/activemq-web-console/src/main/webapp/scheduled.jsp Wed Dec 29 17:48:58
2010
@@ -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>
 	

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java?rev=1053683&r1=1053682&r2=1053683&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java (original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java Wed
Dec 29 17:48:58 2010
@@ -203,4 +203,6 @@ public interface BrokerFacade {
      */
     Collection<JobFacade> getScheduledJobs() throws Exception;
 
+    boolean isJobSchedulerStarted();
+
 }
\ No newline at end of file

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java?rev=1053683&r1=1053682&r2=1053683&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
(original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
Wed Dec 29 17:48:58 2010
@@ -217,4 +217,14 @@ public abstract class BrokerFacadeSuppor
         }
         return result;
     }
+
+
+    public boolean isJobSchedulerStarted() {
+        try {
+            JobSchedulerViewMBean jobScheduler = getJobScheduler();
+            return true;
+        } catch (Exception e) {
+            return false;
+        }
+    }
 }



Mime
View raw message