PriorityBlockingQueue is Thread-safe and unbounded .if this queue isn't unbound 
then throw an exception.
http://java.sun.com/javase/6/docs/api/java/util/PriorityQueue.html
http://java.sun.com/javase/6/docs/api/java/util/concurrent/PriorityBlockingQueue.html

--- On Mon, 4/28/08, Steve Ulrich <[EMAIL PROTECTED]> wrote:

> From: Steve Ulrich <[EMAIL PROTECTED]>
> Subject: AW: why ConcurrentLinkedQueue$node is wipe off from momory by 
> garbage collection? no---signature
> To: "[email protected]" <[email protected]>, "[EMAIL PROTECTED]" <[EMAIL 
> PROTECTED]>
> Date: Monday, April 28, 2008, 11:52 AM
> Hi!
> 
> You're replacing the ConcurrentLinkedQueue (a
> nonblocking, thread safe queue) with a a blocking (but NOT
> thread safe) queue. So there may be some unpredictable
> results and I wouldn't do that.
> 
> As Emmanuel pointed out, it is likely that your server
> can't process mass of incomming messages. Try to
> configure a proper thread model (Add an ExecutorFilter at
> you filter chain, to loosen your long running processings
> from the IO threads) and carefully read the overload
> prevention posts at mailing list archives. This should help
> to prevent this situations.
> 
> hth
> 
> Steve Ulrich
> 
> -----Ursprüngliche Nachricht-----
> Von: Maziyar Eslamieh [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 28. April 2008 08:04
> An: [email protected]
> Betreff: Re: why ConcurrentLinkedQueue$node is wipe off
> from momory by garbage collection?
> 
> I mean that why doesn't garbage collector throw out of
> memory.
> I have a solution for this problem please pay attention to
> this solution because of this problem is very important:
> In ConcurrentLinkedQueue  when a object insert to this
> queue an object of Node class is created and object insert
> to this Node object.
> In MINA2 in AbstractPollingIoProcessor class where flush()
> method call
>  T session = flushingSessions.poll();
> object is removed  from queue but garbage collector
> can't throw out object of Node class from memory
> specially when about 600 message per second have to send
> and received by MINA2.
> So for this problem i replace PriorityBlockingQueue instead
> of ConcurrentLinkedQueue  .
> I test this and operation Mina2 is correct
> I want to ask that this change is true or not.
> please answer to me.
> 
> 
> In MINA2 in AbstractPollingIoProcessor class where
> private final Queue<T> flushingSessions =new
> ConcurrentLinkedQueue<T>(); instead of
> ConcurrentLinkedQueue
> 
> 
> --- On Sun, 4/27/08, Maziyar Eslamieh
> <[EMAIL PROTECTED]> wrote:
> 
> > From: Maziyar Eslamieh <[EMAIL PROTECTED]>
> > Subject: why ConcurrentLinkedQueue$node is wipe off
> from momory by garbage collection?
> > To: [email protected]
> > Date: Sunday, April 27, 2008, 10:21 AM
> > please help me
> >
> > We have a sender and receiver server which uses MINA2.
> We
> > should send and receiver 600 message per second. As
> this
> > server receives messages , the number of
> > ConcurrentLinkedQueue$node object increases in memory.
> > I want to know why the number of this object increases
> and
> > why it is wipe off from momory by garbage collection?
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now.
> >
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
> 
>      
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now. 
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Reply via email to