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
first of all thanks for adding Flow as an option for SSE endpoints.
But currently when using Flow this leads to a ContextNotActiveException, when combining it with the access to a request scoped bean
Kind regards
Expected behavior
The value of the request scoped bean can be accessed within the context of a Flow
Actual behavior
When trying to access a property of the request scoped bean a javax.enterprise.context.ContextNotActiveException is thrown
How to Reproduce?
Request scoped bean @RequestScoped class RequestScopedBean( var user: String? = null )
Endpoint
@Path("/hello")
class ReactiveGreetingResource(private val requestScopedBean: RequestScopedBean) {
@GET
@RestSseElementType(MediaType.TEXT_PLAIN)
fun hello(): Flow<String> = flow {
emit("Hello RESTEasy Reactive")
delay(1_000)
emit("Hello again from ${requestScopedBean.user}")
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi Quarkus Team,
first of all thanks for adding Flow as an option for SSE endpoints.
But currently when using Flow this leads to a ContextNotActiveException, when combining it with the access to a request scoped bean
Kind regards
Expected behavior
The value of the request scoped bean can be accessed within the context of a Flow
Actual behavior
When trying to access a property of the request scoped bean a javax.enterprise.context.ContextNotActiveException is thrown
How to Reproduce?
Request scoped bean
@RequestScoped class RequestScopedBean( var user: String? = null )
Endpoint
The text was updated successfully, but these errors were encountered: