commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1076128 - /commons/proper/lang/trunk/src/site/xdoc/article3_0.xml
Date Wed, 02 Mar 2011 07:31:46 GMT
Author: bayard
Date: Wed Mar  2 07:31:46 2011
New Revision: 1076128

URL: http://svn.apache.org/viewvc?rev=1076128&view=rev
Log:
Indented code, made the link to the userguide a deep link

Modified:
    commons/proper/lang/trunk/src/site/xdoc/article3_0.xml

Modified: commons/proper/lang/trunk/src/site/xdoc/article3_0.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/site/xdoc/article3_0.xml?rev=1076128&r1=1076127&r2=1076128&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/site/xdoc/article3_0.xml (original)
+++ commons/proper/lang/trunk/src/site/xdoc/article3_0.xml Wed Mar  2 07:31:46 2011
@@ -105,11 +105,11 @@ expensive object to a background thread 
 the execution of other tasks. Here is an example of the usage of <code>BackgroundInitializer</code>
 which creates an <code>EntityManagerFactory</code> object:</p>
 <pre>
-public class DBInitializer extends BackgroundInitialize&lt;EntityManagerFactory&gt;
{
-    protected EntityManagerFactory initialize() {
-        return Persistence.createEntityManagerFactory(&quot;mypersistenceunit&quot;);
+    public class DBInitializer extends BackgroundInitialize&lt;EntityManagerFactory&gt;
{
+        protected EntityManagerFactory initialize() {
+            return Persistence.createEntityManagerFactory(&quot;mypersistenceunit&quot;);
+        }
     }
-}
 </pre>
 <p>An application creates an instance of the <code>DBInitializer</code>
class
 and calls its <code>start()</code> method. When it later needs access to the
@@ -120,15 +120,15 @@ is complete. Alternatively a convenience
 class can be used to obtain the object from the initializer which hides the
 checked exception declared by <code>get()</code>:</p>
 <pre>
-DBInitializer init = new DBInitializer();
-init.start();
+    DBInitializer init = new DBInitializer();
+    init.start();
 
-// now do some other stuff
+    // now do some other stuff
 
-EntityManagerFactory factory = ConcurrentUtils.initializeUnchecked(init);
+    EntityManagerFactory factory = ConcurrentUtils.initializeUnchecked(init);
 </pre>
 <p>Comprehensive documentation about the <code>concurrent</code> package
is
-available in the <a href="userguide.html">user guide</a>.</p>
+available in the <a href="userguide.html#lang.concurrent.">user guide</a>.</p>
 <h3>text.translate.*</h3>
 <p>A common complaint with StringEscapeUtils was that its escapeXml and escapeHtml
methods should not be escaping non-ASCII characters. We agreed and made the change while creating
a modular approach to let users define their own escaping constructs. </p>
 <p>The simplest way to show this is to look at the code that implements escapeXml:</p>



Mime
View raw message