On Jan 26, 1:31 pm, Kamil Demecki <[email protected]> wrote:
> Hi guys
>
> On wiki there 
> ishttp://code.google.com/p/google-guice/wiki/BeCarefulAboutIoInProviders
> and as solution is ThrowingProviders. I understand that is resolve
> first problem "Provider doesn't declare checked exceptions".
>
> But what with next problems:
>
> Provider doesn't support a timeout
> Provider doesn't define a retry-strategy
>
> ThrowingProviders resolve this ?

Somewhat. ThrowingProviders has a retry-strategy: if an exception is
thrown by a ThrowingProvider inside a scope, that exception will be
scoped. For example, if your ThrowingProvider<Set<Tweets>> throws a
TwitterExplodedException in request scope, then every subsequent time
that you call the ThrowingProvider in that request, it'll remember the
exception and rethrow it.

Timeouts aren't specified by ThrowingProviders. If you'd like 'em, you
should find/create an interface that defines one, and inject that.
Future is a reasonable choice here, and if you're clever you could
probably just use Future<T> as an alternative to Provider<T>.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to