mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
9bb3b0cbf6
commit
9dccfa4a8a
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -132,12 +132,14 @@
|
|||
<artifactId>stax-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -98,8 +98,8 @@
|
|||
</connectors>
|
||||
|
||||
<handlers>
|
||||
<webAppContext contextPath="/admin" resourceBase="webapps/admin" logUrlOnStart="true" />
|
||||
<webAppContext contextPath="/demo" resourceBase="webapps/demo" logUrlOnStart="true" />
|
||||
<webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
|
||||
<webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
|
||||
</handlers>
|
||||
</jetty>
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
30
pom.xml
30
pom.xml
|
@ -53,19 +53,11 @@
|
|||
<howl-version>0.1.8</howl-version>
|
||||
<hsqldb-version>1.7.2.2</hsqldb-version>
|
||||
<jdom-version>1.0</jdom-version>
|
||||
|
||||
<!-- replace with one of these when available
|
||||
TODO - zap the jetty snapshot repo when we do this!!
|
||||
|
||||
<jetty-version>6.1.2</jetty-version>
|
||||
<jetty-version>6.1.2rc2</jetty-version>
|
||||
-->
|
||||
<jetty-version>6.1-SNAPSHOT</jetty-version>
|
||||
|
||||
<jmock-version>1.0.1</jmock-version>
|
||||
<junit-version>3.8.1</junit-version>
|
||||
<jxta-version>2.0</jxta-version>
|
||||
<log4j-version>1.2.12</log4j-version>
|
||||
<log4j-version>1.2.14</log4j-version>
|
||||
<org-apache-derby-version>10.1.3.1</org-apache-derby-version>
|
||||
<org-apache-geronimo-specs-version>1.0</org-apache-geronimo-specs-version>
|
||||
<org-apache-maven-surefire-plugin-version>2.2</org-apache-maven-surefire-plugin-version>
|
||||
|
@ -144,16 +136,6 @@
|
|||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
|
||||
<!-- TODO REMOVE ME ASAP when 6.1.2rc goes out -->
|
||||
<repository>
|
||||
<id>codehaus.snapshots</id>
|
||||
<name>Codehaus Snapshot Repository</name>
|
||||
<url>http://snapshots.repository.codehaus.org/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
@ -170,16 +152,6 @@
|
|||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
|
||||
<!-- TODO REMOVE ME ASAP when 6.1.2rc goes out -->
|
||||
<pluginRepository>
|
||||
<id>codehaus.snapshots</id>
|
||||
<name>Codehaus Snapshot Repository</name>
|
||||
<url>http://snapshots.repository.codehaus.org/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
|
|
Loading…
Reference in New Issue