alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (architecture.pot)

This example Hibernate source code file (architecture.pot) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

a, a, hibernate, hibernate, however, it, jdbc, jmx, jta, see, tag, tag, the, the

The Hibernate architecture.pot source code

# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-07-21 05:38+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: application/x-xml2pot; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. Tag: title
#: architecture.xml:34
#, no-c-format
msgid "Architecture"
msgstr ""

#. Tag: title
#: architecture.xml:37
#, no-c-format
msgid "Overview"
msgstr ""

#. Tag: para
#: architecture.xml:39
#, no-c-format
msgid "The diagram below provides a high-level view of the Hibernate architecture:"
msgstr ""

#. Tag: para
#: architecture.xml:52
#, no-c-format
msgid "Unfortunately we cannot provide a detailed view of all possible runtime architectures. Hibernate is sufficiently flexible to be used in a number of ways in many, many architectures. We will, however, illustrate 2 specifically since they are extremes."
msgstr ""

#. Tag: title
#: architecture.xml:59
#, no-c-format
msgid "Minimal architecture"
msgstr ""

#. Tag: para
#: architecture.xml:61
#, no-c-format
msgid "The \"minimal\" architecture has the application manage its own JDBC connections and provide those connections to Hibernate; additionally the application manages transactions for itself. This approach uses a minimal subset of Hibernate APIs."
msgstr ""

#. Tag: title
#: architecture.xml:77
#, no-c-format
msgid "Comprehensive architecture"
msgstr ""

#. Tag: para
#: architecture.xml:79
#, no-c-format
msgid "The \"comprehensive\" architecture abstracts the application away from the underlying JDBC/JTA APIs and allows Hibernate to manage the details."
msgstr ""

#. Tag: title
#: architecture.xml:94
#, no-c-format
msgid "Basic APIs"
msgstr ""

#. Tag: para
#: architecture.xml:95
#, no-c-format
msgid "Here are quick discussions about some of the API objects depicted in the preceding diagrams (you will see them again in more detail in later chapters)."
msgstr ""

#. Tag: term
#: architecture.xml:100
#, no-c-format
msgid "SessionFactory (<interfacename>org.hibernate.SessionFactory)"
msgstr ""

#. Tag: para
#: architecture.xml:102
#, no-c-format
msgid "A thread-safe, immutable cache of compiled mappings for a single database. A factory for <interfacename>org.hibernate.Session instances. A client of org.hibernate.connection.ConnectionProvider. Optionally maintains a second level cache of data that is reusable between transactions at a process or cluster level."
msgstr ""

#. Tag: term
#: architecture.xml:112
#, no-c-format
msgid "Session (<interfacename>org.hibernate.Session)"
msgstr ""

#. Tag: para
#: architecture.xml:114
#, no-c-format
msgid "A single-threaded, short-lived object representing a conversation between the application and the persistent store. Wraps a JDBC <interfacename>java.sql.Connection. Factory for org.hibernate.Transaction. Maintains a first level cache of persistent the application's persistent objects and collections; this cache is used when navigating the object graph or looking up objects by identifier."
msgstr ""

#. Tag: term
#: architecture.xml:126
#, no-c-format
msgid "Persistent objects and collections"
msgstr ""

#. Tag: para
#: architecture.xml:128
#, no-c-format
msgid "Short-lived, single threaded objects containing persistent state and business function. These can be ordinary JavaBeans/POJOs. They are associated with exactly one <interfacename>org.hibernate.Session. Once the org.hibernate.Session is closed, they will be detached and free to use in any application layer (for example, directly as data transfer objects to and from presentation).  discusses transient, persistent and detached object states."
msgstr ""

#. Tag: term
#: architecture.xml:140
#, no-c-format
msgid "Transient and detached objects and collections"
msgstr ""

#. Tag: para
#: architecture.xml:142
#, no-c-format
msgid "Instances of persistent classes that are not currently associated with a <interfacename>org.hibernate.Session. They may have been instantiated by the application and not yet persisted, or they may have been instantiated by a closed org.hibernate.Session.  discusses transient, persistent and detached object states."
msgstr ""

#. Tag: term
#: architecture.xml:152
#, no-c-format
msgid "Transaction (<interfacename>org.hibernate.Transaction)"
msgstr ""

#. Tag: para
#: architecture.xml:154
#, no-c-format
msgid "(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work. It abstracts the application from the underlying JDBC, JTA or CORBA transaction. A <interfacename>org.hibernate.Session might span several org.hibernate.Transactions in some cases. However, transaction demarcation, either using the underlying API or org.hibernate.Transaction, is never optional."
msgstr ""

#. Tag: term
#: architecture.xml:165
#, no-c-format
msgid "ConnectionProvider (<interfacename>org.hibernate.connection.ConnectionProvider)"
msgstr ""

#. Tag: para
#: architecture.xml:167
#, no-c-format
msgid "(Optional) A factory for, and pool of, JDBC connections. It abstracts the application from underlying <interfacename>javax.sql.DataSource or java.sql.DriverManager. It is not exposed to application, but it can be extended and/or implemented by the developer."
msgstr ""

