I'm cleaning up some warnings, and I came up on some code using the connection() method of StatelessSession, whose deprecation doc says they missed it when deprecation the same method on Session.
Now, the answers to this question point to the doWork method on Session, but no such method exists on StatelessSession. So, how is one supposed to fix this deprecation?