Home » Tag Archives: JBoss Hibernate (page 9)

Tag Archives: JBoss Hibernate

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 »

Spring – Persistence layer – writing entities and configuring Hibernate

spring-interview-questions-answers

Welcome to the second part of this tutorial. Don’t freak out when you see how long this article is – I promise you it’s mostly easy POJOs and some generated code. Before we start, we need to update our Maven dependencies, because we will be using Hibernate and Spring now. Add following dependencies to your pom.xml: <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.6.8.Final</version> ...

Read More »

Hibernate: save vs persist and saveOrUpdate

jboss-hibernate-logo

What is difference between save and saveOrUpdate or Difference between save and persist are common interview question in any Hibernate interview, much like Difference between get and load method in Hibernate. Hibernate Session class provides couple of ways to save object into database by methods like save , saveOrUpdate and persist . You can use either save() , saveOrUpdate() or ...

Read More »

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 »
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