You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stefano Panero <st...@gmail.com> on 2008/05/16 21:19:16 UTC
[Orchestra] using orchestra conversation without a db connection
Hi,
I can't understand if it's possible and, if it is, how to use
orchestra conversation without a db connection.
In the documentation -> installation site section there is this spring
configuration file
<!-- 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.access">
<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="access"/>
</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>
This configuration needs a db connection,
but in my environment, a typical SOA architecture, a can't have it.
How can I use only conversation feature without a transaction manager?
Thanks a lot,
Stefano.
Re: [Orchestra] using orchestra conversation without a db connection
Posted by Gerald Müllan <gm...@apache.org>.
Hi,
you can just leave out the section
<property name="advices">
<list>
<ref bean="persistentContextConversationInterceptor"/>
</list>
</property>
on each scope.
cheers,
Gerald
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces