Hibernate, Maven and HSQL – Example Project (XML Mapping)


In this tutorial we will write a simple Java project to demonstrate Hibernate, HSQL and Maven. We will first create a Java project using Maven and then will add Hibernate on it. HSQL database is used to make the project simple, as we can use in-memory database and we would need only a JAR file […]

Hibernate XML configuration file example

List of Hibernate SQL Dialects

RDBMS Dialect DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dialect DB2 OS390 org.hibernate.dialect.DB2390Dialect PostgreSQL org.hibernate.dialect.PostgreSQLDialect MySQL org.hibernate.dialect.MySQLDialect MySQL with InnoDB org.hibernate.dialect.MySQLInnoDBDialect MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect Oracle (any version) org.hibernate.dialect.OracleDialect Oracle 9i/10g org.hibernate.dialect.Oracle9Dialect Sybase org.hibernate.dialect.SybaseDialect Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect Microsoft SQL Server org.hibernate.dialect.SQLServerDialect SAP DB org.hibernate.dialect.SAPDBDialect Informix org.hibernate.dialect.InformixDialect HypersonicSQL org.hibernate.dialect.HSQLDialect Ingres org.hibernate.dialect.IngresDialect Progress org.hibernate.dialect.ProgressDialect Mckoi SQL org.hibernate.dialect.MckoiDialect Interbase org.hibernate.dialect.InterbaseDialect Pointbase […]

Integrating Struts 2.0 applications with Hibernate


Struts 2.0 is one of the popularly used Presentation tier framework for Java web Applications.It is based on the WebWork2 technology.Struts 2.0 framework implements MVC 2 architecture by centralizing the control using a Front Controller strategy. The extensible and flexible nature of Struts 2.0 makes it the favourite choice of Java web developers. The major […]

Configuring Multiple Databases in Hibernate


Introduction Hibernate is designed to be used with a large set of databases. The details of those databases are configured in an XML file called hibernate.cfg.xml. This configuration files could be given any name and is usually placed in the root of your application class path. There are many configuration parameters available that makes the […]

Developing Applications with JBoss, Hibernate and EJB 3.0


JBoss AS 5 DevelopmentThe JBoss Application Server is a Java EE-certified platform for developing and deploying Java Enterprise applications. JBoss Application Server provides the full range of J2EE 1.5 features as well as extended Enterprise services including clustering, caching, and persistence. This book will show Java EE developers how to develop their applications using the JBoss Application Server. It […]

Spring Persistence with Hibernate


Spring Persistence with HibernateThis article is sample chapter taken from the book Spring persistence with Hibernate. Hibernate is a popular open-source Java framework. It aims to solve problems associated with persistence in the Java world. Whether you are developing a simple stand-alone application, or a full-blown, server-side Java EE application, you can use and benefit from Hibernate. Although […]

Hibernate Interview Questions


1) What is Hibernate? Hibernate is a powerful, high performance object/relational persistence and query service. This lets the users to develop persistent classes following object-oriented principles such as association, inheritance, polymorphism, composition, and collections. Hibernate eliminates developers to spend more time on writing the native SQL queries and understand the complete underlying database persistence mechanism. […]

Difference between hibernate’s save,update and saveOrUpdate() methods

Difference between hibernate’s save,update and saveOrUpdate() methods Hibetnate has set of methods for saving and updating the values in the database. The methods look like same and difficult to differentiate between them if you are not understanding them clearly. If you understand the hibernate mechanism clearly, it doesn’t execute the SQL statements directly to manipulate […]

Hibernate Vs EJB 3.0


Originally published in DeveloperIQ magazine What is CMP and BMP in EJB? So, why is it that Entity beans alone were found wanting and the specification keeps on changing? Entity beans are of two types. CMP & BMP. CMP stands for Container-Managed Persistence and BMP stands for Bean-managed persistence. Theoretically, the EJB specification does not […]