Noel J. Bergman wrote:
Stefano Bagnara wrote:

Noel J. Bergman wrote:
OK, I believe that I have a "simple" solution, which I will try and
hopefully commit tomorrow.

I'm going to push the filter further into the code where we can
effect the cache directly.

This sound similar to my first approach:

I changed getNextPendingMessage to getNextAvailableMessage(Filter) and
moved the accept inside the method so that I have the accept in the same
code where we manage the pendingMessages cache.

I'm pushing the filter all the way down to where we actually populate the
cache, so that loadPendingMessages(Filter) will populate the cache with up
to the first <maxcache> *accepted* messages from the ResultSet, rather than
consume the cache with currently unacceptable messages.

        --- Noel

Yes, my first try. But the problem is the waitTime calculation.
To calculate the waitTime the filter have to be called ALSO for each unacceptable message in the spool and if you remove them from the cache it won't know how much to wait... How did you solve this?

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to