myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r582404 - in /myfaces/orchestra/trunk/core/src/site/xdoc: alternative-configuration.xml installation.xml
Date Fri, 05 Oct 2007 21:38:26 GMT
Author: skitching
Date: Fri Oct  5 14:38:26 2007
New Revision: 582404

URL: http://svn.apache.org/viewvc?rev=582404&view=rev
Log:
Update site docs

Modified:
    myfaces/orchestra/trunk/core/src/site/xdoc/alternative-configuration.xml
    myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml

Modified: myfaces/orchestra/trunk/core/src/site/xdoc/alternative-configuration.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/alternative-configuration.xml?rev=582404&r1=582403&r2=582404&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/alternative-configuration.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/alternative-configuration.xml Fri Oct  5 14:38:26
2007
@@ -49,106 +49,104 @@
 		
 		
 		<pre>
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;beans xmlns="http://www.springframework.org/schema/beans"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xmlns:tx="http://www.springframework.org/schema/tx"
-   xmlns:aop="http://www.springframework.org/schema/aop"
-   xmlns:sa="https://spring-annotation.dev.java.net/context"
-
-  	    xsi:schemaLocation="
-	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-	http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
-	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
+  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
+  &lt;beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:tx="http://www.springframework.org/schema/tx"
+    xmlns:aop="http://www.springframework.org/schema/aop"
+    xmlns:sa="https://spring-annotation.dev.java.net/context"
+
+    xsi:schemaLocation="
+	  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+	  http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
+	  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
 	&gt;
 
-	&lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
+    &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
     &lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/&gt;
 	
-		&lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
-		&lt;property name="scopes"&gt;
-			&lt;map&gt;
-				&lt;entry key="conversation.flash"&gt;
-					&lt;bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"&gt;
-						&lt;property name="advices"&gt;
-							&lt;list&gt;
-								&lt;ref bean="persistentContextConversationInterceptor" /&gt;
-							&lt;/list&gt;
-						&lt;/property&gt;
-					&lt;/bean&gt;
-				&lt;/entry&gt;
-			&lt;/map&gt;
-		&lt;/property&gt;
-	&lt;/bean&gt;
+    &lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
+      &lt;property name="scopes"&gt;
+        &lt;map&gt;
+          &lt;entry key="conversation.flash"&gt;
+            &lt;bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"&gt;
+              &lt;property name="advices"&gt;
+                &lt;list&gt;
+                  &lt;ref bean="persistentContextConversationInterceptor" /&gt;
+                &lt;/list&gt;
+              &lt;/property&gt;
+            &lt;/bean&gt;
+          &lt;/entry&gt;
+        &lt;/map&gt;
+      &lt;/property&gt;
+    &lt;/bean&gt;
 
-	&lt;bean id="thedataSource"
-		class="org.apache.commons.dbcp.BasicDataSource"&gt;
-		
-		&lt;property name="driverClassName" value="org.h2.Driver" /&gt;
-		&lt;property name="url"
-			value="jdbc:h2:/DATA/dummydatabase;MODE=MYSQL" /&gt;
+    &lt;bean id="thedataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
+      &lt;property name="driverClassName" value="org.h2.Driver" /&gt;
+      &lt;property name="url"
+        value="jdbc:h2:/DATA/dummydatabase;MODE=MYSQL" /&gt;
 		
-		&lt;property name="username" value="theusername" /&gt;
-		&lt;property name="password" value="thepassword" /&gt;
+      &lt;property name="username" value="theusername" /&gt;
+      &lt;property name="password" value="thepassword" /&gt;
 		
