Components in a hibernate application on nonstop, Running hibernate as a standalone application – HP Integrity NonStop H-Series User Manual
Page 290

The Hibernate architecture includes the following key components:
•
ConnectionProvider
The ConnectionProvider (
org.hibernate.connection.ConnectionProvider
) module
contains a pool of Java Database Connectivity (JDBC) or Java Transaction API (JTA)
connections, which abstract applications from the underlying Datasource or DriverManager.
It is an optional module.
•
TransactionFactory
The TransactionFactory
(org.hibernate.TransactionFactory)
module is a factory
of Transaction instances, which are not exposed to the application. However, you can
customize or implement these Transaction instances. It is an optional module.
•
Transaction Objects
Transaction objects are instances of
org.hibernate.Transaction
class that perform
database operations such as, retrieve, update ,or delete. After the data manipulation is
complete, the transaction is committed or rolled back depending on the success or failure
of the operation.
•
SessionFactory
The SessionFactory (
org.hibernate.SessionFactory
) is used to manage Persistence
objects and to communicate with the database.
The behavior of the SessionFactory is controlled by the properties that are set either in the
Hibernate configuration file (
hibernate.cfg.xml
), or in the Hibernate property file
(
hibernate.properties
), or it can be set programmatically.
•
Session Objects
Session objects are instances of
org.hibernate.Session
class using which Hibernate
establishes communication between the application and the database.
The main function of the Session object is to perform the create, read, and delete operations
for objects defined in the Hibernate mapping file. Session objects are instantiated by a
SessionFactory and are closed when the database operation is complete.
•
Transient objects
Object instances of persistent classes that are currently not associated with any session are
called Transient objects. These are the objects that are not yet persisted or instantiated by a
closed session.
•
Persistent objects
Object instances of persistent classes that are currently associated with a session are called
Persistent objects. These are short-lived, single-threaded objects that contain persistent states
and business functions to store, update, and retrieve data in a database.
Components in a Hibernate Application on NonStop
Hibernate can run as a standalone application or a Web application. This section describes the
components involved and the message flow when Hibernate is run as a standalone or a web
application.
Running Hibernate as a Standalone Application
Hibernate uses the following components while running as a standalone application:
•
•
JDBC Drivers for NonStop SQL/MX
•
290
Hibernate Overview