Blog Archives

01b: ♦ 15+ Hibernate basics Q8 – Q15 interview questions & answers

Extends 15+ Hibernate basics Q1 – Q7 interview questions & answers. Q9. Explain hibernate object states? Explain hibernate objects life cycle? A9. There are 3 states. 1. Persistent objects and collections are short lived single threaded objects, which store the persistent state. These objects synchronize their state with the database…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, Hibernate Job Interview Essentials, member-paid

10: Spring, JavaConfig (i.e @Configuration), JPA & Hibernate by example

Example #1 Wiring JDBC Datasource

application.yml where the datasource properties are read from.

Example #2 Wiring JDBC Datasource with JNDI

Example #3 Wiring the JPA persistence unit processors Callback interface for post-processing a JPA PersistenceUnitInfo. This is useful for auto scanning JPA entities.

Example #4 Wiring…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, JPA, member-paid, Spring JavaConfig

05: Debugging Hibernate & getting a better handle on the 4 most common issues

#1. Enable Logging in your log4j.xml, log4j.properties, or myapp-logback.xml In the log4j.properties file, you can enable Hibernate SQL logging as shown below

or in your log4j.xml or myapp-logback.xml as

You can then check your logs for the SQLs executed and the parameters passed. The example below shows 3…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, Java Debugging, member-paid

04: Identifying and fixing LazyInitializationException in Hibernate

LazyInitializationException is thrown when an object becomes detached, and if you try to access associated (i.e. proxied) object(s) of a detached object. Q. What is a detached object in Hibernate? When you close an individual Hibernate Session, the persistent objects you are working with are detached. This means the object…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, Java Debugging, member-paid
Tags:

03: Identifying and fixing NonUniqueObjectException in Hibernate

NonUniqueObjectException is thrown when there is an object already associated with the session with the same id (primary key) (i.e. a duplicate). It is important to understand the concept of a “detached” object in Hibernate. This is one of the most common errors, understanding why and when this error is…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, Java Debugging, member-paid
Tags:

07: Hibernate mistakes – accessing objects outside of a transaction

Hibernate does require the same EntityManager to be available in order to lazily load objects. If you have no EntityManager, then you have no knowledge of the datastore. Once the transaction is committed the objects become detached, and you can’t lazy load detached objects. So, you need to lazily load…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, member-paid

12: Hibernate custom data type : Blob type example

There are times you want to define a custom data type in Hibernate. Here is an example of using a custom ImageType defined as a Blob databse type to store images, excel files, etc. Step 1: Define the custom Hibernate data type “ImageTpe” as shown below.

Step 2: Use

Read more ›

Posted in Hibernate

11: Hibernate dependency jars and plugins

Here is a sample maven pom.xml snippets containing the dependency jars. 

The above snippet defines the version numbers. The snippet below defines the dependencies.

If you want to auto-generate your hibernate entities from DDL then.

Finally, the plugin that is required for auto generation.

...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Hibernate, member-paid
Page 1 of 212

600+ Java/JEE Interview Q&As

open all | close all

200+ FAQs for Quick Java Interview Prep

open all | close all

16 Technical Key Areas to standout

open all | close all

80+ step by step Tutorials conducive to self-taught projects

open all | close all

100+ pre-interview coding tests

open all | close all

How good are your …..?

open all | close all