-		&lt;property name="initialSize"&gt;
-    		&lt;value&gt;2&lt;/value&gt;
-  		&lt;/property&gt;
-  		&lt;property name="maxActive"&gt;
-    		&lt;value&gt;100&lt;/value&gt;
-  		&lt;/property&gt;
-  		&lt;property name="maxIdle"&gt;
-    		&lt;value&gt;2&lt;/value&gt;
-  		&lt;/property&gt;
-	&lt;/bean&gt;
-
-	&lt;bean id="entityManagerFactory"
-		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
-
-		&lt;property name="dataSource" ref="thedataSource" /&gt;
-		&lt;property name="jpaDialect"&gt;
-     		&lt;bean class="org.springframework.orm.jpa.vendor.TopLinkJpaDialect" /&gt;
-   		&lt;/property&gt; 	
-		&lt;property name="jpaVendorAdapter"&gt;
-			&lt;bean
-				class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter"&gt;
-				&lt;property name="showSql" value="false" /&gt;
-				&lt;property name="generateDdl" value="true" /&gt;
-				&lt;property name="databasePlatform" value="oracle.toplink.essentials.platform.database.MySQL4Platform"
/&gt;
-			&lt;/bean&gt;
-		&lt;/property&gt;
+      &lt;property name="initialSize"&gt;
+        &lt;value&gt;2&lt;/value&gt;
+      &lt;/property&gt;
+      &lt;property name="maxActive"&gt;
+        &lt;value&gt;100&lt;/value&gt;
+      &lt;/property&gt;
+      &lt;property name="maxIdle"&gt;
+        &lt;value&gt;2&lt;/value&gt;
+      &lt;/property&gt;
+    &lt;/bean&gt;
+
+    &lt;bean id="entityManagerFactory"
+        class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
+
+      &lt;property name="dataSource" ref="thedataSource" /&gt;
+      &lt;property name="jpaDialect"&gt;
+        &lt;bean class="org.springframework.orm.jpa.vendor.TopLinkJpaDialect" /&gt;
+      &lt;/property&gt; 	
+      &lt;property name="jpaVendorAdapter"&gt;
+        &lt;bean
+            class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter"&gt;
+          &lt;property name="showSql" value="false" /&gt;
+          &lt;property name="generateDdl" value="true" /&gt;
+          &lt;property name="databasePlatform" value="oracle.toplink.essentials.platform.database.MySQL4Platform"
/&gt;
+        &lt;/bean&gt;
+      &lt;/property&gt;
 		
-		&lt;property name="jpaProperties"&gt;
+      &lt;property name="jpaProperties"&gt;
 			  
-			&lt;props&gt;
-				&lt;prop key="toplink.logging.level"&gt;INFO&lt;/prop&gt;
-				&lt;prop key="toplink.target-database"&gt;oracle.toplink.essentials.platform.database.MySQL4Platform&lt;/prop&gt;
-				&lt;prop key="toplink.ddl-generation"&gt;create-tables&lt;/prop&gt;
-				&lt;prop key="toplink.cache.type.default"&gt;HardWeak&lt;/prop&gt;
-				&lt;prop key="toplink.cache.size.default"&gt;5000&lt;/prop&gt;
-			&lt;/props&gt;
-		&lt;/property&gt;		
-		&lt;property name="loadTimeWeaver"&gt;
-			&lt;bean
-				class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /&gt;
-		&lt;/property&gt;
-	&lt;/bean&gt;
-
-	&lt;bean id="transactionManager"
-		class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
-		&lt;property name="entityManagerFactory"
-			ref="entityManagerFactory" /&gt;
+        &lt;props&gt;
+          &lt;prop key="toplink.logging.level"&gt;INFO&lt;/prop&gt;
+          &lt;prop key="toplink.target-database"&gt;oracle.toplink.essentials.platform.database.MySQL4Platform&lt;/prop&gt;
+          &lt;prop key="toplink.ddl-generation"&gt;create-tables&lt;/prop&gt;
+          &lt;prop key="toplink.cache.type.default"&gt;HardWeak&lt;/prop&gt;
+          &lt;prop key="toplink.cache.size.default"&gt;5000&lt;/prop&gt;
+        &lt;/props&gt;
+      &lt;/property&gt;		
+      &lt;property name="loadTimeWeaver"&gt;
+        &lt;bean
+            class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"
/&gt;
+      &lt;/property&gt;
+    &lt;/bean&gt;
+
+    &lt;bean id="transactionManager"
+        class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
+      &lt;property name="entityManagerFactory"
+        ref="entityManagerFactory" /&gt;
 		
     &lt;/bean&gt;
     
