Some time ago I received NoSuchMethodError when I was dealing with multiple versions of the same library. I decided to dig into mentioned error's root cause.
Tuesday, February 25, 2014
Sunday, February 2, 2014
Friday, December 27, 2013
Validation is a pretty common business requirement. We need to be sure that the input data is valid and remember that: junk in -> junk out. Let's say that we want to validate a request object. The easiest way is to produce a big chunk of IF statements. Do you like that IF ... IF ... IF ... blocks one after another? I hate them. So how to deal with validation?
Saturday, December 7, 2013
When it comes to communication with external resources we need to be sure that reasonable timeouts were set. Network is like a black hole - we send a request and many bad things can happen. Without timeouts our thread pool can saturate because of threads stuck deep inside socket read method. It is usual to set connect timeout and read timeout. But is it enough? Can we have a good night's sleep when connect and read timeouts are set in our application? Let's check!
Monday, November 25, 2013
XML is quite popular nowadays. You can store XML as a VARCHAR type in a DB. However, it has some limitations, e.g. you cannot perform XPath DB queries on a VARCHAR. Oracle DB comes with XML dedicated type - XMLTYPE that allows to perform XPath queries, has XML validation logic built-in and some storage optimizations. On the contrary, Hibernate does not support XMLTYPE out of the box. We need to define our custom UserType.