Wednesday, July 28, 2010

Tomcat crashing silently

Sometimes I'm surprised to see strange Tomcat crash - no error message in log, the process just stopped running.

As usual, the root cause is between the keyboard and the chair - I have some infinite loop in the code :)

Too bad that there is no log to give a hint. So the only way to tell is to do remote debugging and find out the code line where the problem occurs.

Of course this can happen also on Jetty, or whatever other servlet container.

Wednesday, July 7, 2010

Common Spring aspects

It is amazing how many people still write some log.debug() to track execution time of their methods or create a caching proxy class for each class they want to cache.

Come on, this is done million times before, why not reuse ?

Today I've written some documentation on the Common Spring aspects project. This project collects some handy aspects that I find myself using on almost every project - currently, performance logging (using JaMon library) and caching bean method invocations results (using Ehcache). The code itself is fairly small, mostly it just delegates execution to the respective library.