Home » Tag Archives: JBoss Hibernate (page 11)

Tag Archives: JBoss Hibernate

Hibernate cache levels tutorial

jboss-hibernate-logo

One of the common problems of people that start using Hibernate is performance, if you don’t have much experience in Hibernate you will find how quickly your application becomes slow. If you enable sql traces, you would see how many queries are sent to database that can be avoided with little Hibernate knowledge. In current post I am going to ...

Read More »

Enabling JMX in Hibernate, EhCache, Quartz, DBCP and Spring

apache-commons-dbcp-logo

Continuing our journey with JMX (see: JMX for human beings) we will learn how to enable JMX support (typically statistics and monitoring capabilities) in some popular frameworks. Most of this information can be found on project’s home pages, but I decided to collect it with few the addition of some useful tips. Hibernate (with Spring support) Exposing Hibernate statistics with ...

Read More »

The persistence layer with Spring 3.1 and Hibernate

jboss-hibernate-logo

1. Overview This article will show how to implement the DAO with Spring and Hibernate. For the core Hibernate configuration, see the articles about Hibernate 3 and Hibernate 4 with Spring. 2. No More Spring Templates Starting Spring 3.0 and Hibernate 3.0.1, the Spring HibernateTemplate is no longer necessary to manage the Hibernate Session. It is now possible to make ...

Read More »

The Persistence Layer with Spring 3.1 and JPA

jboss-hibernate-logo

1. Overview This is tutorial shows how to set up Spring with JPA, using Hibernate as a persistence provider. For a step by step introduction about setting up the Spring context using Java based configuration and the basic Maven pom for the project, see this article. 2. The JPA Spring Configuration with Java To use JPA in a Spring project, ...

Read More »

Hibernate by Example – Part 2 (DetachedCriteria)

jboss-hibernate-logo

So last time we helped out justice league to effectively manager their super heroes. Today we focus on how The Avengers will be using Hibernate’s Detached Criteria to find out their enemies with respect to each superhero so as to protect their super heroes. You can download the working example from here. In this example we take only two entities ...

Read More »

Hibernate by Example – Part 1 (Orphan removal)

jboss-hibernate-logo

So i thought to do a series of hibernate examples showing various features of hibernate. In the first part i wanted to show about the Delete Orphan feature and how it may be used with the use of a story line. So let us begin :) Prerequisites: In order for you to try out the following example you will need ...

Read More »

Avoid Lazy JPA Collections

jboss-hibernate-logo

Hibernate (and actually JPA) has collection mappings: @OneToMany, @ManyToMany, @ElementCollection. All of these are by default lazy. This means the collections are specific implementations of the List or Set interface that hold a reference to the persistent session and the values are loaded from the database only if the collection is accessed. That saves unnecessary database queries if you only ...

Read More »

Problems with ORMs

jboss-hibernate-logo

Object Relational Mapping tools like Hibernate have helped developers make huge productivity gains in dealing with relational databases in the past several years. ORMs free developers to focus on application logic and avoid writing a lot of boilerplate SQL for simple tasks like inserts or queries. However, the well-documented problems with object-relational impedance mismatch inevitably cause headaches for developers. Relational ...

Read More »

Hibernate Gotchas to Watch out

jboss-hibernate-logo

I’ve been using Hibernate for some time now and when I don’t work on a hibernate project for a while I find myself doing the same mistakes I did the previous times. So here is a sort of watch list for my self hopefully will be useful to someone else as well. Implement hashCode and equals You should always implement ...

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