You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/08/18 08:45:10 UTC

svn commit: r567240 - in /myfaces/orchestra/trunk: core/src/site/xdoc/faqs.xml core/src/site/xdoc/installation.xml src/site/xdoc/index.xml

Author: imario
Date: Fri Aug 17 23:45:09 2007
New Revision: 567240

URL: http://svn.apache.org/viewvc?view=rev&rev=567240
Log:
fixed documentation bug (thanks to Martin Marinschek for pointing out)
added faq and updated installation description regarding loading of module initialization configuration

Modified:
    myfaces/orchestra/trunk/core/src/site/xdoc/faqs.xml
    myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml
    myfaces/orchestra/trunk/src/site/xdoc/index.xml

Modified: myfaces/orchestra/trunk/core/src/site/xdoc/faqs.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/faqs.xml?view=diff&rev=567240&r1=567239&r2=567240
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/faqs.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/faqs.xml Fri Aug 17 23:45:09 2007
@@ -60,6 +60,27 @@
 				</p>
 
 			</subsection>
+
+			<subsection name="PropertyPlaceholderConfigurer STOPS working after the introduction of orchestra into my configuration">
+				<p>
+					Use the <code>&lt;aop:scoped-proxy&gt;</code> configuratino with in the
+					<code>persistentContextConversationInterceptor</code> definition.
+					You'll end up with something like:
+					<pre>
+&lt;bean id="persistentContextConversationInterceptor" class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"&gt;
+    &lt;aop:scoped-proxy/&gt;
+    &lt;property name="persistenceContextFactory" ref="persistentContextFactory"/&gt;
+&lt;/bean>
+					</pre>
+				</p>
+				<p>
+					The reason is, that, during startup of the spring system when the custom scope will
+					be initialized, the system might already require a datasource, but at this time
+					the <code>PropertyPlaceholderConfigurer</code> didn't run already.<br />
+					Using the <code>&lt;aop:scoped-proxy&gt;</code> configuration allows the initialization
+					process to end cleanly.
+				</p>
+			</subsection>
 		</section>
 	</body>
 </document>

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?view=diff&rev=567240&r1=567239&r2=567240
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml Fri Aug 17 23:45:09 2007
@@ -78,7 +78,10 @@
 		http://www.springframework.org/schema/aop
 		http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&gt;
 
-	&lt;!-- 1. the conversation scope --&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;
@@ -95,19 +98,19 @@
 		&lt;/property&gt;
 	&lt;/bean&gt;
 
-	&lt;!-- 2. the "entitiy manager" manager --&gt;
+	&lt;!-- 3. the "entitiy 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;!-- 3. conversation - persistence adapter --&gt;
+	&lt;!-- 4. conversation - persistence adapter --&gt;
 		&lt;bean id="persistentContextFactory"
 			class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory"&gt;
 		&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
 	&lt;/bean&gt;
 
-	&lt;!-- 4. persistence --&gt;
+	&lt;!-- 5. persistence --&gt;
 	&lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/&gt;
 
 	&lt;tx:annotation-driven /&gt;
@@ -120,13 +123,13 @@
 		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
 		&lt;property name="jpaProperties"&gt;
 			&lt;props&gt;
-				&lt;prop key="toplink.logging.level"&lt;FINE&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.driver"&lt;org.apache.derby.jdbc.EmbeddedDriver&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.url"&lt;jdbc:derby:myfacesOrchestraDB;create=true&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.user"&lt;sa&lt;/prop&gt;
-				&lt;prop key="toplink.jdbc.password"&lt;foobar&lt;/prop&gt;
-				&lt;prop key="toplink.target-database"&lt;oracle.toplink.essentials.platform.database.DerbyPlatform&lt;/prop&gt;
-				&lt;prop key="toplink.ddl-generation"&lt;create-tables&lt;/prop&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;
@@ -139,7 +142,13 @@
                     included the following instructions - it is not necessary to read through them.
                 </p>
 				<ul>
-					<li>1. the conversation scope
+					<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.
+					</li>
+					<li>2. the conversation scope
 						<br/>
 						Here we configure the conversation
 						scope as a Spring custom scope. This configuration allows us to use
@@ -153,14 +162,14 @@
 						scope you can delete the advices from this configuration.
 					</li>
 
-					<li>2. the "entity manager" manager
+					<li>3. the "entity manager" manager
 						<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.
 					</li>
 
-					<li>3. conversation - persistence adapter
+					<li>4. conversation - persistence adapter
 						<br/>
 						Depending on the ORM
 						tool you want to use you will have to configure a persistenceContextFactory. Apache
@@ -169,7 +178,7 @@
 						to the Spring framework.
 					</li>
 
-					<li>4.persistence
+					<li>5.persistence
 						<br/>
 						This is one of the ways how to configure an
 						entity manager factory and the persistence framework in Spring. You

Modified: myfaces/orchestra/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/src/site/xdoc/index.xml?view=diff&rev=567240&r1=567239&r2=567240
==============================================================================
--- myfaces/orchestra/trunk/src/site/xdoc/index.xml (original)
+++ myfaces/orchestra/trunk/src/site/xdoc/index.xml Fri Aug 17 23:45:09 2007
@@ -101,9 +101,7 @@
 
 			<subsection name="Highlights">
 				<ul>
-					<li>It works with a Java 1.4-compliant syntax, but you can optionally use annotations
-						(in the persistence layer - in the future, additional annotations for
-						Orchestra itself might be added).</li>
+					<li>It works with a Java 1.4-compliant syntax, but you can optionally use annotations</li>
 					<li>It utilizes the powerful Spring bean configuration mechanism instead of JSF's
 						managed-bean facility.
 						Departing from Spring 2.0, it is possible to configure session and request-scoped