[jboss-cvs] JBossAS SVN: r95601 - projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 27 02:41:59 EDT 2009


Author: laubai
Date: 2009-10-27 02:41:58 -0400 (Tue, 27 Oct 2009)
New Revision: 95601

Modified:
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/architecture.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/configuration.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/entitymanagerapi.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_ejbql.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_native.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/transactions.xml
Log:
Added changes in JBPAPP-1723.

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/architecture.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/architecture.xml	2009-10-27 06:25:17 UTC (rev 95600)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/architecture.xml	2009-10-27 06:41:58 UTC (rev 95601)
@@ -139,7 +139,7 @@
       manager (this is transparent to the application). It is also responsible
       for transaction boundaries. A container-managed entity manager is
       obtained in an application through dependency injection or through JNDI
-      lookup, A container-managed entity manger requires the use of a JTA
+      lookup. A container-managed entity manger requires the use of a JTA
       transaction.</para>
     </section>
 
@@ -184,7 +184,7 @@
       <para>You can also use an extended persistence context. This can be
       combined with stateful session beans, if you use a container-managed
       entity manager: the persistence context is created when an entity
-      manager is retrieved from dependency injection or JNDI lookup , and is
+      manager is retrieved from dependency injection or JNDI lookup, and is
       kept until the container closes it after the completion of the
       <literal>Remove</literal> stateful session bean method. This is a
       perfect mechanism for implementing a "long" unit of work pattern. For
@@ -240,7 +240,7 @@
 
         <listitem>
           <para>If a stateful session bean with an extended persistence
-          context calls as stateless session bean or a stateful session bean
+          context calls a stateless session bean or a stateful session bean
           with a transaction-scoped persistence context in the same JTA
           transaction, the persistence context is propagated.</para>
         </listitem>
@@ -288,4 +288,4 @@
     closed when the entity manager is closed. Many resource-local transaction
     share the same persistence context, in this case.</para>
   </section>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/configuration.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/configuration.xml	2009-10-27 06:25:17 UTC (rev 95600)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/configuration.xml	2009-10-27 06:41:58 UTC (rev 95601)
@@ -191,9 +191,8 @@
             specification, you can add a package name in the
             <literal>&lt;class&gt;</literal> element (eg
             <code>&lt;class&gt;org.hibernate.eg&lt;/class&gt;</code>).
-            Caution, the package will include the metadata defined at the
-            package level (ie in <filename>package-info.java</filename>), it
-            will not include all the classes of a given package.</para>
+            Specifying a package in the <literal>&lt;class&gt;</literal>
+            element will include only the annotated classes.</para>
           </listitem>
         </varlistentry>
 
@@ -214,7 +213,7 @@
       requires the schema validation. If the systemId ends with
       <literal>persistence_1_0.xsd</literal>, Hibernate entityManager will use
       the version embedded in the hibernate-entitymanager.jar. No internet
-      access will be processed.</para>
+      access will be performed.</para>
 
       <programlisting>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -271,12 +270,12 @@
       Actually the <classname>Persistence</classname> class will look at all
       the Persistence Providers available in the classpath and ask each of
       them if they are responsible for the creation of the entity manager
-      factory <literal>manager1</literal>. Each provider, from this list of
-      resources, it will try to find an entity manager that matches the name
-      you specify in the command line with what is specified in the
-      persistence.xml file (of course the provider <literal>element</literal>
-      must match the current persistent provider). If no persistence.xml with
-      the correct name are found or if the expected persistence provider is
+      factory <literal>manager1</literal>. From the list of resources available
+      from each provider, the persistence implementation will search for an
+      entity manager that whose name in <filename>persistence.xml</filename>
+      matches the name specified at the command line. (The provider <literal>element</literal>
+      must match the current persistence provider.) If no persistence.xml with
+      the correct name is found or if the expected persistence provider is
       not found, a <classname>PersistenceException</classname> is
       raised.</para>
 
@@ -454,7 +453,7 @@
       Hibernate reference guide for more detailed informations on how to use
       it.</para>
 
