Dispatching the received request to another thread pool to handle a JDBC transaction and to call channel.write*()
from the JDBC thread is perfectly fine.
One thing to keep in mind is that it is possible that the peer does not receive your response even if your write future is fulfilled. A fulfilled write future only tells you that O/S accepted your write request. The TCP/IP stack of the O/S will try its best to send the response to the peer, but it will eventually fail if the connection is broken permanently.
In such a case, the client will probably re-attempt the request, and it will lead to duplicate transaction. To avoid this kind of cases, you usually have some kind of identifier for each request and the server keeps the list of recent of request IDs to reject duplicate requests.