Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EAF51177D for ; Fri, 21 Feb 2014 17:21:22 +0000 (UTC) Received: (qmail 32200 invoked by uid 500); 21 Feb 2014 17:21:21 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 31881 invoked by uid 500); 21 Feb 2014 17:21:20 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 31837 invoked by uid 99); 21 Feb 2014 17:21:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Feb 2014 17:21:19 +0000 Date: Fri, 21 Feb 2014 17:21:19 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-5069) scheduled delivery not work when persistent="false" schedulerSupport="true" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-5069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908545#comment-13908545 ] Timothy Bish commented on AMQ-5069: ----------------------------------- When persistence is disabled the JobScheduler should not be used as it is a persistent store. If you want to implement an in memory JobScheduler then this could be used when persistence is disabled. On trunk (5.10-SNAPSHOT) you can configure in a JobSchedulerStore and the Broker will use your configured store whether persistence is disabled or not. > scheduled delivery not work when persistent="false" schedulerSupport="true" > ---------------------------------------------------------------------------- > > Key: AMQ-5069 > URL: https://issues.apache.org/jira/browse/AMQ-5069 > Project: ActiveMQ > Issue Type: Wish > Components: Broker > Affects Versions: 5.9.0 > Reporter: Bo Xu > > with version 5.9, when configured in activemq.xml with: persistent="false" schedulerSupport="true", scheduled delivery does NOT work. The message is immediately ready for delivery, > Here is my fix, please review it and make it official. > > diff ../activemq-parent-5.9.0/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java My_BrokerService.java > 647c647 > < LOG.info("Apache ActiveMQ {} ({}, {}) is starting", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId }); > --- > > LOG.info("Modified Apache ActiveMQ {} ({}, {}) is starting", new Object[]{ getBrokerVersion(), getBrokerName(), brokerId }); > 1806c1806,1807 > < if (!isSchedulerSupport()) { > --- > > //if (!isSchedulerSupport()) @BOXU: always true, if !isPersistent() > > if (!this.schedulerSupport) { > 1814,1816c1815 > < if (!isPersistent()) { > < return null; > < } > --- > > if (isPersistent()) { > 1818,1821c1817,1835 > < try { > < PersistenceAdapter pa = getPersistenceAdapter(); > < if (pa != null && pa instanceof JobSchedulerStore) { > < this.jobSchedulerStore = (JobSchedulerStore) pa; > --- > > try { > > PersistenceAdapter pa = getPersistenceAdapter(); > > if (pa != null && pa instanceof JobSchedulerStore) { > > this.jobSchedulerStore = (JobSchedulerStore) pa; > > configureService(jobSchedulerStore); > > return this.jobSchedulerStore; > > } > > //else return null; > > } catch (IOException e) { > > throw new RuntimeException(e); > > } > > } > > else { > > LOG.info("Creating user configured jobSchedulerStore, fixed by BOXU, Paypal"); > > > > try { > > String clazz = "org.apache.activemq.store.kahadb.scheduler.JobSchedulerStoreImpl"; > > jobSchedulerStore = (JobSchedulerStore) getClass().getClassLoader().loadClass(clazz).newInstance(); > > jobSchedulerStore.setDirectory(getSchedulerDirectoryFile()); > 1823c1837,1840 > < return this.jobSchedulerStore; > --- > > jobSchedulerStore.start(); > > LOG.info("JobScheduler using directory: {}", getSchedulerDirectoryFile()); > > } catch (Exception e) { > > throw new RuntimeException(e); > 1825,1837d1841 > < } catch (IOException e) { > < throw new RuntimeException(e); > < } > < > < try { > < String clazz = "org.apache.activemq.store.kahadb.scheduler.JobSchedulerStoreImpl"; > < jobSchedulerStore = (JobSchedulerStore) getClass().getClassLoader().loadClass(clazz).newInstance(); > < jobSchedulerStore.setDirectory(getSchedulerDirectoryFile()); > < configureService(jobSchedulerStore); > < jobSchedulerStore.start(); > < LOG.info("JobScheduler using directory: {}", getSchedulerDirectoryFile()); > < } catch (Exception e) { > < throw new RuntimeException(e); -- This message was sent by Atlassian JIRA (v6.1.5#6160)