-      <para>TODO: me more descriptive on some APIs like setDatasource()</para>
+      <!--<para>TODO: me more descriptive on some APIs like setDatasource()</para>-->
 
       <programlisting>Ejb3Configuration cfg = new Ejb3Configuration();
 EntityManagerFactory emf = 
@@ -628,7 +627,7 @@
 ...
 emf.close(); //close at application end</programlisting>
 
-    <para>An entity manager factory is typically create at application
+    <para>An entity manager factory is typically created at application
     initialization time and closed at application end. It's creation is an
     expensive process. For those who are familiar with Hibernate, an entity
     manager factory is very much like a session factory. Actually, an entity
@@ -642,7 +641,7 @@
     entityManager.clear() in between). You can see an entity manager as a
     small wrapper on top of an Hibernate session.</para>
 
-    <para>TODO explains emf.createEntityManager(Map)</para>
+    <!--<para>TODO explains emf.createEntityManager(Map)</para>-->
   </section>
 
   <section>
@@ -654,4 +653,4 @@
     be no performance cost. For more information on Hibernate Validator,
     please refer to the Hibernate Annotations reference guide.</para>
   </section>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/entitymanagerapi.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/entitymanagerapi.xml	2009-10-27 06:25:17 UTC (rev 95600)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/entitymanagerapi.xml	2009-10-27 06:41:58 UTC (rev 95601)
@@ -141,9 +141,9 @@
       <classname>javax.persistence.Query</classname>. This interface offers
       methods for parameter binding, result set handling, and for execution of
       the query. Queries are always created using the current entity
-      manager:</para>
+      manager.</para>
 
