activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Dean <>
Subject Re: ajax handling fast messages
Date Wed, 22 Dec 2010 23:12:30 GMT

On Dec 17, 2010, at 1:14 PM, Alex Dean wrote:

> On Dec 16, 2010, at 5:33 PM, Alex Dean wrote:
>> I'll get a useful test written up tomorrow morning, and create a new JIRA issue if
Jeff doesn't beat me to it.
> I've created for this problem.
> My testing so far is inconsistent.  If I publish 5 messages quickly via JavaScript, then
a separate JavaScript client sometimes receives 1 of the messages, and sometimes two of them.
> If I publish 3 messages in a JUnit test, my http client can either receive 0 messages
or all 3 messages.  That's after re-running the same tests multiple times, with no code changes
inbetween test runs.  Sometimes I get messages, and sometimes I don't.
> JavaScript & Java test files & sample output are attached to the ticket.  I don't
feel like I'm any closer to a solution, but hopefully this helps others reproduce the issue.

I think the issue may be that AjaxListener's constructor does not set an initial value for
lastAccess.  By setting "this.lastAccess = System.currentTimeMillis();" in the constructor,
my test always pass.  I want to do more testing, since I don't have very good test coverage
yet, but this seems promising.

One question for the core guys... Why does the code always surround debugging log statements
with an if()?
  if (LOG.isDebugEnabled()) {
    LOG.debug( "blah" );
Is it OK to just call "LOG.debug()" without the if()?

View raw message