https://kotlinlang.org logo
#http4k
Title
# http4k
j

Jippe Holwerda

09/08/2021, 9:26 AM
Hi all. Question: I'm trying to stream a JDBC Blob as a response. The database transactions are handled in a http4k filter. However, when Jetty tries to create the HttpServletResponse and reads the Inputstream, we're not in the context of the http4k transaction filter anymore. At that point, the JDBC resultset is closed and the inputstream cannot be read anymore. Is there any way out of this?
I'm wondering if it is possible to move the transaction handling to a ServletFilter
basically I want my transaction filter to wrap the httpservletrequest/response, instead of the http4k request/response
ok, for now I've worked around the issue by implementing my own
ServerConfig
version of Jetty. In there, I've implemented my transaction handler in a custom
HttpHandlerServlet
still wondering if there are other solutions...
8 Views