This post shows an example of a bad practice I saw in one of my Java projects seven years ago. It also has a naive
Very Slow XML Validation against XSDs with unique and key elements
This post shows that XML XSD validation with <xs:unique> is very slow, especially for a huge list of elements, e.g., 300,000 items. We are better off
Get First And Last Dates Of Current Quarter Using Joda Time
This post shows how to come up with the first and last dates of the current quarter using Joda time. Although we can do it
Using @Conditional with @Configuration in Spring
Using @Conditional with @Configuration in Spring allows us to group @Bean objects loaded on a specific condition without resorting to using @Profile and too many
JAXB Pre And Post-processing with Unmarshaller Listener
This post shows how to perform JAXB pre and post-processing with Unmarshaller Listener. For instance, you may want to compare the contents of an object
Tomcat 7 by Dissection: How CGI File Upload Works
I wonder which ancient Tomcat version our application based its CGIServlet class on. CGI HTTP POST was not working and recently another problem has cropped up – CGI File Upload does not work at all. What gives? I can only speculate.
Installing Java 2 SDK 1.4 in Windows 7
This post shows how to install Java 2 SDK 1.4 in Windows 7. If you’ve worked in IT consulting for some time, you will realize
Spring Boot – Publish and Consume Custom Application Events
This post shows how to implement the Observer Design Pattern using the facilities available from Spring Application Events. More importantly, it shows how to publish
Mock Method To Return Different Values in Mockito
This post shows how to mock a method that returns unique values for different arguments in Mockito. For example, the return values vary according to
JSqlServerBulkInsert with Spring JDBC Connection is Closed
When we use JSqlServerBulkInsert, we explicitly need to provide a database connection from the pool to bulk insert data even in Spring JDBC. As a