Replies: 2 comments
-
/cc @FroMage, @loicmathieu |
Beta Was this translation helpful? Give feedback.
0 replies
-
Update: I have no problem when using a raw query with Session object (even though I still need to open the session manually). So the problem seems to be on Reactive Panache side, which doesn't work well with the session opened manually. @ServerEndpoint("/websocket/{name}")
@ApplicationScoped
class StartWebSocket(
val sessionFactory: SessionFactory
) {
@OnOpen
fun onOpen(session: Session, @PathParam("name") name: String) {
sessionFactory.withSession { it.createQuery<User>("from User").singleResult }.subscribe().with { println("Found: ${it?.username}") }
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I am trying access a reactive Panache Entity Session Manager from a websocket but I cannot get it to work.
Here
User
is a basic PanacheEntity with a name attribute:I tried two solutions:
1
This one throws an exception:
I don't understand why the session is closed on this vert.x thread (vert.x-eventloop-thread-3,5,main)
2
The session is closed, so let's open one...
...but it doesn't work too.. Or to be more precise, it works 3 times and then it fails for timeout.
Does someone have an idea on how to make it work please?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions