I might be doing something wrong, but if I try to instantiate a factory created Spring bean which scope is managed by JSF, I get an exception "FactoryBean must be defined as singleton - FactoryBeans themselves are not allowed to be prototypes". I have defined a spring bean with: singleton="false" factory-bean="dataFactory" factory-method="getData" and this used to work in 3.0.0M1. Even after looking at the examples in testsuite (which btw, are not part of the release - is this intentional or not?) it wasn't immediately obvious to me if you are supposed to do this somehow differently in 3.0.0M2. Referring to Spring singletons work ok and from the examples, it looks as if you should still set the singleton to false and set the scope in faces-config if you want the bean scope to be managed by JSF (as in testsuite with numberBean defined in applicationContext & faces-config-scope). Has the way to configure this changed or is this a bug?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Got it. Since you now specify the scope with a jsf-spring class (as in spring.SessionScope), the actual spring managed bean scope has to be set to application.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I might be doing something wrong, but if I try to instantiate a factory created Spring bean which scope is managed by JSF, I get an exception "FactoryBean must be defined as singleton - FactoryBeans themselves are not allowed to be prototypes". I have defined a spring bean with: singleton="false" factory-bean="dataFactory" factory-method="getData" and this used to work in 3.0.0M1. Even after looking at the examples in testsuite (which btw, are not part of the release - is this intentional or not?) it wasn't immediately obvious to me if you are supposed to do this somehow differently in 3.0.0M2. Referring to Spring singletons work ok and from the examples, it looks as if you should still set the singleton to false and set the scope in faces-config if you want the bean scope to be managed by JSF (as in testsuite with numberBean defined in applicationContext & faces-config-scope). Has the way to configure this changed or is this a bug?
Got it. Since you now specify the scope with a jsf-spring class (as in spring.SessionScope), the actual spring managed bean scope has to be set to application.
sorry for the bad docs. we will release a documented version very soon