Posted by F
Tue, 27 Dec 2005 03:19:00 GMT
After nearly two years of procrastination, I finally decided to spend
some time on wrapping things up and putting
AntDoclet online for public
consumption.
AntDoclet is a little tool for documenting
Ant Tasks. It automatically generates HTML and LaTeX documentation from the source code of your Tasks.
I wrote it initially in January 2004, for documenting the Ant tasks
provided with the FuegoBPM product. Recently, I
needed to improve it a bit, and decided to make it public.
Thanks to Fuego Inc. –my employer– who allowed
me to release AntDoclet.
Posted in Java, Developer Toolbox | no comments | no trackbacks
Posted by F
Fri, 25 Nov 2005 04:00:00 GMT
I am surprised by the high number of Java developers I meet that do
not know what a Java Thread Dump is or how to generate one. I find it
a very powerful tool, and it is always available as part of the JVM.
I haven’t played much with Java 5 yet, but it comes with jstack, a new tool that makes it easier to generate thread dumps.
Earlier this year, I was working on a load test for for a well-known
airline. We were tunning the environment all we could, monitoring and
profiling to know where to focus our optimization efforts. The
solution involved a fairly high stack: Apache httpd, WebSphere,
FuegoBPM, Tibco messaging, Oracle RAC.
The system was holding load pretty well up to a certain point in which
it immediatly halted and stopped processing new requests. Every time
we run the load testing scripts we experienced the same symptoms. Not
even the official testers –with allegedly powerful testing and
monitoring tools– were able to identify the cause of the problem.
So, I decided to get a few Thread Dumps of WebSphere’s JVM. On Unix, you do ”kill -3 <pid>” and the dump goes to WebSphere’s native_stdout.log. We
inspected the dumps but couldn’t identify dead-locks or any other
obvious anomaly, although the answer was right before our eyes.
Read more...
Posted in Java, Debugging & Optimizing | 1 comment | no trackbacks
Posted by F
Fri, 04 Nov 2005 03:16:00 GMT
Yesterday, a good friend of mine and ex-coworker contacted to me to share his
frustration.
(he hates to be called “Polino”, so I won’t.. doh!)
He finished a software solution for a customer, and now an expert
is reviewing his Java code.
The expert code reviewer insists on small performance optimizations, but he
is way off target. He wants to micro-optimize, and to do it blindly.
For example, he reported that the following code was doing
“inefficient String concatenations”:
String myString = "Some text here "+
"Some text there "+
"Some more... ";
And that this was an “inefficient way of creating Longs”:
myList.add(new Long(1));
These examples are probably well optimized by modern Java
compilers. But even if they weren’t, they probably don’t affect much
to the performance of the system as a whole.
Read more...
Posted in Java, Debugging & Optimizing | 1 comment | no trackbacks