Hi guys, after a nice shower i think i can do this by 2 providers/2 
annotations with a custom scope. :)

On Saturday, May 16, 2015 at 11:18:55 AM UTC+8, klc wrote:
>
> 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
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/835b4f62-3700-4788-95a3-d1598f0fd784%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to