Hibernate
10.0K views | +0 today
Follow
Hibernate
Hibernate is an open source Java persistence framework project. Perform powerful object relational mapping and query databases using HQL and SQL.
Curated by Manu PK
Your new post is loading...
Your new post is loading...
Scooped by Manu PK
Scoop.it!

Understanding Caching in Hibernate – Part Three : The Second Level Cache

The key characteristic of the second-level cache is that is is used across sessions, which also differentiates it from the session cache, which only – as the name says – has session scope. Hibernate provides a flexible concept to exchange cache providers for the second-level cache. By default Ehcache is used as caching provider. However more sophisticated caching implementation can be used like the distributed JBoss Cache or Oracle Coherence.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

JPA Queries and Tips  

JPA Queries and Tips   | Hibernate | Scoop.it

Usually I see some people asking questions about Queries with JPA; usually to answer this kind of questions several links are provided trying to find a solution to the question.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate FAQ  - Tips and Tricks | Hibernate | JBoss Community

Hibernate FAQ - Tips and Tricks

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate Sessions and Transaction Management Guidelines - Confluence Development

Hibernate Sessions and Transaction Management Guidelines - Confluence Development | Hibernate | Scoop.it

These are guidelines related to the development of Confluence. The guidelines mainly apply to Atlassian employees, but reading them should provide insight for third-party plugin developers as well, so we decided to make them public.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

InfoQ: Revving Up Your Hibernate Engine

This article explores tuning techniques for Hibernate-based applications, focusing on tuning topics that are effective but poorly documented, such as inheritance mapping, second level cache and enhanced sequence identifier generators.
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

How to configure logging in Hibernate – SLF4j + Log4j

How to configure logging in Hibernate – SLF4j + Log4j | Hibernate | Scoop.it

Hibernate uses Simple Logging Facade for Java (SLF4J) to redirect the logging output to your perfer logging frameworkis (log4j, JCL, JDK logging, lofback…). In this tutorial, we show you how to do logging in Hibernate with SLF4j + Log4j logging framework.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Caching | Improving Hibernate's Performance | InformIT

Caching | Improving Hibernate's Performance | InformIT | Hibernate | Scoop.it
This chapter describes how to gather performance metrics for the use of Hibernate in the field. Specific attention is giving to key areas like collections and lazy loading of data.
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate cache levels tutorial - Java Code Geeks

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 explain how to use Hibernate Query Cache to avoid amount of traffic between your application and database.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate Date vs Time » Source Allies Blog

I encountered a subtle hibernate mapping issue involving Dates and Timestamps. The following test recreates this issue. package com.sourceallies.logging; import static org.junit.Assert.assertEquals; import static org.junit.
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

In Relation To...  Hibernate 3.2: Transformers for HQL and SQL

People using the Criteria API have either transparently or knowingly used a ResultTransformer . A ResultTransformer is a nice and simple interface that allows you to transform any Criteria result element. E.g. you can make any Criteria result be returned as a java.util.Map or as a non-entity Bean.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate Inheritance: Table Per Concrete Class (Annotation & XML ...

Hibernate Inheritance: Table Per Concrete Class (Annotation & XML ... | Hibernate | Scoop.it
Welcome to Hibernate Tutorial Series. In previous tutorials we saw how to implement Inheritance in Hibernate: One Table per Subclass. Today we will see how to implement Hibernate Inheritance: One Table per Concrete ...
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

JPA Performance, Don't Ignore the Database | Java.net

JPA Performance, Don't Ignore the Database Article be Carol McDonald on java.net

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Java Persistence Performance: JPQL vs SQL, why not have both

One of the most common questions I see on JPA, is users wanting to know how to write some specific SQL query as a JPQL query. Some of the time, they just need to learn JPQL, and their SQL can easily be converted to JPQL. Other times their SQL is using one of the many features on SQL that are not provided in JPQL, and their only option is to use a native SQL query.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate FAQ  - Performance Q&A | Hibernate | JBoss Community

We claim that Hibernate performs well, in the sense that its performance is limited by the underlying JDBC driver / relational database combination. Given this, the question boils down to: does Hibernate implement its functionality using a minimal number of database queries and how can it improve performance and scalability on top of JDBC? This page hopefully answers these questions.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Correct use of equals() and hashCode() with hibernate

Hibernate (and ehcache) doesn’t work very well with the standard equals() and hashCode() implementations and there are some facts you should be aware of. The problem is that when hibernate re...
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Using SQL Functions in NHibernate - Ayende @ Rahien

Scalar functions that are a part of an entity.
A post's total spam score may be calculated using a SQL Function, and it is part of the properties of the object.
Scalar functions that are used for calculations, and should be called explicitly.
A blog's popularity score may be calculated using a SQL Function, but it is too expensive to calculate and not often needed.
Note: Only this requires NHibernate 1.2, all other features can be done using NHibernate 1.0.2
Table valued functions (or stored procedure, for that matter, but that is a bit harder) that return entities:
A selection of posts with specific spam score it one example.
Scalar functions that you want to use as part of your HQL queries.
For instnace, you may want to use database (or user defined) functions as part of your HQL queries. Think lower(), dbo.postSpamScore(), etc.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Collection Mapping In Hibernate

When we have to save a property of class, that is simple value type like integer or Integer etc., it is stored in the table of owning class. The persistence life of this property depends upon persistence of the object that it belongs to. However if the class property is collection type, we need an additional collection table to save this property.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate Querying 101 : tips and tricks

This article presents a few real-life tips and tricks for Hibernate querying. It is designed to be a 'from-the-trenches' account of the methods and best-practices we use and that we have found to work.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate query cache considered harmful? : Pure Danger Tech

Hibernate query cache considered harmful? : Pure Danger Tech | Hibernate | Scoop.it

Over the last few months we’ve had a whole bunch of people doing a whole bunch of Hibernate performance tuning. I’m going to do a few blogs on some really common things that we ran into that might help you as well. The first one I wanted to talk about was Hibernate query caching.

more...
No comment yet.
Scooped by Manu PK
Scoop.it!

D'chan's Blog » Beginners guide to Hibernate Annotations

D'chan's Blog » Beginners guide to Hibernate Annotations | Hibernate | Scoop.it
Beginners guide to Hibernate Annotations. Even though Annotations seems bit intimidated at first understanding it took only a while. For starters I am going to brief about how to setup Annotations in Hibernate and to persist an ...
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Create a Blog with JBoss Seam, Hibernate JPA and JSF then ...

In part III of the tutorial, we'll build the entity classes from the database we created in Part I and configure the Seam project we created in Part II so.
more...
No comment yet.
Scooped by Manu PK
Scoop.it!

Hibernate by Example - Part 2 (DetachedCriteria)

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.

more...
No comment yet.