Home » Tag Archives: JBoss Hibernate (page 9)

Tag Archives: JBoss Hibernate

Customizing Spring Data JPA Repository

spring-data-logo

Spring Data is a very convenient library. However, as the project as quite new, it is not well featured. By default, Spring Data JPA will provide implementation of the DAO based on SimpleJpaRepository. In recent project, I have developed a customize repository base class so that I could add more features on it. You could add vendor specific features to ...

Read More »

Hibernate native SQL features into your Spring Data Repository

spring-data-logo

JPA provides @NamedNativeQuery for you to use native SQL. However, the usage is not so convenient, especially when you need to map multiple entities in your native SQL. You have to define a set of SqlResultSetMapping mapping which is quite error prone. For those who have used Hibernate native SQL features before, you will find that it is much more ...

Read More »

Hibernate lazy/eager loading example

jboss-hibernate-logo

This post will focus on why and how we use the concepts known as LAZY and EAGER loading in an application and how to use Spring’s hibernate template to load our LAZY entities in an EAGER fashion. And of course as the title itself suggests, we will show this by an example. The scenario is as such; You are a ...

Read More »

Hibernate caches basics

jboss-hibernate-logo

Recently I have experimented with hibernate cache. In this post I would like share my experience and point out some of the details of Hibernate Second Level Cache. On the way I will direct you to some articles that helped me implement the cache. Let’s get started from the ground. Caching in hibernate Caching functionality is designed to reduces the ...

Read More »

JSF – PrimeFaces & Hibernate Integration Project

primefaces-logo

This article shows how to develop a project by using JSF, PrimeFaces and Hibernate. A sample application is below : Used Technologies : JDK 1.6.0_21 Maven 3.0.2 JSF 2.0.3 PrimeFaces 2.2.1 Hibernate 3.6.7 MySQL Java Connector 5.1.17 MySQL 5.5.8 Apache Tomcat 7.0 STEP 1 : CREATE USER TABLE A new USER Table is created by executing below script: CREATE TABLE ...

Read More »

Spring Security Implementing Custom UserDetails with Hibernate

spring-security-logo

Most of the time, we will want to configure our own security access roles in web applications. This is easily achieved in Spring Security. In this article we will see the most simple way to do this. First of all we will need the following tables in the database: CREATE TABLE IF NOT EXISTS `mydb`.`security_role` ( `id` INT(11) NOT NULL ...

Read More »

Hibernate Composite Ids with association mappings

jboss-hibernate-logo

Recently, We faced a tricky situation with hibernate association mapping with a composite id field. We needed to have bidirectional association with one-to-may and many-to-one.Our tow tables was “REPORT” and “REPORT_SUMMARY” which has one-to-many relationship from REPORT to REPORT_SUMMARY and many-to-one relationship from REPORT_SUMMARY to REPORT table. The primary key of REPORT_SUMMARY table is defined as a composite primary key ...

Read More »

Testing Spring & Hibernate Without XML

spring-interview-questions-answers

I’m very keen on the improvements in Spring 3 that eventually let you move away from XML into plain Java configuration with proper support from IDE and compiler. It doesn’t change the fact that Spring is a huge suite and it sometimes finding the thing you need can take a while. XML-free unit tests around Hibernate are one such thing. ...

Read More »

Schema Creation Script With Hibernate 4, JPA And Maven

apache-maven-logo

The scenario is trivial – you want to generate a database schema creation script while building your application (and then execute the script on the target database) This was relatively easy with Hibernate 3, as there was the hibernate3-maven-plugin, but it is not compatible with Hibernate 4. And for every new project you should start with Hibernate 4, of course. ...

Read More »

Generational caching and Envers

jboss-hibernate-logo

Konrad recently shared on our company’s technical room an interesting article on how caching is done is a big polish social network, nk.pl. One of the central concepts in the algorithm is generational caching (see here or here). The basic idea is that for cache keys you use some entity-specific string + version number. The version number increases whenever data ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close