You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2009/01/24 01:57:53 UTC

svn commit: r737278 - /tapestry/tapestry5/trunk/src/site/fml/faq/general.fml

Author: hlship
Date: Sat Jan 24 00:57:53 2009
New Revision: 737278

URL: http://svn.apache.org/viewvc?rev=737278&view=rev
Log:
TAP5-462: FAQ: The Hibernate startup question now has a really easy answer

Modified:
    tapestry/tapestry5/trunk/src/site/fml/faq/general.fml

Modified: tapestry/tapestry5/trunk/src/site/fml/faq/general.fml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/fml/faq/general.fml?rev=737278&r1=737277&r2=737278&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/fml/faq/general.fml (original)
+++ tapestry/tapestry5/trunk/src/site/fml/faq/general.fml Sat Jan 24 00:57:53 2009
@@ -323,22 +323,12 @@
                     early, before accepting any requests.
                 </p>
                 <p>
-                    The trick is to force the Tapestry services that wrap around Hibernate to initialize at
-                    startup. The following can be added to your AppModule:
+                    Starting with release 5.1, this is as simple as contributing
+                    an override of the
+                    <a href="../guide/conf.html">configuration symbol</a>
+                    tapestry.hibernate.early-startup to "true". Tapestry will load Hibernate at startup.
+                    Watch the console for errors as they are logged, but otherwise ignored.
                 </p>
-                <pre>
-                    public void contributeRegistryStartup(OrderedConfiguration&lt;Runnable&gt; configuration, final
-                    HibernateSessionSource sessionSource)
-                    {
-                    configuration.add("HibernateStartup", new Runnable()
-                    {
-                    public void run()
-                    {
-                    sessionSource.getConfiguration();
-                    }
-                    });
-                    }
-                </pre>
             </answer>
         </faq>
     </part>