Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
View | Details | Raw Unified | Return to bug 958
Collapse All | Expand All

(-)a/src/org/jacorb/orb/BufferManager.java (-4 / +23 lines)
Lines 30-35 import org.jacorb.orb.buffermanager.BufferManagerExpansionPolicy; Link Here
30
import org.jacorb.orb.buffermanager.DefaultExpansionPolicy;
30
import org.jacorb.orb.buffermanager.DefaultExpansionPolicy;
31
import org.omg.CORBA.INTERNAL;
31
import org.omg.CORBA.INTERNAL;
32
import org.omg.CORBA.NO_MEMORY;
32
import org.omg.CORBA.NO_MEMORY;
33
import org.slf4j.Logger;
33
34
34
/**
35
/**
35
 * A BufferManager is used to share a pool of buffers and to implement
36
 * A BufferManager is used to share a pool of buffers and to implement
Lines 97-108 public class BufferManager extends AbstractBufferManager Link Here
97
     */
98
     */
98
    private BufferManagerExpansionPolicy expansionPolicy;
99
    private BufferManagerExpansionPolicy expansionPolicy;
99
100
101
    private final Logger logger;
102
100
    /**
103
    /**
101
     * used to create the singleton ORB buffermanager
104
     * used to create the singleton ORB buffermanager
102
     * @param configuration
105
     * @param configuration
103
     */
106
     */
104
    public BufferManager(Configuration configuration)
107
    public BufferManager(Configuration configuration)
105
    {
108
    {
109
        logger = configuration.getLogger ("jacorb.orb.buffermanager");
110
106
        try
111
        try
107
        {
112
        {
108
           this.time = configuration.getAttributeAsInteger("jacorb.bufferManagerMaxFlush", 0);
113
           this.time = configuration.getAttributeAsInteger("jacorb.bufferManagerMaxFlush", 0);
Lines 111-117 public class BufferManager extends AbstractBufferManager Link Here
111
        }
116
        }
112
        catch (ConfigurationException ex)
117
        catch (ConfigurationException ex)
113
        {
118
        {
114
           configuration.getLogger ("buffer").error ("Error configuring the BufferManager", ex);
119
           logger.error ("Error configuring the BufferManager", ex);
115
           throw new INTERNAL ("Unable to configure the BufferManager");
120
           throw new INTERNAL ("Unable to configure the BufferManager");
116
        }
121
        }
117
122
Lines 333-341 public class BufferManager extends AbstractBufferManager Link Here
333
                    }
338
                    }
334
                }
339
                }
335
340
336
                final Collection s = bufferPool[ log_curr-MIN_CACHE ];
341
                int expected = (1 << log_curr + 1) - 1;
337
342
                if (current.length != expected)
338
                doReturnBuffer(s, current, threshold);
343
                  {
344
                    if (logger.isDebugEnabled())
345
                      {
346
                        logger.debug ("returnBuffer, log  = " + log_curr +
347
                                      " got length " +
348
                                      Integer.toHexString (current.length) +
349
                                      " expected length " +
350
                                      Integer.toHexString (expected));
351
                      }
352
                  }
353
                else
354
                  {
355
                    final Collection s = bufferPool[ log_curr-MIN_CACHE ];
356
                    doReturnBuffer(s, current, threshold);
357
                  }
339
            }
358
            }
340
        }
359
        }
341
    }
360
    }

Return to bug 958