Does not sound like it is working as planned. Do you have a test program
that demonstrates this behavior?
On Jan 10, 2008 7:40 PM, Luis Neves <[EMAIL PROTECTED]> wrote:
>
>
> Hello all,
>
> I'm running some tests with slow clients connected to a server that uses
> the
> recent WriteThrottleFilter with a BLOCK policy and I'm having some
> unexpected
> behaviour.
> What I want is for the server to block the sending of messages when the
> write
> queue is full, but, I do not want to block indefinitely, I want for the
> server
> to discard the message after a "write timeout".
> I thought this was doable using the
> WriteFuture.awaitUninterruptibly(long) method.
>
> Here's an example:
>
> long beginWrite = System.currentTimeMillis();
> WriteFuture wf = ios.write(response);
> wf.awaitUninterruptibly(10);
> long endWrite = System.currentTimeMillis();
> long duration = endWrite - beginWrite;
> if (duration>20)
> {
> System.out.println("Time for write:" + duration + " ms");
> }
>
>
> I was expecting to never see the message in the console. Not only do I get
> the
> message but also the "duration" can be as much as 10 times larger than the
> specified timeout.
>
> Is this a bug or am I misunderstanding the API?
>
>
> --
>
> /**
> * Luis Neves
> * @e-mail: [EMAIL PROTECTED]
> * @xmpp: [EMAIL PROTECTED]
> * @tlm: +351 962 057 656
> */
>
--
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.