mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@603863 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
92bbce1d6f
commit
a3b4c5a358
|
@ -724,6 +724,7 @@ public class BrokerService implements Service {
|
|||
*/
|
||||
public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) {
|
||||
this.persistenceAdapter = persistenceAdapter;
|
||||
configureService(this.persistenceAdapter);
|
||||
}
|
||||
|
||||
public TaskRunnerFactory getTaskRunnerFactory() {
|
||||
|
|
|
@ -140,6 +140,7 @@ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener,
|
|||
|
||||
public void setBrokerService(BrokerService brokerService) {
|
||||
this.brokerService = brokerService;
|
||||
Thread.dumpStack();
|
||||
}
|
||||
|
||||
public synchronized void start() throws Exception {
|
||||
|
@ -149,8 +150,8 @@ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener,
|
|||
if (this.directory == null) {
|
||||
if (brokerService != null) {
|
||||
this.directory = brokerService.getBrokerDataDirectory();
|
||||
|
||||
} else {
|
||||
|
||||
this.directory = new File(IOHelper.getDefaultDataDirectory(), IOHelper.toFileSystemSafeName(brokerName));
|
||||
this.directory = new File(directory, "amqstore");
|
||||
this.directoryPath=directory.getAbsolutePath();
|
||||
|
@ -159,10 +160,10 @@ public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener,
|
|||
if (this.directoryArchive == null) {
|
||||
this.directoryArchive = new File(this.directory,"archive");
|
||||
}
|
||||
this.directory.mkdirs();
|
||||
lockFile = new RandomAccessFile(new File(directory, "lock"), "rw");
|
||||
lock();
|
||||
LOG.info("AMQStore starting using directory: " + directory);
|
||||
this.directory.mkdirs();
|
||||
LOG.info("AMQStore starting using directory: " + directory);
|
||||
if (archiveDataLogs) {
|
||||
this.directoryArchive.mkdirs();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue