September 21st, 2007 jasonk
I’m not going to recommend you read all the books you can get your hands on, though you could if you wanted to. These are the tips they don’t teach you in books or in school. From deleting code and refusing to comment, through to deliberately throwing exceptions, these tidbits of experience will make you a faster and smarter developer. And that’s what you want, right? Read on ..
Read the rest of this entry »
Posted in software, java | 4 Comments »
September 11th, 2007 jasonk
I was working with Lingo (a RPC over JMS mechanism for Spring) last week and we uncovered an issue in which Lingo threads were not closing properly. The problem was uncovered since our JUnit tests were running fine, but any application which used a main() method had to call System.exit() to finish, which is ugly. Additionally, our Tomcat server application would not close, there were a number of threads left around even after the Spring context and ActiveMQ broker had been taken down.
With a little effort I isolated the code to a mistake in the Lingo MultiplexingRequestor. The MultiplexingRequestor uses threadpool internally, and the close() method is not overridden, which causes the threadpool (and attached threads) to linger indefinitely.
The bug and solution code has been filed as LINGO-44. To use this, simply copy the MultiplexingRequestor to your local project and ensure the updated code comes *ahead* of lingo-1.3.jar in your classpath.
Posted in software, java, lingo, jms | 1 Comment »