Categories
Development

Understanding cache

As a reminder of what I wrote about caching in Hibernate, Matt Raible has been banging his head against the wall with cache issues. Understand your cache. 🙂

Categories
Development

Hibernate Caching

Caching is an essential component in any ORM solution. Without it it is impossible to obtain a decent performance, and without a proper understanding of the mechanisms at work you will get bad performance.

Some products like TopLink will behave extremely weird with improper usage of the cache, and leave you crying. 😉 Do not embark on a ORM project without understanding the internals, especially of the cache, but also the product. Add distribution and synchronization to the mix and you got some nice complexity. 🙂

Two good articles on the internals of Hibernate can be found here:

Of course both are grabbed of the front of hibernate.org. 🙂

Categories
General

TC4/TC5 – Character Encoding

Tomcat 4 and Tomcat 5 handles character encoding of the document body and the URI in diferent ways. One of the main differences is that in TC5 HTTPServletRequest.setCharacterEncoding(…), by default, only applies to the body and not the URI. In other words, use POST instead of GET if you want .setCharacterEncoding(…) to apply to your form data.
Read this Tomcat FAQ post by Remy Maucherat to understand the whole picture.