Comment by [email protected]:
This is a nitpick and unrelated to point of the scoping example, but I
think you would want to rewrite the `logConnectionException` method in that
example as follows to avoid incrementing the counter twice:
{{{
public void logConnectException(UnreachableException e) {
User user = userProvider.get();
System.out.println("Connection failed for " + user + ": " +
e.getMessage());
System.out.println("Failure count: " + failureCount.incrementAndGet());
}
}}}
For more information:
http://code.google.com/p/google-guice/wiki/InjectingProviders
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" 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-dev?hl=en.