#. Tag: term
#: architecture.xml:176
#, no-c-format
msgid "TransactionFactory (<interfacename>org.hibernate.TransactionFactory)"
msgstr ""

#. Tag: para
#: architecture.xml:178
#, no-c-format
msgid "(Optional) A factory for <interfacename>org.hibernate.Transaction instances. It is not exposed to the application, but it can be extended and/or implemented by the developer."
msgstr ""

#. Tag: emphasis
#: architecture.xml:186
#, no-c-format
msgid "Extension Interfaces"
msgstr ""

#. Tag: para
#: architecture.xml:188
#, no-c-format
msgid "Hibernate offers a range of optional extension interfaces you can implement to customize the behavior of your persistence layer. See the API documentation for details."
msgstr ""

#. Tag: title
#: architecture.xml:200
#, no-c-format
msgid "JMX Integration"
msgstr ""

#. Tag: para
#: architecture.xml:202
#, no-c-format
msgid "JMX is the J2EE standard for the management of Java components. Hibernate can be managed via a JMX standard service. AN MBean implementation is provided in the distribution: <literal>org.hibernate.jmx.HibernateService."
msgstr ""

#. Tag: para
#: architecture.xml:208
#, no-c-format
msgid "Another feature available as a JMX service is runtime Hibernate statistics. See <xref linkend=\"configuration-optional-statistics\"/> for more information."
msgstr ""

#. Tag: title
#: architecture.xml:215
#, no-c-format
msgid "Contextual sessions"
msgstr ""

#. Tag: para
#: architecture.xml:216
#, no-c-format
msgid "Most applications using Hibernate need some form of \"contextual\" session, where a given session is in effect throughout the scope of a given context. However, across applications the definition of what constitutes a context is typically different; different contexts define different scopes to the notion of current. Applications using Hibernate prior to version 3.0 tended to utilize either home-grown <literal>ThreadLocal-based contextual sessions, helper classes such as HibernateUtil, or utilized third-party frameworks, such as Spring or Pico, which provided proxy/interception-based contextual sessions."
msgstr ""

#. Tag: para
#: architecture.xml:225
#, no-c-format
msgid "Starting with version 3.0.1, Hibernate added the <literal>SessionFactory.getCurrentSession() method. Initially, this assumed usage of JTA transactions, where the JTA transaction defined both the scope and context of a current session. Given the maturity of the numerous stand-alone JTA TransactionManager implementations, most, if not all, applications should be using JTA transaction management, whether or not they are deployed into a J2EE container. Based on that, the JTA-based contextual sessions are all you need to use."
msgstr ""

#. Tag: para
#: architecture.xml:235
#, no-c-format
msgid "However, as of version 3.1, the processing behind <literal>SessionFactory.getCurrentSession() is now pluggable. To that end, a new extension interface, org.hibernate.context.CurrentSessionContext, and a new configuration parameter, hibernate.current_session_context_class, have been added to allow pluggability of the scope and context of defining current sessions."
msgstr ""

#. Tag: para
#: architecture.xml:242
#, no-c-format
msgid "See the Javadocs for the <literal>org.hibernate.context.CurrentSessionContext interface for a detailed discussion of its contract. It defines a single method, currentSession(), by which the implementation is responsible for tracking the current contextual session. Out-of-the-box, Hibernate comes with three implementations of this interface:"
msgstr ""

#. Tag: para
#: architecture.xml:252
#, no-c-format
msgid "<literal>org.hibernate.context.JTASessionContext: current sessions are tracked and scoped by a JTA transaction. The processing here is exactly the same as in the older JTA-only approach. See the Javadocs for details."
msgstr ""

#. Tag: para
#: architecture.xml:260
#, no-c-format
msgid "<literal>org.hibernate.context.ThreadLocalSessionContext:current sessions are tracked by thread of execution. See the Javadocs for details."
msgstr ""

#. Tag: para
#: architecture.xml:266
#, no-c-format
msgid "<literal>org.hibernate.context.ManagedSessionContext: current sessions are tracked by thread of execution. However, you are responsible to bind and unbind a Session instance with static methods on this class: it does not open, flush, or close a Session."
msgstr ""

#. Tag: para
#: architecture.xml:275
#, no-c-format
msgid "The first two implementations provide a \"one session - one database transaction\" programming model. This is also known and used as <emphasis>session-per-request. The beginning and end of a Hibernate session is defined by the duration of a database transaction. If you use programmatic transaction demarcation in plain JSE without JTA, you are advised to use the Hibernate Transaction API to hide the underlying transaction system from your code. If you use JTA, you can utilize the JTA interfaces to demarcate transactions. If you execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you do not need any transaction or session demarcation operations in your code. Refer to  for more information and code examples."
msgstr ""

#. Tag: para
#: architecture.xml:287
#, no-c-format
msgid "The <literal>hibernate.current_session_context_class configuration parameter defines which org.hibernate.context.CurrentSessionContext implementation should be used. For backwards compatibility, if this configuration parameter is not set but a org.hibernate.transaction.TransactionManagerLookup is configured, Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the implementation class to use. For the three out-of-the-box implementations, however, there are three corresponding short names: \"jta\", \"thread\", and \"managed\"."
msgstr ""

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate architecture.pot source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.