I'm trying to understand the behaviour of Guice in case of Servlet Scope.
Suppose we have the following situation:
class A is declared servlet scope, so once in my request I need an
instance, i get only *that* instance.
class B is declared also servlet scope, and has a dependency on A,
something like:
@Inject
class B(A obj) {
}
Seems looking with the debugger that a new instance of A in made instead of
reusing the previously
created instance. Is this the correct behaviour? My need is to have an
instance of a class per request
and the same should be used in indirect dependencies.
Thanks for the support,
Andrea
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-guice/-/2SG4okoPd-kJ.
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.