-	&lt;bean id="jpaPersistentContextFactory" class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory"&gt;
-		&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
-	&lt;/bean&gt;
- 	&lt;bean id="persistentContextConversationInterceptor" class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"&gt;
-		&lt;property name="persistenceContextFactory" ref="jpaPersistentContextFactory" /&gt;
-	&lt;/bean&gt;
+    &lt;bean id="jpaPersistentContextFactory" class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory"&gt;
+      &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+    &lt;/bean&gt;
+    &lt;bean id="persistentContextConversationInterceptor" class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"&gt;
+      &lt;property name="persistenceContextFactory" ref="jpaPersistentContextFactory"
/&gt;
+    &lt;/bean&gt;
 
-&lt;/beans&gt;		
+  &lt;/beans&gt;		
 		</pre>
 		
 		This configuration enables load time weaving of the orm classes and thus allows

Modified: myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml?rev=582404&r1=582403&r2=582404&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml Fri Oct  5 14:38:26 2007
@@ -29,14 +29,14 @@
 		<section name="Installation">
 		In the following, we will assume that you know how to setup
 			<ul>
-				<li>a servlet container (Tomcat, Jetty, etc)</li>
-
-				<li>your ORM tool (OpenJPA, Toplink.essentials, Hibernate, etc)</li>
-
-				<li>your JSF implementation (MyFaces, JSF-RI, etc)</li>
+				<li><p>a servlet container (Tomcat, Jetty, etc)</p></li>
+				<li><p>your ORM tool (OpenJPA, Toplink.essentials, Hibernate, etc)</p></li>
+				<li><p>your JSF implementation (MyFaces, JSF-RI, etc)</p></li>
 			</ul>
-			<p>For a beginner these are serious assumptions, however, anything
-				else would have made this guide way too long.
+			<p>
+			  For a beginner these are big assumptions; none of these technologies are simple.
+			  However we simply cannot conver these topics in a brief guide. In addition, these
+			  subjects are covered well elsewhere.
             </p>
 			<p>
                 For an absolute beginner in using these technologies, we recommend taking
a look at the
@@ -44,36 +44,32 @@
                 of kickstarting you in the world of JSF, Spring and JPA and then return back
to include Apache
                 Orchestra.
             </p>
+			<p>
             The installation guide will show you how to setup a JPA entity manager for Orchestra
(so you are
             working with the new JavaPersistence API standard). Later we hope to add chapters
on integrating
             directly with Hibernate and Toplink.
+            </p>
 
 			<subsection name="Prerequisites">
 				<ul>
