Hi
I have a servlet app that use custom connect pool (Transaction is handled by it). And connection is used in service of request (obviously) but also during initialization
The initialization could be eagar (on server startup) or lazy (when the first request arrive)
My implementation would be a singleton connection pool and a provider of connection, which inject the connection pool. (I guess this make sense?)
Should the connection be request scope?
If it is, will the service of request use a closed connection in case of lazy initialization?
My guess is guice won't check if the connection is close, and just return the cache value in request scope?
Is there a way to do it?
klc