JUnit 4.0 introduces a completely different API to the older versions. JUnit 4.0 uses Java 5.0 annotations to describe tests instead of using inheritence. It introduces more flexible initialization and cleanup, timeouts, and parameterized test cases. This post describes the new features in JUnit 4.0, and in the end, I show a basic example that …
Pagination using Hibernate and JSP
If the result set is large, then having the entire result set in memory will not be feasible. With large result sets, you cannot afford to have them in memory. In such case, you have to fetch a chunk of data at a time (query based paging). The down side of using query based paging, …
Difference between hibernate’s save,update and saveOrUpdate() methods
Difference between hibernate’s save,update and saveOrUpdate() methods Hibetnate has set of methods for saving and updating the values in the database. The methods look like same and difficult to differentiate between them if you are not understanding them clearly. If you understand the hibernate mechanism clearly, it doesn’t execute the SQL statements directly to manipulate …