MP-JWT @Claim ClaimValue injection scope?

31 views
Skip to first unread message

Arjan Tijms

unread,
Dec 13, 2017, 8:56:12 AM12/13/17
to Eclipse MicroProfile
Hi,

David Blevins suggest that ClaimValue injection should be proxied, and therefor allowing injection in non-request scoped beans. 


I can't find anything about this in the spec though. I've asked David for clarification, but he hasn't replied yet. Does anyone else here have an idea of what David is referring to?

Kind regards,
Arjan Tijms

Arjan Tijms

unread,
Dec 16, 2017, 5:58:14 AM12/16/17
to Eclipse MicroProfile
Anyone?

John D. Ament

unread,
Dec 16, 2017, 10:24:20 AM12/16/17
to Eclipse MicroProfile
It depends on the type of object you're injecting.  In Java, you can't proxy a final class.  So classes like java.lang.String, java.lang.Integer aren't proxiable.  We can only provide those as dependent scoped beans.  I asked to avoid obtuse validation, since the user will be accustomed to the behavior based on how CDI works.  It shouldn't come as a surprise that this stuff doesn't work right when you inject into app scoped beans.

I believe everything in Hammock is a dependent scoped bean, with the intention that you're only injecting it into a request scoped bean.  I think one of the examples is creating your own bean that is @RequestScoped.

John

arjan tijms

unread,
Dec 16, 2017, 11:32:35 AM12/16/17
to MicroProfile
Hi,

Making everything depend scoped seems to be what the spec is asking for, but then I don't understand David's remark and the issue he created. He could be simply wrong though.

Kind regards,
Arjan Tijms



--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/yLZRn3I-5so/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile+unsubscribe@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/756dd345-55ef-4c92-a698-d2055c5d9531%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages