Impact of proxy on equals and hashCode

A lot of frameworks create proxies  to apply aspect oriented programming or the lazy loading pattern.

Hibernate for example uses cglib or javasissit to create lazy loading proxies. The famous springframework mainly uses java proxyies created via java.lang.reflect.Proxy.newProxyInstance(ClassLoader, Class<?>[], InvocationHandler) or cglib as well.
Therefore it is important to know exactly how proxies work and the […]

Handling complex object state with design

Some APIs that implement a complex object state management often violate the single responsibility principle and make the usage very difficult. When you do all aspects of the complex state management in one inferface the interface’s methods must be invoked in the chronological correct order. Such APIs are hard to understand and to integrate. What […]

Impact of native sql queries on hibernate’s second level cache

The difference between pojos and java beans

Java Beans and Pojos are often used and misunderstood terms. Some think that a pojo is a java bean and vice versa. In fact it is not. There are differences that matter.
The pojo
If you want to know what a term really means you have to find the source context in which the term has been created. […]