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><aop:scoped-proxy></code> configuratino with in the
+ <code>persistentContextConversationInterceptor</code> definition.
+ You'll end up with something like:
+ <pre>
+<bean id="persistentContextConversationInterceptor" class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor">
+ <aop:scoped-proxy/>
+ <property name="persistenceContextFactory" ref="persistentContextFactory"/>
+</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><aop:scoped-proxy></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">
- <!-- 1. the conversation scope -->
+ <!-- 1. initialization of all orchestra modules (required for core15 module) -->
+ <import resource="classpath*:/META-INF/spring-orchestra-init.xml" />
+
+ <!-- 2. the conversation scope -->
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
@@ -95,19 +98,19 @@
</property>
</bean>
- <!-- 2. the "entitiy manager" manager -->
+ <!-- 3. the "entitiy manager" manager -->
<bean id="persistentContextConversationInterceptor"
class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor">
<property name="persistenceContextFactory" ref="persistentContextFactory"/>
</bean>
- <!-- 3. conversation - persistence adapter -->
+ <!-- 4. conversation - persistence adapter -->
<bean id="persistentContextFactory"
class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
- <!-- 4. persistence -->
+ <!-- 5. persistence -->
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
<tx:annotation-driven />
@@ -120,13 +123,13 @@
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>
+ <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"/>
@@ -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