From 9dccfa4a8a03a0327b3daa7881bf4d2206225715 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 28 Mar 2007 11:15:22 +0000 Subject: [PATCH] fixed the assembly so that the activemq broker script works again. Now moved from a Jetty snapshot to a release (6.1.2rc2) and also made BrokerService.setDataDirectory(String) take a string to avoid strange Spring errors we were getting git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@523279 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/broker/BrokerService.java | 27 ++++++++++++----- activemq-optional/pom.xml | 12 ++++---- assembly/src/release/conf/activemq.xml | 4 +-- .../activemq/config/BrokerXmlConfigTest.java | 2 ++ pom.xml | 30 +------------------ 5 files changed, 31 insertions(+), 44 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index a39ba9ab42..23408c4f72 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -111,7 +111,7 @@ public class BrokerService implements Service, Serializable { private boolean useLoggingForShutdownErrors = false; private boolean shutdownOnMasterFailure = false; private String brokerName = DEFAULT_BROKER_NAME; - private File dataDirectory; + private File dataDirectoryFile; private File tmpDataDirectory; private Broker broker; private BrokerView adminView; @@ -563,16 +563,16 @@ public class BrokerService implements Service, Serializable { return persistenceFactory; } - public File getDataDirectory() { - if (dataDirectory == null) { - dataDirectory = new File(IOHelper.getDefaultDataDirectory()); + public File getDataDirectoryFile() { + if (dataDirectoryFile == null) { + dataDirectoryFile = new File(IOHelper.getDefaultDataDirectory()); } - return dataDirectory; + return dataDirectoryFile; } public File getBrokerDataDirectory() { String brokerDir = getBrokerName().replaceAll("[^a-zA-Z0-9\\.\\_\\-]", "_"); - return new File(getDataDirectory(), brokerDir); + return new File(getDataDirectoryFile(), brokerDir); } @@ -583,10 +583,21 @@ public class BrokerService implements Service, Serializable { * @param dataDirectory * the directory to store data files */ - public void setDataDirectory(File dataDirectory) { - this.dataDirectory = dataDirectory; + public void setDataDirectory(String dataDirectory) { + setDataDirectoryFile(new File(dataDirectory)); } + /** + * Sets the directory in which the data files will be stored by default for + * the JDBC and Journal persistence adaptors. + * + * @param dataDirectoryFile + * the directory to store data files + */ + public void setDataDirectoryFile(File dataDirectoryFile) { + this.dataDirectoryFile = dataDirectoryFile; + } + /** * @return the tmpDataDirectory */ diff --git a/activemq-optional/pom.xml b/activemq-optional/pom.xml index 060a2a131d..c9b96d3594 100755 --- a/activemq-optional/pom.xml +++ b/activemq-optional/pom.xml @@ -132,12 +132,14 @@ stax-api true - + + + log4j + log4j + compile + true + - - - - diff --git a/assembly/src/release/conf/activemq.xml b/assembly/src/release/conf/activemq.xml index 8aecc8cf4e..6a5befcb42 100755 --- a/assembly/src/release/conf/activemq.xml +++ b/assembly/src/release/conf/activemq.xml @@ -98,8 +98,8 @@ - - + + diff --git a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java index 1a83e285a7..4dc56face9 100755 --- a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java +++ b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java @@ -24,6 +24,7 @@ import org.apache.activemq.broker.BrokerService; import javax.jms.Connection; import javax.jms.JMSException; +import java.io.File; /** * @version $Revision: 1.2 $ @@ -55,6 +56,7 @@ public class BrokerXmlConfigTest extends TestCase { protected void setUp() throws Exception { System.setProperty("activemq.base", "target"); + new File("target/data").mkdirs(); broker = BrokerFactory.createBroker("xbean:src/release/conf/activemq.xml"); } diff --git a/pom.xml b/pom.xml index 1db81f3c59..d2264880bd 100755 --- a/pom.xml +++ b/pom.xml @@ -53,19 +53,11 @@ 0.1.8 1.7.2.2 1.0 - - - 6.1-SNAPSHOT - 1.0.1 3.8.1 2.0 - 1.2.12 + 1.2.14 10.1.3.1 1.0 2.2 @@ -144,16 +136,6 @@ false - - - - - codehaus.snapshots - Codehaus Snapshot Repository - http://snapshots.repository.codehaus.org/ - - true - @@ -170,16 +152,6 @@ false - - - - - codehaus.snapshots - Codehaus Snapshot Repository - http://snapshots.repository.codehaus.org/ - - true -