On Sat, Nov 22, 2008 at 2:37 PM, Mario Ivankovits (Apache)
<imario_at_apache.org> wrote:
> As far as I know you can not have extended classes after the scope= stuff, you need to use exactly the class as configured by the annotation interface.
I wasn't sure if that is possible or not (and I haven't tried), but
thanks for the clarification.
>
> Means, if you'd like to introduce a new scope you need another way of dealing with that.
> Something like scope=Scope.CUSTOM and then any additional custom annotation.
>
> Using @SessionScoped, @RequestScoped and later on a custom scope @ConversationScoped (probably all inherited from a Scope annatation) makes things the same for all use-cases.
> It is more extensible that way.
@Blah
@Blub
@Bean
@Scope
==> annotation hell :-)
@ManagedBean(name= , scope="session")
(of course, one could write the session wrong...(sessssssion :))
-Matthias
> I am not sure if custom scopes are planned for JSF 2, though, but I think at least they are doable then ... in another spec.
>
>
> But, for sure, just wild guesses if this was the motivation behind that.
>
> Ciao,
> Mario
>
>
>> -----Original Message-----
>> From: mwessendorf_at_gmail.com [mailto:mwessendorf_at_gmail.com] On Behalf Of
>> Matthias Wessendorf
>> Sent: Saturday, November 22, 2008 1:11 PM
>> To: dev_at_javaserverfaces.dev.java.net
>> Subject: JSF 2 - Annotations
>>
>> Hi,
>>
>> I wonder about things like this:
>> @ManagedBean(name = "userInfo")
>> @SessionScoped
>> public class UserSessionInformationBean
>> {
>> ...
>> }
>>
>> Why not using the Shale way of things ?
>>
>> ==> @Bean(name="mybean", scope=Scope.SESSION)
>> (where scope is an enum)
>>
>> Thanks!
>> Matthias
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf