Comment by [email protected]:
This is a nitpick and unrelated to the scoping example, but I think you
would want to rewrite the `logConnection` method as follows:
{{{public void logConnectException(UnreachableException e) {
int failCt = failureCount.incrementAndGet();
User user = userProvider.get();
System.out.println("Connection failed for " + user + ": " +
e.getMessage());
System.out.println("Failure count: " + failCt);
}
}}}
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.