activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r517567 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq: AMQMessageStore.java AMQPersistenceAdapter.java
Date Tue, 13 Mar 2007 06:56:09 GMT
Author: rajdavies
Date: Mon Mar 12 23:56:08 2007
New Revision: 517567

URL: http://svn.apache.org/viewvc?view=rev&rev=517567
Log:
flush messages into journal on stop

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.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/store/amq/AMQMessageStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java?view=diff&rev=517567&r1=517566&r2=517567
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java
Mon Mar 12 23:56:08 2007
@@ -96,7 +96,6 @@
      */
     public void addMessage(ConnectionContext context,final Message message) throws IOException{
         final MessageId id=message.getMessageId();
-        
         final Location location=peristenceAdapter.writeCommand(message,message.isResponseRequired());
         if(!context.isInTransaction()){
             if(debug)
@@ -341,8 +340,7 @@
                     try{
                         referenceStore.removeMessage(transactionTemplate.getContext(),ack);
                     }catch(Throwable e){
-                        e.printStackTrace();
-                        log.debug("Message could not be removed from long term store: "+e.getMessage(),e);
+                        log.warn("Message could not be removed from long term store: "+e.getMessage(),e);
                     }
                 }
             }
@@ -407,6 +405,7 @@
     }
 
     public void stop() throws Exception{
+        flush();
         asyncWriteTask.shutdown();
         referenceStore.stop();
     }

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?view=diff&rev=517567&r1=517566&r2=517567
==============================================================================
--- 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
Mon Mar 12 23:56:08 2007
@@ -201,6 +201,7 @@
     }
 
     public void stop() throws Exception{
+      
         if(!started.compareAndSet(true,false))
             return;
         this.usageManager.removeUsageListener(this);
@@ -236,10 +237,7 @@
 
     /**
      * When we checkpoint we move all the journalled data to long term storage.
-     * 
-     * @param stopping
-     * 
-     * @param b
+     * @param sync    
      */
     public void checkpoint(boolean sync){
         try{
@@ -268,7 +266,7 @@
     /**
      * This does the actual checkpoint.
      * 
-     * @return
+     * @return true if successful
      */
     public boolean doCheckpoint(){
         CountDownLatch latch=null;



Mime
View raw message