alsha schrieb: > Hi, > > I am using Hibernate and have 2 session factories congigured: > > 1. sessionFactory -> persistentContextFactory > 2. dmsSessionFactory -> dmsPersistentContextFactory > > Each one has its own interceptor (persistentContextConversationInterceptor > and dmsPersistentContextConversationInterceptor). > > Now I configure my conversation scope as follows: > > ... > <entry key="conversation.manual"> > <bean > class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"> > <!--<property name="timeout" value="15" /--> > <property name="advices"> > <list> > <ref bean="persistentContextConversationInterceptor" > /> > <ref > bean="dmsPersistentContextConversationInterceptor" /> > </list> > </property> > </bean> > </entry> > ... > > But it seems, like only the first interceptor works (For example, the > entities from dmsSessionFactory couldn't be loaded lazyly...) > > What I am doing wrong? >
You're doing nothing wrong, it just isn't currently supported by Orchestra. Class PersistenceContextConversationInterceptor stores the current conversation context into a conversation attribute using key PERSISTENCE_CONTEXT_CONV_ATTRIBUTE. So only one persistence context per conversation is supported. By the way, if Orchestra did support multiple persistence contexts, then how would code specify which was being used with which operation (in particular, with the @Transactional annotation)? Regards, Simon

