Author: limpbizkit
Date: Thu Jan 1 15:21:10 2009
New Revision: 774
Added:
wiki/BeCarefulAboutIoInProviders.wiki
Log:
Created wiki page through web user interface.
Added: wiki/BeCarefulAboutIoInProviders.wiki
==============================================================================
--- (empty file)
+++ wiki/BeCarefulAboutIoInProviders.wiki Thu Jan 1 15:21:10 2009
@@ -0,0 +1,7 @@
+=Be careful about I/O in Providers=
+The `Provider` interface is convenient for the caller, but it lacks
semantics:
+ * *Provider doesn't declare checked exceptions.* If you're writing code
that needs to recover from specific types of failures, you can't catch
`TransactionRolledbackException`. `ProvisionException` allows you to
recover from general provision failures, and you can
[http://google-guice.googlecode.com/svn/trunk/latest-javadoc/com/google/inject/ProvisionException.html#getErrorMessages()
iterate its causes], but you can't specify what those causes may be.
+ * *Provider doesn't support a timeout.*
+ * *Provider doesn't define a retry-strategy.* When a value is
unavailable, calling `get()` multiple times may cause multiple failed
provisions.
+
+ThrowingProviders is a Guice extension that implements an
exception-throwing provider. It allows failures to be scoped, so a failed
lookup only happens once per request or session.
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---