[jboss-cvs] JBoss Messaging SVN: r7301 - trunk/src/main/org/jboss/messaging/core/journal/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 10 21:55:14 EDT 2009


Author: clebert.suconic at jboss.com
Date: 2009-06-10 21:55:14 -0400 (Wed, 10 Jun 2009)
New Revision: 7301

Modified:
   trunk/src/main/org/jboss/messaging/core/journal/impl/AIOSequentialFileFactory.java
Log:
fix

Modified: trunk/src/main/org/jboss/messaging/core/journal/impl/AIOSequentialFileFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/journal/impl/AIOSequentialFileFactory.java	2009-06-10 22:27:05 UTC (rev 7300)
+++ trunk/src/main/org/jboss/messaging/core/journal/impl/AIOSequentialFileFactory.java	2009-06-11 01:55:14 UTC (rev 7301)
@@ -207,7 +207,7 @@
       buffersControl.stop();
       timedBuffer.stop();
    }
-   
+
    protected void finalize()
    {
       this.stop();
@@ -225,7 +225,7 @@
 
       /** During reload we may disable/enable buffer reuse */
       private boolean enabled = true;
-      
+
       private boolean stopped = false;
 
       final BufferCallback callback = new LocalBufferCallback();
@@ -296,7 +296,7 @@
          stopped = true;
          clearPoll();
       }
-      
+
       public synchronized void clearPoll()
       {
          ByteBuffer reusedBuffer;
@@ -313,18 +313,17 @@
          {
             synchronized (ReuseBuffersController.this)
             {
-               if (stopped)
+
+               if (enabled)
                {
-                  System.out.println("Releasing buffer after stopped");
-                  releaseBuffer(buffer);
-               }
-               else
-               {
-                  
-                  if (enabled)
+                  if (stopped)
                   {
+                     releaseBuffer(buffer);
+                  }
+                  else
+                  {
                      bufferReuseLastTime = System.currentTimeMillis();
-      
+
                      // If a buffer has any other than the configured bufferSize, the buffer
                      // will be just sent to GC
                      if (buffer.capacity() == bufferSize)




More information about the jboss-cvs-commits mailing list