You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2007/10/07 11:28:00 UTC

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

we have a laf-filter?

The LAF stuff is meant to be used just from the application code whe reqired - in parallel to any other used FA.


Mario

-----Original Message-----
From: simon <si...@chello.at>
Date: Sunday, Okt 7, 2007 10:57 am
Subject: Re: [orchestra] Using LocalFrameworkAdapter (was: getting ready 	for a release)
To: Reply-    "MyFaces Development" <de...@myfaces.apache.org>To: MyFaces Development <de...@myfaces.apache.org>

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


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

Posted by simon <si...@chello.at>.
Ach, sorry. I got that completely wrong. You and Dan are quite right - a
LocalFrameworkAdapter instance is just created dynamically. I guess
that's what your spring bean is used for?

And in that case I guess it would make some sense to have the messager
instance injected. It isn't currently supported, however, and it doesn't
make much sense for any of the other framework adapter types.

The general issue of multiple framework support (eg JSF and JSP
together) still exists.

I didn't sleep at all well last night, and I guess it's showing :-(.



Regards,

Simon

On Sun, 2007-10-07 at 11:28 +0200, Mario Ivankovits wrote:
> we have a laf-filter?
> 
> The LAF stuff is meant to be used just from the application code whe reqired - in parallel to any other used FA.
> 
> 
> Mario
> 
> -----Original Message-----
> From: simon <si...@chello.at>
> Date: Sunday, Okt 7, 2007 10:57 am
> Subject: Re: [orchestra] Using LocalFrameworkAdapter (was: getting ready 	for a release)
> To: Reply-    "MyFaces Development" <de...@myfaces.apache.org>To: MyFaces Development <de...@myfaces.apache.org>
> 
> 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?
> >
> >
>