You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Martin de la Rosa <md...@southward-solutions.com.ar> on 2008/05/06 00:44:49 UTC

Disabling Persistence Conversation Feature

Hi!

 

I'm trying to use MyFaces Orchestra for adding conversation scope to the
MBeans of an already developed application. 

 

I'm asking if there there exists an elegant way to disable the persistence
conversation feature of Orchestra framework? I only need the conversation
scopes (access/manual) feature and I don't want to change the Persistence
Mechanism of the application.

 

I tried deleting the part regardless to persistence from spring
configuration (application-context.xml) but no success. I encountered
exceptions thrown by the Orchestra Conversation Interceptor.

 

Thanks in advance!

 

Martin de la Rosa -.

 <http://www.southward-solutions.com.ar/> www.southward-solutions.com.ar

 


RE: [Orchestra] Disabling Persistence Conversation Feature

Posted by Martin de la Rosa <md...@southward-solutions.com.ar>.
Thanks! This solved my problem. It's working great now. 

Sorry for writing on this list, I will post my future comments on users
list.

Regards,
Martin de la Rosa-.

-----Original Message-----
From: simon.kitching@chello.at [mailto:simon.kitching@chello.at] 
Sent: Martes, 06 de Mayo de 2008 04:42 a.m.
To: MyFaces Development
Subject: Re: [Orchestra] Disabling Persistence Conversation Feature

Mario Ivankovits schrieb:
> Hi!
>>
>> I tried deleting the part regardless to persistence from spring
>> configuration (application-context.xml) but no success. I encountered
>> exceptions thrown by the Orchestra Conversation Interceptor.
>>
> Not configuring the persistence related advice (e.g the
> persistentContextConversationInterceptor) with the scope should be
> sufficient.
> section.
> What exceptions do you encounter?

For conversations *with* persistence support, you'll have something like
this in the spring config file:

  <entry key="conversation.manual">
    <bean
class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationSc
ope">
      <property name="timeout" value="30" />
      <property name="advices">
        <list>
          <ref bean="persistentContextConversationInterceptor"/>
        </list>
      </property>
    </bean>
  </entry>

If you don't need persistence, just leave out the "advices" property. It
is the persistenceContextConversationInterceptor that does all the work
of binding a PersistenceContext to a conversation instance.

And in future, please ask questions on the user list. It's better for
*you* because there are lots of very competent people who subscribe to
the users list but not the dev list. And all developers subscribe to both.

Regards,
Simon


Re: [Orchestra] Disabling Persistence Conversation Feature

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Mario Ivankovits schrieb:
> Hi!
>>
>> I tried deleting the part regardless to persistence from spring
>> configuration (application-context.xml) but no success. I encountered
>> exceptions thrown by the Orchestra Conversation Interceptor.
>>
> Not configuring the persistence related advice (e.g the
> persistentContextConversationInterceptor) with the scope should be
> sufficient.
> section.
> What exceptions do you encounter?

For conversations *with* persistence support, you'll have something like
this in the spring config file:

  <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>

If you don't need persistence, just leave out the "advices" property. It
is the persistenceContextConversationInterceptor that does all the work
of binding a PersistenceContext to a conversation instance.

And in future, please ask questions on the user list. It's better for
*you* because there are lots of very competent people who subscribe to
the users list but not the dev list. And all developers subscribe to both.

Regards,
Simon


Re: [Orchestra] Disabling Persistence Conversation Feature

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
>
> I tried deleting the part regardless to persistence from spring
> configuration (application-context.xml) but no success. I encountered
> exceptions thrown by the Orchestra Conversation Interceptor.
>
Not configuring the persistence related advice (e.g the
persistentContextConversationInterceptor) with the scope should be
sufficient.

What exceptions do you encounter?

Ciao,
Mario