myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r513497 - in /myfaces/fusion/trunk/core/src/site/xdoc: convUseCases.xml usage.xml
Date Thu, 01 Mar 2007 23:25:33 GMT
Author: imario
Date: Thu Mar  1 13:14:44 2007
New Revision: 513497

URL: http://svn.apache.org/viewvc?view=rev&rev=513497
Log:
slowly but constant, more documentation

Added:
    myfaces/fusion/trunk/core/src/site/xdoc/convUseCases.xml
    myfaces/fusion/trunk/core/src/site/xdoc/usage.xml

Added: myfaces/fusion/trunk/core/src/site/xdoc/convUseCases.xml
URL: http://svn.apache.org/viewvc/myfaces/fusion/trunk/core/src/site/xdoc/convUseCases.xml?view=auto&rev=513497
==============================================================================
--- myfaces/fusion/trunk/core/src/site/xdoc/convUseCases.xml (added)
+++ myfaces/fusion/trunk/core/src/site/xdoc/convUseCases.xml Thu Mar  1 13:14:44 2007
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//Apache Software Foundation//DTD XDOC 1.0//EN"
+"http://www.apache.org/dtd/xdoc.dtd">
+<document>
+  <properties>
+    <title>new document</title>
+  </properties>
+
+  <body>
+    <section name="Conversation Use Cases">There are some use cases a
+    conversation has:<ul>
+        <li>start a conversation</li>
+
+        <li>end a conversation</li>
+
+        <li>end and restart a conversation</li>
+      </ul><subsection name="Start a conversation"></subsection></section>
+  </body>
+</document>
\ No newline at end of file

Added: myfaces/fusion/trunk/core/src/site/xdoc/usage.xml
URL: http://svn.apache.org/viewvc/myfaces/fusion/trunk/core/src/site/xdoc/usage.xml?view=auto&rev=513497
==============================================================================
--- myfaces/fusion/trunk/core/src/site/xdoc/usage.xml (added)
+++ myfaces/fusion/trunk/core/src/site/xdoc/usage.xml Thu Mar  1 13:14:44 2007
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//Apache Software Foundation//DTD XDOC 1.0//EN"
+"http://www.apache.org/dtd/xdoc.dtd">
+<document>
+  <properties>
+    <title>new document</title>
+  </properties>
+
+  <body>
+    <section name="Usage">Once you have configure the system like described in
+    the installation document you can start using the new scope.<p>First of
+    all, instead of configuring your beans in the faces-config.xml
+    configuration do this in you spring configuration now, in fact you can
+    take over ALL your beans into the spring configuration, it also provides
+    e.g. the session or request scopes, you gain enormous flexibility in the
+    way how your beans should be created, refer to the spring configuration
+    for more details.</p><p>Here is an example of a conversation scoped
+    bean:</p><pre>&lt;bean name="userInfo"
+      class="my.app.pck.backings.UserInfo"
+      scope="conversation"
+      autowire="byName"&gt;
+    &lt;aop:scoped-proxy /&gt;
+&lt;/bean&gt;</pre><p>Beside the fact that you use
+    <code><b>scope="conversation</b></code>" it is very important
to use the
+    <b><code>&lt;aop:scoped-proxy /&gt;</code></b> configuration.</p><p>The
+    <code>&lt;aop:scoped-proxy /&gt;</code> ensures that you will never
see
+    the real instance of your bean, but a proxy to it. There is no difference
+    in the way how you work with this instance in your code, but, there are
+    use cases where you will end a conversation and restart it. That way it is
+    ensured that your application will see this new instance.</p><p>The
+    <code>autowire="byName"</code> configuration is fully optional, but it
+    lowers the number of configuration lines required. Spring will scan your
+    bean and inject for each property where it find a bean with the same name
+    an instance of it.</p><p>For example, if you have a bean named
+    <code>userInfoDao</code> and your bean has a s<code>etUserInfoDao()</code>
+    method it will receive an instance of this DAO.</p><p>Next is the
+    transaction handling.</p><subsection name="JPA Transaction"><b>Note</b>:
+    Once again I would like to stress that Apache MyFaces Fusion do not rely
+    on annotations, the JPA thing was just the one we build the examples with,
+    thats why we describe it at first.<p>Every method in your conversation
+    bean is able to issue a database request or to call e.g. a DAO which will
+    do it. Its ensured that during the whole lifetime of this conversation
+    bean all database code will see the same entity manager.</p><p>Methods
+    which change data has to be annotated with the <code>@Transactional</code>
+    annotation.</p><p>Which means, that every changed/inserted/deleted entity
+    will be flushed to the database and committed.</p><p>Thats an important
+    thing to understand. You <b>can</b> change an entity whenever you want,
+    but it will only be flushed after such an annotated method has been
+    invoked.</p></subsection></section>
+  </body>
+</document>
\ No newline at end of file



Mime
View raw message