[jboss-user] [JBoss Messaging] - Re: PingTimerTask broken pipe

bob_walker99 do-not-reply at jboss.com
Fri Jul 6 07:27:37 EDT 2007


Hi Tim,

I think I've nailed it.

I built a test case, and of course it worked just fine, which obviously pointed to my application code as the culprit. I've made a few changes but there /seems/ to have been 2 main points of failure:

1) In one of my listeners, I was holding on to a reference to the message received in onMessage unnecessarily, and even though this was going out of scope it seems that it wasn't getting garbage collected. I've processed the text much earlier and aggressively nulled out the reference now and it seems to hold up - it processed 20,000 messages yesterday without a resource hit to either the client or server.

2) it seems a NPE in my client code was breaking the connection - because I had no RuntimeException handling code and this was not happening "out-of-band" for my ExceptionListener to handle, there was nowhere for me to close my connection. 

So, it was my fault, my apologies. 

However, are these 2 situations reasonable behaviour? I'm guessing that because I've set the FullSize/PageSize/DownCacheSize on the queue quite low, that these messsages are being backed by files - when the onMessage completes and the message goes out of scope - are these files always getting closed/cleaned up? Although my code was holding onto the reference longer than it should, it did /eventually/ going out of scope.

Also, obviously NPEs should either not happen at all or be handled/anticipated in my client code - but should the server be able to dispose a connection if it happens? 

I'm not saying this is how it should work, just my thoughts; feel free to shoot me down.

Thanks for your time and effort on this,

Best regards,

Bob

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061229#4061229

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061229



More information about the jboss-user mailing list