-
1. Re: Do CDI beans need to be @ApplicationScoped for errai to use?
csa Jul 5, 2011 12:48 PM (in response to craiggreenhalgh)Errai 1.2.3-SNAPSHOT has support for @SessionScoped. We don't currently support @RequestScoped. Can you describe why you'd prefer @RequestScoped in your scenario or is @SessionScoped solving you problem?
Cheers,
Christian
-
2. Re: Do CDI beans need to be @ApplicationScoped for errai to use?
craiggreenhalgh Jul 5, 2011 1:24 PM (in response to csa)Hi thanks for your reply.
Is the setup different in 1.2.3-SNAPSHOT ?
When I change my CDI bean that Observes GWT events to SessionScope, neither an injected bean (SessionScope) or my Events (Event<ResponseEvent> responseEvent) are injected?
Any ideas?
Thanks for your help
Craig
-
3. Re: Do CDI beans need to be @ApplicationScoped for errai to use?
csa Jul 5, 2011 1:50 PM (in response to craiggreenhalgh)You could use the latest version of the Errai CDI archetype:
mvn archetype:generate -DarchetypeGroupId=org.jboss.errai -DarchetypeArtifactId=errai-cdi-archetype -DarchetypeVersion=1.2.3-SNAPSHOT -DarchetypeRepository=https://repository.jboss.org/nexus/content/repositories/snapshots/
There's also a demo using the latest CDI features ( https://github.com/errai/JBWDemo ) which you can take a look at to compare your setup.
Replacing @ApplicationScoped with @SessionScoped in this example works fine.
-
4. Re: Do CDI beans need to be @ApplicationScoped for errai to use?
craiggreenhalgh Jul 6, 2011 3:43 AM (in response to csa)Hi Christian,
Yes using the snapshot and sessionbean has solved my issue.
The reason for wanting to use requestscope is realy so the app is as lightweight as possible and a mass of session beans are not hanging arround.
Many thanks again for your help
Craig