Hi John,
No problem, I know what is it to not having enough time ;).
Be sure, that your contribution will be appreciated in its time.
The bug bug you’re experiencing is due to the new OAuhtSession and OAuthRepo mechanism I put in place.
You can stop this ambiguity by specifying how you want your OauthSession to be produced in your agorava.properties file (in WEB-INF or your class path)
You have to choose between this choices :
- application —> you’ve got one OAuthSession (one connexion for a given Social Network account) for the whole application. This is not suitable for Web App, but useful for desktop or server side apps
- session —> your OauthSession are stored in Http Session. This was the previous behavior but was too stageful for whole use case
- request —> your OauthSession are managed for each web user but stored in ApplicationScope. You keep your session repo by an id in the url
- cookie —> your OauthSession are managed for each web user but stored in ApplicationScope. You keep your session repo by a cookie on client
To activate one mode you’ll have to add
producerScope=<your choice>
in agorava.properties.
for instance
producerScope=cookie
Check how it is done in Agorava with cookie mode
And don’t hesitate to check the code of the different producers. It can be helpful
etc...
Sorry for the inconvenient. Apprently when producerScope property is not defined all producers get activated.
Antoine Sabot-Durand
———————————————
Senior Software engineer
CDI co-spec lead
CDI eco-system development
PS : I forwarded this thread to Agorava ML / group since, I think it could be profitable to everyone
Hi guys,
Sorry I haven't had time to start contributing to the Agorava project as I spoke of several weeks ago. I'm getting back into the swing of things again after some business travel and looking forward to providing some code contributions in the coming weeks.
Antoine, I see that you've been working hard on Agorava core and I've seen many of the JIRA updates you've made recently. It's great to see such rapid progression for the project!
Using the latest 0.7.0-SNAPSHOT, I'm trying to deploy a test app on Glassfish 4 using an updated Weld - 2.0.4-Final. I'm getting an ambiguous CDI bean error. It seems the javax.enterprise.context.*Scoped annotations are not being considered as qualifiers for the getCurrentRepo method in the In*Producer classes. Looking at the source code for the javax.enterprise.context.*Scoped annotations from Weld 2.0.4, I don't see them annotated with @javax.inject.Qualifier. An exception with the following message is thrown:
WELD-001414 Bean name is ambiguous. Name currentRepo resolves to beans: [
Producer Method [UserSessionRepository] with qualifiers [@Current @Any @Named] declared as [[BackedAnnotatedMethod] @Produces @Current @Named @SessionScoped public org.agorava.cdi.InSessionProducer.getCurrentRepo()],
Producer Method [UserSessionRepository] with qualifiers [@Current @Any @Named] declared as [[BackedAnnotatedMethod] @Produces @Current @Named @RequestScoped public org.agorava.cdi.InCookieProducer.getCurrentRepo()],
Producer Method [UserSessionRepository] with qualifiers [@Current @Any @Named] declared as [[BackedAnnotatedMethod] @Produces @Current @Named @ApplicationScoped public org.agorava.cdi.InApplicationProducer.getCurrentRepo()],
Producer Method [UserSessionRepository] with qualifiers [@Current @Any @Named] declared as [[BackedAnnotatedMethod] @Produces @Current @Named @RequestScoped public org.agorava.cdi.InRequestProducer.getCurrentRepo()]]
Have you run into the same problem? In any case, what version of Weld are you using? Perhaps we need custom qualifiers to be annotated on these methods.
Thanks,
John