You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it a good idea to define a reactive subresource as @Singleton and later inject it? My motivation for injection was that without it, by simply returning new CurrentUserResource(), CDI was not aware of it, and I could not inject anything inside (for example, @Inject JsonWebToken jwt; inside CurrentUserResource kept returning null)
Is it correct to return Uni<...subresource...>? I tried simply public CurrentUserResource userSubResource(){...}, however DEV UI kept saying that the "/v1/users/me" "Relies on a blocking worker thread".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a subresource CurrentUserResource.java:
And I have a UsersResource.java, where I want to register CurrentUserResource as a subresource for path "/v1/users/me":
I am wondering:
@Singleton
and later inject it? My motivation for injection was that without it, by simply returningnew CurrentUserResource()
, CDI was not aware of it, and I could not inject anything inside (for example,@Inject JsonWebToken jwt;
inside CurrentUserResource kept returning null)Uni<...subresource...>
? I tried simplypublic CurrentUserResource userSubResource(){...}
, however DEV UI kept saying that the "/v1/users/me" "Relies on a blocking worker thread".Beta Was this translation helpful? Give feedback.
All reactions