-      <programlisting>List cats = em.createQuery(
+      <!--<programlisting>List cats = em.createQuery(
     "select cat from Cat as cat where cat.birthdate &lt; ?1")
     .setParameter(1, date, TemporalType.DATE)
     .getResultList();
@@ -161,7 +161,7 @@
 Cat mother = (Cat) em.createQuery(
     "select cat.mother from Cat as cat where cat = ?1")
     .setParameter(1, izi)
-    .getSingleResult();</programlisting>
+    .getSingleResult();</programlisting>-->
 
       <para>A query is usually executed by invoking
       <methodname>getResultList()</methodname>. This method loads the
@@ -177,15 +177,13 @@
         projection is used. Each result tuple is returned as an object
         array:</para>
 
-        <programlisting>Iterator kittensAndMothers = sess.createQuery(
-            "select kitten, mother from Cat kitten join kitten.mother mother")
-            .getResultList()
-            .iterator();
-
-while ( kittensAndMothers.hasNext() ) {
-    Object[] tuple = (Object[]) kittensAndMothers.next();
-    Cat kitten = (Cat) tuple[0];
-    Cat mother = (Cat) tuple[1];
+        <programlisting>Iterator&lt;Cat[]&gt; kittensAndMothers = 
+  em.createQuery("select kitten, mother from Cat kitten join kitten.mother mother").getResultList().iterator();
+  while (kittensAndMothers.hasNext()) {
+     Cat[] tuple = kittensAndMothers.next();
+     Cat kitten = tuple[0];
+     Cat mother = tuple[1];
+  } 
     ....
 }</programlisting>
       </section>
@@ -200,7 +198,7 @@
         persistent state (in other words, they are considered "read
         only"):</para>
 
-        <programlisting>Iterator results = em.createQuery(
+        <programlisting>Iterator&lt;Object[]&gt; results = em.createQuery(
         "select cat.color, min(cat.birthdate), count(cat) from Cat cat " +
         "group by cat.color")
         .getResultList()
@@ -241,7 +239,7 @@
 names.add("Fritz");
 Query q = em.createQuery("select cat from DomesticCat cat where cat.name in (:namesList)");
 q.setParameter("namesList", names);
-List cats = q.list();</programlisting>
+List cats = q.getResultList();</programlisting>
       </section>
 
       <section>
@@ -272,8 +270,8 @@
         it is executed:</para>
 
         <programlisting>Query q = em.createNamedQuery("eg.DomesticCat.by.name.and.minimum.weight");
-q.setString(1, name);
-q.setInt(2, minWeight);
+q.setParameter(1, name);
+q.setParameter(2, minWeight);
 List cats = q.getResultList();</programlisting>
 
         <para>Note that the actual program code is independent of the query
@@ -674,7 +672,7 @@
 em.getTransaction().commit(); // flush occurs</programlisting>
 
       <para>During flush, an exception might happen (e.g. if a DML operation
-      violates a constraint). TODO: Add link to exception handling.</para>
+      violates a constraint). <!--TODO: Add link to exception handling.--></para>
 
       <para>Hibernate provides more flush modes than the one described in the
       EJB3 specification. Please refer to the Hibernate core reference
@@ -800,4 +798,4 @@
       </listitem>
     </itemizedlist>
   </section>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_ejbql.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_ejbql.xml	2009-10-27 06:25:17 UTC (rev 95600)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_ejbql.xml	2009-10-27 06:41:58 UTC (rev 95601)
@@ -146,10 +146,10 @@
     Join fetching multiple collection roles also sometimes gives unexpected results for
     bag mappings, so be careful about how you formulate your queries in this case.</para>
 
-    <para>
+    <!--<para>
       TODO: The last statement is useless and typical developer thinking, please elaborate.
         The word "sometimes" should never appear in any technical documentation.
-    </para>
+    </para>-->
 
     <para>If you are using property-level lazy fetching (with bytecode
     instrumentation), it is possible to force Hibernate to fetch the lazy
@@ -888,4 +888,4 @@
 group by usr.id, usr.name
 having count(msg) = 0</programlisting>
   </sect1>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_native.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_native.xml	2009-10-27 06:25:17 UTC (rev 95600)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/query_native.xml	2009-10-27 06:41:58 UTC (rev 95601)
@@ -93,7 +93,7 @@
   <sect1>
     <title>Using native SQL Queries</title>
 
-    <para>TODO: This sounds like a dupe...</para>
+<!--    <para>TODO: This sounds like a dupe...</para>-->
 
     <para>Now that the result set is described, we are capable of executing
     the native SQL query. <literal>EntityManager</literal> provides all the
@@ -133,4 +133,4 @@
 q.setParameter( 1, name );
 Season season = (Season) q.getSingleResult();</programlisting>
   </sect1>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/transactions.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/transactions.xml	2009-10-27 06:25:17 UTC (rev 95600)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Entity_Manager/en-US/transactions.xml	2009-10-27 06:41:58 UTC (rev 95601)
@@ -40,7 +40,7 @@
   <para>We start the discussion of concurrency control in Hibernate with the
   granularity of <literal>EntityManagerFactory</literal>, and
   <literal>EntityManager</literal>, as well as database transactions and long
-  units of work..</para>
+  units of work.</para>
 
   <para>In this chapter, and unless explicitly expressed, we will mix and
   match the concept of entity manager and persistence context. One is an API
@@ -233,7 +233,7 @@
       advantages and disadvantages, we discuss them later in this chapter in
       the context of optimistic concurrency control.</para>
 
-      <para>TODO: This note should probably come later.</para>
+      <para><!--TODO: This note should probably come later.--></para>
     </sect2>
 
     <sect2 id="transactions-basics-identity">
@@ -569,8 +569,8 @@
       session beans. The lifecycle of the entity manager and persistence
       context is completely managed by the container.</para>
 
-      <para>TODO: The following paragraph is very confusing, especially the
-      beginning...</para>
+      <para><!--TODO: The following paragraph is very confusing, especially the
+      beginning...--></para>
 
       <para>When using particular Hibernate native APIs, one caveat has to be
       remembered: <literal>after_statement</literal> connection release mode.
@@ -900,4 +900,4 @@
       flush, throwing an exception if conflicting updates occured.</para>
     </sect2>
   </sect1>
-</chapter>
\ No newline at end of file
+</chapter>




More information about the jboss-cvs-commits mailing list