You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by simon <si...@chello.at> on 2007/10/07 10:55:32 UTC

Re: [orchestra] Using LocalFrameworkAdapter (was: getting ready for a release)

Hi Dan,

The LocalFrameworkAdapter is not created via a variable lookup;
instances are just created via a call to "new" from the corresponding
servlet filter. There is therefore no way to do dependency-injection
into it. It would not be nice to have the filters use Spring, as we
would then need a different filter implementation for each DI framework
we support.

So the "localFrameworkAdapter" bean you show below will never be used.
See the class LocalFrameworkAdapterFilter for details.

The conversationMessager setup you show below is what I had intended.
However as Mario notes, there is a problem: we only allow one
conversationMessager bean definition, but each of the frameworks should
use a different class. There is no way to currently express this. Your
config below for the conversationMessager will set it globally -
including for JSF requests.

I suggest instead you either remove this setting, or use
  o.a.m.o.conversation.jsf.JsfConversationMessager
as the class. This is technically wrong when your background thread is
running, but as long as nothing tries to actually use the messager
everything should run ok. And I guess nothing does, otherwise the old
orchestra code would have failed too.

Regards,

Simon

On Sat, 2007-10-06 at 20:35 -0700, Dan Tran wrote:
> 
> Simon, below is my LocalFrameworkAdatper configuration due your latest
> changes
> 
>   <bean id="localFrameworkAdapter"
> class="org.apache.myfaces.orchestra.frameworkAdapter.local.LocalFrameworkAdapter"
> autowire="byName"
>     scope="prototype" />
>     
>   <!-- ConversationMessager def needed because we are using the special
> LocalFrameworkAdapter. -->
>   <bean
> name="org.apache.myfaces.orchestra.conversation.ConversationMessager"
>    
> class="org.apache.myfaces.orchestra.conversation.basic.BasicConversationMessager"/>
> 
> 
> is there another more nature way ? like some thing I can inject into
> LocalFrameworkAdapater?