I would tend to create a wrapper service which I depend on, and let it
choose the internals based on what's available at runtime. One layer
of indirection can save you a lot of hell. :)
Christian.
On Apr 6, 2010, at 6:08 PM, Willi Schönborn wrote:
Hi folks,
i'm stuck at the following situation.
I depend on a Provider<EntityManager> in my constructor (via @Inject).
My binding uses a custom scope (@ConnectionScoped). The problem
is: How can i provide an alternative when there is no connection
context?
This is required during bootstrap and background tasks. This should
be same
issue with @RequestScoped from the servlet integration.
Greetings
Willi
--
You received this message because you are subscribed to the Google
Groups "google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/google-guice?hl=en
.
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en.