-					<li>Apache MyFaces Orchestra core</li>
-
-					<li>Apache MyFaces Orchestra core15 (optional; requires java1.5 or later)</li>
-
-					<li>Spring 2.x</li>
-
-					<li>a JSF implementation (e.g. JSF-RI, MyFaces)</li>
-
-					<li>a JPA implementation (e.g. OpenJPA, toplink.essentials (formerly
-						Oracle Toplink)
-					</li>
-
-					<li>and all their dependencies
+					<li><p>Apache MyFaces Orchestra core</p></li>
+					<li><p>Apache MyFaces Orchestra core15 (optional; requires java1.5 or later)</p></li>
+					<li><p>Spring 2.x</p></li>
+					<li><p>a JSF implementation (e.g. JSF-RI, MyFaces)</p></li>
+					<li><p>a JPA implementation (e.g. OpenJPA, toplink.essentials (formerly
+						Oracle Toplink)</p></li>
+					<li><p>and all their dependencies
 						<br/>
 						This might sound somehow vague; however, the exact names of the necessary libraries
 						depends on the JSF and JPA implementation. If you have to setup
 						an application architecture like this from scratch it might be best to take a look
at our
 						examples package, and there in the file "pom.xml" which includes a section on the
-                        necessary dependencies.
+                        necessary dependencies.</p>
 					</li>
 				</ul>
 			</subsection>
 
-			<subsection name="Spring configuration">
+			<subsection name="Spring Configuration">
 				<p>
 				Apache MyFaces Orchestra uses the powerful Spring framework to provide its conversation
scope.
 				Spring is a dependency injection framework - just like the JSF managed-bean facility
which
@@ -88,108 +84,114 @@
 				context-parameter in your web.xml; for more information, take a look at the Spring documentation.
 				</p>
 				<pre>
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+<![CDATA[
+  <?xml version="1.0" encoding="UTF-8"?>
 
-	&lt;beans xmlns="http://www.springframework.org/schema/beans"
-		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		xmlns:tx="http://www.springframework.org/schema/tx"
-		xmlns:aop="http://www.springframework.org/schema/aop"
-		xsi:schemaLocation="
-		http://www.springframework.org/schema/beans
-		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
-		http://www.springframework.org/schema/aop
-		http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&gt;
-
-	&lt;!-- 1. initialization of all orchestra modules (required for core15 module) --&gt;
-	&lt;import resource="classpath*:/META-INF/spring-orchestra-init.xml" /&gt;
-
-	&lt;!-- 2. the conversation scope --&gt;
-	&lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
-		&lt;property name="scopes"&gt;
-			&lt;map&gt;
-				&lt;entry key="conversation.manual"&gt;
-					&lt;bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"&gt;
-						&lt;property name="timeout" value="30" /&gt;
-						&lt;property name="advices"&gt;
-							&lt;list&gt;
-								&lt;ref bean="persistentContextConversationInterceptor"/&gt;
-							&lt;/list&gt;
-						&lt;/property&gt;
-					&lt;/bean&gt;
-				&lt;/entry&gt;
-				&lt;entry key="conversation.flash"&gt;
-					&lt;bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"&gt;
-					    &lt;property name="timeout" value="30" /&gt;
-						&lt;property name="advices"&gt;
-							&lt;list&gt;
-								&lt;ref bean="persistentContextConversationInterceptor"/&gt;
-							&lt;/list&gt;
-						&lt;/property&gt;
-						&lt;property name="lifetime" value="flash"/&gt;
-					&lt;/bean&gt;
-				&lt;/entry&gt;
-			&lt;/map&gt;
-		&lt;/property&gt;
-	&lt;/bean&gt;
-
-	&lt;!-- 3. the "entity manager" manager --&gt;
-		&lt;bean id="persistentContextConversationInterceptor"
-			class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"&gt;
-		&lt;property name="persistenceContextFactory" ref="persistentContextFactory"/&gt;
-	&lt;/bean&gt;
-
-	&lt;!-- 4. conversation - persistence adapter --&gt;
-		&lt;bean id="persistentContextFactory"
-			class="org.apache.myfaces.orchestra.conversation.spring.JpaPersistenceContextFactory"&gt;
-		&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
-	&lt;/bean&gt;
-
-	&lt;!-- 5. persistence --&gt;
-	&lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/&gt;
-
-	&lt;tx:annotation-driven /&gt;
-
-	&lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
-		&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
-	&lt;/bean&gt;
-
-	&lt;bean id="entityManagerFactory"
-		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
-		&lt;property name="jpaProperties"&gt;
-			&lt;props&gt;
-				&lt;prop key="toplink.logging.level"&gt;FINE&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.driver"&gt;org.apache.derby.jdbc.EmbeddedDriver&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.url"&gt;jdbc:derby:myfacesOrchestraDB;create=true&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.user"&gt;sa&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.password"&gt;foobar&lt;/prop&gt;
-				&lt;prop key="toplink.target-database"&gt;oracle.toplink.essentials.platform.database.DerbyPlatform&lt;/prop&gt;
-				&lt;prop key="toplink.ddl-generation"&gt;create-tables&lt;/prop&gt;
-			&lt;/props&gt;
-		&lt;/property&gt;
-		&lt;property name="persistenceUnitName" value="default"/&gt;
-	&lt;/bean&gt;
-&lt;/beans&gt;
-				</pre>
-				<p>Basically, all you need to do is copy this configuration segment and paste it
-                    into your Spring configuration file. Then you'll need to adapt the settings
in the element
-                    entityManagerFactory - namely the jpaProperties. For a more detailed
explanation, we have
-                    included the following instructions - it is not necessary to read through
them.
+  <beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:tx="http://www.springframework.org/schema/tx"
+    xmlns:aop="http://www.springframework.org/schema/aop"
+    xsi:schemaLocation="
+    http://www.springframework.org/schema/beans
+    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
+    http://www.springframework.org/schema/aop
+    http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
+    <!-- 1. initialization of all orchestra modules (required for core15 module) -->
+    <import resource="classpath*:/META-INF/spring-orchestra-init.xml" />
+
+    <!-- 2. the conversation scopes -->
+    <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
+      <property name="scopes">
+        <map>
+          <entry key="conversation.manual">
+            <bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
+              <property name="timeout" value="30" />
+              <property name="advices">
+                <list>
+                  <ref bean="persistentContextConversationInterceptor"/>
+                </list>
+              </property>
+            </bean>
+          </entry>
+
+          <entry key="conversation.flash">
+            <bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
+              <property name="timeout" value="30" />
+              <property name="advices">
+                <list>
+                  <ref bean="persistentContextConversationInterceptor"/>
+                </list>
+              </property>
+              <property name="lifetime" value="flash"/>
+            </bean>
+          </entry>
+        </map>
+      </property>
+    </bean>
+
+    <!-- 3. the "entity manager" manager -->
+    <bean id="persistentContextConversationInterceptor"
+        class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor">
+      <property name="persistenceContextFactory" ref="persistentContextFactory"/>
+    </bean>
+
+    <!-- 4. conversation - persistence adapter -->
+    <bean id="persistentContextFactory"
+        class="org.apache.myfaces.orchestra.conversation.spring.JpaPersistenceContextFactory">
+      <property name="entityManagerFactory" ref="entityManagerFactory"/>
+    </bean>
+
+    <!-- 5. persistence -->
+    <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
+
+    <tx:annotation-driven />
+
+    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+      <property name="entityManagerFactory" ref="entityManagerFactory"/>
+    </bean>
+
+    <bean id="entityManagerFactory"
+        class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
+      <property name="jpaProperties">
+        <props>
+          <prop key="toplink.logging.level">FINE</prop>
+          <prop key="toplink.jdbc.driver">org.apache.derby.jdbc.EmbeddedDriver</prop>
+          <prop key="toplink.jdbc.url">jdbc:derby:myfacesOrchestraDB;create=true</prop>
+          <prop key="toplink.jdbc.user">sa</prop>
+          <prop key="toplink.jdbc.password">foobar</prop>
+          <prop key="toplink.target-database">oracle.toplink.essentials.platform.database.DerbyPlatform</prop>
+          <prop key="toplink.ddl-generation">create-tables</prop>
+        </props>
+      </property>
+      <property name="persistenceUnitName" value="default"/>
+    </bean>
+  </beans>
+  ]]>
+</pre>
+				<p>
+				Basically, all you need to do is copy this configuration segment and paste it
+                into your Spring configuration file. Then you'll need to adapt the settings
in the element
+                entityManagerFactory - namely the jpaProperties. For a more detailed explanation,
we have
+                included the following instructions - it is not necessary to read through
them.
                 </p>
 				<ul>
 					<li>1. initialization of orchestra modules
 						<br />
 						The Spring import statement will ensure that all <code>spring-orchestra-init.xml</code>
-						files are processed. Currently this is only required if you are going to use the
-						core15 module.
+						files are processed. Orchestra sets up some defaults in these init files that are
+						necessary for the correct functioning of Orchestra.
 					</li>
-					<li>2. the conversation scope
+					<li>2. the conversation scopes
 						<br/>
-						Here we configure the conversation
-						scope as a Spring custom scope. This configuration allows us to use	scope="conversation.flash"
-						or scope="conversation.manual" with our beans. This scope implementation also allows
you to
-						configure a number of advices. Advices intercept each method call to your bean. We
build on
-						this mechanism to configure the	entity manager appropriately.
+						Here we configure both "conversation.flash" and "conversation.manual" as new Spring
+						custom scopes. This configuration allows us to use	scope="conversation.flash"
+						or scope="conversation.manual" within our bean declarations. The scope definition
+						also allows a number of advices (interceptors) to be configured; advices intercept
+						each method call to a bean in that scope. We add an interceptor here to ensure that
+						on any call to a bean in that scope the entity manager (aka persistence context) is
+						set to be the appropriate one for that conversation.
 						<br/>
 						If your application does not have to deal with persistence, and you would still like
to use
 						the conversation scopes you can delete the advices from this configuration.
@@ -202,33 +204,33 @@
 						not explicitly end it using the conversation API.</b>
 					</li>
 
-					<li>3. the "entity manager" manager
+					<li>3. the "persistence context conversation interceptor"
 						<br/>
-						This is the interceptor which
-						ensures that the correct entity manager has been set - right before any method
-						of your conversation bean is called.
+						This tells spring what class to use for the interceptor specified in the scope
+						definitions. This orchestra class does the hard work of keeping the right
+						persistence context set up at all times.
 					</li>
 
 					<li>4. conversation - persistence adapter
 						<br/>
-						Depending on the ORM
-						tool you want to use you will have to configure a persistenceContextFactory. Apache
-						MyFaces Orchestra will provide a JPA-based implementation in its core15
-						package. Eventually, these adapter classes might be moved
-						to the Spring framework.
+						Depending on the ORM tool you want to use you will have to configure an appropriate
+						persistenceContextFactory. Apache MyFaces Orchestra provides a JPA implementation
+						in its current release; other adapters may be added in the future.
 					</li>
 
 					<li>5.persistence
 						<br/>
-						This is one of the ways how to configure an
-						entity manager factory and the persistence framework in Spring. You
-						can adapt this part as you like, just have a look at the Spring
-						documentation. For our example, we use
-						<code>&lt;tx:annotation-driven/&gt;</code>, if you are using
-						Java 1.4 you can choose any other Spring based persistence configurations. One of
-                        the features of Apache MyFaces Orchestra is that
-                        Orchestra <b>does not rely</b> on annotations. The above
configuration is just the
-						one we used for our applications.
+						This enables the standard Spring support for persistence annotations such as
+						@PersistenceContext; any bean instantiated by spring will be scanned for
+						annotations and the appropriate	dependencies injected.
+						<br/>
+						This section also sets up database transaction support.
+						<br/>
+						As this is all standard Spring functionality, have a look at the Spring
+						documentation for further details and options. For our example, we use
+						<code><tx:annotation-driven/></code>.
+						<br/>
+						If you are using Java 1.4 you can choose a non-annotation-based approach.
 					</li>
 				</ul>
 				<p>
@@ -243,98 +245,92 @@
                     documentation on how to do this.
                 </p>
 			</subsection>
-			<subsection
-				name="JSF configuration">Next you have to add some entries to your web.xml
-				configuration. They are:
+			<subsection name="JSF configuration">
+				<p>
+				Next you have to add some entries to your web.xml configuration. They are:
 				<ul>
-					<li>the Spring and Apache MyFaces Orchestra listeners</li>
-
-					<li>the Apache MyFaces Orchestra Filter</li>
+					<li><p>the Spring and Apache MyFaces Orchestra listeners</p></li>
+					<li><p>the Apache MyFaces Orchestra Filter</p></li>
 				</ul>
+				</p>
 				<p>In the end, the configuration will look like this:</p>
 				<pre>
-&lt;listener&gt;
-	&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
-&lt;/listener&gt;
-&lt;listener&gt;
-	&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
-&lt;/listener&gt;
-&lt;listener&gt;
-	&lt;listener-class&gt;org.apache.myfaces.orchestra.conversation.servlet.ConversationManagerSessionListener&lt;/listener-class&gt;
-&lt;/listener&gt;
+<![CDATA[
+<listener>
+	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+</listener>
+<listener>
+	<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+</listener>
+<listener>
+	<listener-class>org.apache.myfaces.orchestra.conversation.servlet.ConversationManagerSessionListener</listener-class>
+</listener>
+]]>
 				</pre>
 				<p>and</p>
 				<pre>
-&lt;filter&gt;
-	&lt;filter-name&gt;orchestraFilter&lt;/filter-name&gt;
-	&lt;filter-class&gt;org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter&lt;/filter-class&gt;
-&lt;/filter&gt;
-
-&lt;filter-mapping&gt;
-	&lt;filter-name&gt;orchestraFilter&lt;/filter-name&gt;
-	&lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
-&lt;/filter-mapping&gt;
-
+<![CDATA[
+<filter>
+	<filter-name>orchestraFilter</filter-name>
+	<filter-class>org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter</filter-class>
+</filter>
+
+<filter-mapping>
+	<filter-name>orchestraFilter</filter-name>
+	<url-pattern>*.faces</url-pattern>
+</filter-mapping>
+]]>
 				</pre>
 				<p>
 					<b>Notice:</b> Replace the <code>*.faces</code> url-pattern
by the one used by your application.
 				</p>
-				<p>
-					The OrchestraFilter ensures that any resources in use by the underlying framework
-                    (for example those of the ORM mapper in use) will be freed.
-				</p>
 			</subsection>
 
 			<subsection name="Mixed environment installation">
 				<p>
-					The RequestParameterProvider is a framework which allows one to add
-					parameter to the URL string.<br />
-					In an JSF environment care has been taken that this framework has been
-					setup without further configuration.
+					If your application has only JSF pages then no further configuration is required.
 				</p>
 				<p>
-					Though, if you have to deal with mixed environments e.g. JSP+JSF you have
-					to ensure the RequestParameterServletFilter will be called for the JSP pages
-					too.
-				</p>
-				<p>
-					To ensure this, you have to configure two additional filters like this:
+					However if your application includes jsp, plain servlets, or anything else that
+					does not pass through the FacesServlet then two additional filters must be
+					defined:
 				</p>
 <pre>
-	&lt;filter&gt;
-		&lt;filter-name&gt;frameworkAdapterFilter&lt;/filter-name&gt;
-		&lt;filter-class&gt;org.apache.myfaces.orchestra.frameworkAdapter.jsf.FrameworkAdapterServletFilter&lt;/filter-class&gt;
-	&lt;/filter&gt;
-
-	&lt;filter&gt;
-		&lt;filter-name&gt;requestParameterFilter&lt;/filter-name&gt;
-		&lt;filter-class&gt;org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter&lt;/filter-class&gt;
-	&lt;/filter&gt;
-
-	&lt;filter-mapping&gt;
-		&lt;filter-name&gt;frameworkAdapterFilter&lt;/filter-name&gt;
-		&lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
-	&lt;/filter-mapping&gt;
-
-	&lt;filter-mapping&gt;
-		&lt;filter-name&gt;requestParameterFilter&lt;/filter-name&gt;
-		&lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
-	&lt;/filter-mapping&gt;
-</pre>
+<![CDATA[
+	<filter>
+		<filter-name>frameworkAdapterFilter</filter-name>
+		<filter-class>org.apache.myfaces.orchestra.frameworkAdapter.basic.BasicFrameworkAdapterFilter</filter-class>
+	</filter>
+
+	<filter>
+		<filter-name>requestParameterFilter</filter-name>
+		<filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>frameworkAdapterFilter</filter-name>
+		<url-pattern>*.jsp</url-pattern>
+	</filter-mapping>
+
+	<filter-mapping>
+		<filter-name>requestParameterFilter</filter-name>
+		<url-pattern>*.jsp</url-pattern>
+	</filter-mapping>
+]]></pre>
 			</subsection>
 
-			<subsection name="Conclusion">That's all
-				for the basic configuration of Apache MyFaces Orchestra, now you should have
-				a working conversation scope. In fact there is nothing special in creating
-				the database access objects (DAO) or your business objects (BO). Your
-				JSF page backing beans will also look the same - however, you configure them in Spring
and put them into the
-				conversation scope now.
+			<subsection name="Conclusion">
+			    That's all for the basic configuration of Apache MyFaces Orchestra; now you should
have
+				working conversation scopes and correctly configured persistence. In fact there is nothing
+				special in creating	the database access objects (DAO) or your business objects (BO).
Your
+				JSF page backing beans will also look the same - however, you configure them in Spring
and
+				put them into the conversation scope now, rather than session scope.
 			</subsection>
 
 		</section>
 		<section name="User provided configurations">
 			<ul>
-				<li><a href="alternative-configuration.html">A spring configuration using
toplink and load time weaving with tomcat</a></li>
+				<li><p><a href="alternative-configuration.html">A spring configuration
using toplink and load time weaving with tomcat</a></p></li>
 			</ul>
 		</section>
 	</body>



Mime
View raw message