Home » Tag Archives: JBoss Hibernate (page 9)

Tag Archives: JBoss Hibernate

Bidirectional @OneToOne primary key association

jboss-hibernate-logo

It’s time to continue articles about Hibernate. The last one was dedicated to unidirectional @OneToOne association. So today I will show you how to obtain bidirectional @OneTonOne primary key association. An example from this tutorial based on previous article. Let’s get started. I will work with the same tables which I have created previously. In order to setup a bidirectional ...

Read More »

Bulk fetching with Hibernate

jboss-hibernate-logo

If you need to process large database result sets from Java you can opt for JDBC to give you the low level control required. On the other hand if you are already using an ORM in your application falling back to JDBC might imply some extra pain. You would be losing features such as optimistic locking, caching, automatic fetching when ...

Read More »

Migrating from Hibernate 3 to 4 with Spring integration

jboss-hibernate-logo

This week it was time to upgrade our code base to the latest Hibernate 4.x. We postponed our migration (still being on Hibernate 3.3) since the newer maintenance releases of the 3.x branch required some API changes which were apparently still in flux. An example is the UserType API which was still showing flaws and was going to be finalized ...

Read More »

Hibernate inheritance: Table per class hierarchy

jboss-hibernate-logo

In this tutorial we will see how to implement inheritance in hibernate.There are 3 ways in which you can implement inheritance in hibernate.In this post,we will see one of them i.e.one table per class hierarchy. Inheritance in hibernate: Java is object oriented language and inheritance is one of main functionalities of java.Relation model can implement ‘is a’ and ‘has a’ ...

Read More »

Hibernate Search 4.2 final released: spatial query supported

jboss-hibernate-logo

JBoss has announced the release of Hibernate Search 4.2 final. You may download it from Sourceforge or use the Maven artifacts. In the new release, some interesting features are included: Hibernate Search now supports spatial queries. With the Spatial extensions you can combine fulltext queries with restrictions based on distance from a point in space, filter results based on distances ...

Read More »

How cool is integration testing with Spring and Hibernate

jboss-hibernate-logo

I am guilty of not writing integration testing (At least for database related transactions) up until now. So in order to eradicate the guilt i read up on how one can achieve this with minimal effort during the weekend. Came up with a small example depicting how to achieve this with ease using Spring and Hibernate. With integration testing, you ...

Read More »

JPA/Hibernate: Version-Based Optimistic Concurrency Control

jboss-hibernate-logo

This article is an introduction to version-based optimistic concurrency control in Hibernate and JPA. The concept is fairly old and much has been written on it, but anyway I have seen it reinvented, misunderstood and misused. I’m writing it just to spread knowledge and hopefully spark interest in the subject of concurrency control and locking. Use Cases Let’s say we ...

Read More »

Batoo JPA – 15x Faster Than The Leading JPA Provider

batoo-logo

Introduction I loved the JPA 1.0 back in early 2000s. I started using it together with EJB 3.0 even before the stable releases. I loved it so much that I contributed bits and parts for JBoss 3.x implementations. Those were the days our company was considerably still small in size. Creating new features and applications were more priority than the ...

Read More »

Logging Hibernate SQL

jboss-hibernate-logo

There are two well-known ways to log Hibernate SQL in Grails; one is to add logSql = true in DataSource.groovy (either in the top-level block for all environments or per-environment)             dataSource { dbCreate = ... url = ... ... logSql = true } and the other is to use a Log4j logging configuration: log4j ...

Read More »

Spring – DAO and Service layer

spring-interview-questions-answers

Welcome to the third part of Spring tutorial. In this part, we will continue in writing our Timesheet application and this time we’ll implement DAO layer, business services and write some tests. In the previous part, we’ve defined GenericDao interface that tells us, what operations we will need to perform upon entities. Now we need to provide implementation. We will ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.