Java J2ee Tutorials

Java Questions

Sunday, April 22, 2012


1. What is the difference between ServletContext and ServletConfig?
Both are interfaces. The servlet engine implements the ServletConfig interface in order to pass configuration information to a servlet. The server passes an object that implements the ServletConfig interface to the servlet's init() method.
The ServletContext interface provides information to servlets regarding the environment in which they are

Free Career Predictions

Hibernate's Main Feature

Monday, April 16, 2012

The most important Hibernate's feature is mapping from Java classes to database tables (and from Java data types to SQL data types), but also to provides data query ( and retrieval facilities ).
It is important that Hibernate generates the SQL calls and relieves keeping the application portable to all SQL databases, with database portability delivered at very little performance overhead.This feature can significialy reduce development time that programmer would have to spent with manual data handling in SQL and JDBC.

Free Career Predictions

What is a Hibernate?

Hibernate is an open source object (relational) mapping library for the Java language,that provides persistent classes and logic without caring how to handle the data.

Persistance in Java ( Hibernate ) is storing data in a relational databse using SQL.

Free Career Predictions

How does hibernate generate beans and DAO(Data Access Object) from database?

Sunday, April 15, 2012

This movie shows some basics about generating beans and DAO (Data Access Object)* from database. To achieve this in this sample we are using JBoss Tools which have Hibernate reverse engineering. That's all for now. Enjoy the movie!

The Java Data Access Object (Java DAO) is an important component in business applications. Business applications almost always need access to data from relational or object databases and the Java platform offers many techniques for accessing this data. The oldest and most mature technique is to use the Java Database Connectivity (JDBC) API, which provides the capability to execute SQL queries against a database and then fetch the results, one column at a time. Although this API provides everything a developer needs to access data and to persist application state, it is a cumbersome API to develop against - which makes a Java DAO code generator particularly useful.

Free Career Predictions