activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r603863 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: broker/BrokerService.java store/amq/AMQPersistenceAdapter.java
Date Thu, 13 Dec 2007 09:19:37 GMT
Author: rajdavies
Date: Thu Dec 13 01:19:36 2007
New Revision: 603863

URL: http://svn.apache.org/viewvc?rev=603863&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1507

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=603863&r1=603862&r2=603863&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Thu Dec 13 01:19:36 2007
@@ -724,6 +724,7 @@
      */
     public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) {
         this.persistenceAdapter = persistenceAdapter;
+        configureService(this.persistenceAdapter);
     }
 
     public TaskRunnerFactory getTaskRunnerFactory() {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?rev=603863&r1=603862&r2=603863&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
Thu Dec 13 01:19:36 2007
@@ -140,6 +140,7 @@
 
     public void setBrokerService(BrokerService brokerService) {
         this.brokerService = brokerService;
+        Thread.dumpStack();
     }
 
     public synchronized void start() throws Exception {
@@ -149,8 +150,8 @@
         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 @@
         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();
         }



Mime
View raw message