Archive | Java

Steps to use hibernate into an application

May 1st, 2011No Comments

1. Load the Hibernate Into Configuration File: -

Configuration conf = new Configuration ();
Conf. Configure (“anyname.cfg.xml”);

2. Parse The Loaded Xml And Generate SessionFactory: -

SessionFactory factory = conf. buildSessionFactory ();

3. Open a Session from SessionFactory: -

It internally opens a connection
Session ses = factory. openSession ()

(more…)

VN:F [1.9.10_1130]
Rating: 9.3/10 (3 votes cast)
VN:F [1.9.10_1130]
Rating: +3 (from 3 votes)

Hibernate Over JDBC

May 1st, 2011No Comments

Limitations of JDBC:-

1. Connection management is complex.
2. If the database schema modified after JDBC application is developed then again we need to reopen and we need to modify the JDBC application. It means debugging of JDBC application is complex.
3. JDBC only transfers data between an application and database in the form of text but not in the form of object.
(more…)

VN:F [1.9.10_1130]
Rating: 9.2/10 (5 votes cast)
VN:F [1.9.10_1130]
Rating: +1 (from 3 votes)
Page 3 of 3«123