The SVN version of Guice supports JSR-330 annotations ("JSR-330 Integration - This documents an experimental, unreleased feature available in Guice SVN only"). Google gives the advise: "For now, stick with Guice's annotations and Provider interface." Guice 2 is a year old now and I wonder if there will be JSR-330 support in the near future. Does anyone know?
+1
A:
Apparently it is planned for 2.1 : http://code.google.com/p/google-guice/issues/detail?id=424
Timo Westkämper
2010-06-04 13:29:43
Is there an up-to-date release plan for guice? (Guice 2.1 was announced for 2009 ...)
deamon
2010-06-04 13:53:33
I don't know. Better ask someone from Guice concerning the release plan.
Timo Westkämper
2010-06-04 14:00:06
+3
A:
If you're comfortable using code from SVN, use that and the JSR-330 annotations. If you'd rather rely on a published release, use Guice's own annotations. Also, JSR-330 doesn't support optional injection.
Note that there's a tiny behaviour change with Guice post-2.0 to cope with the new @Inject
annotation.
- In Guice 2.0 and earlier: Methods not-annotated with
@Inject
are injected, if they override a method that does have that annotation. - After Guice 2.0: Guice not inject such methods. You need to reapply the annotation on every override.
We don't have a release date scheduled for Guice 2.1.
Jesse Wilson
2010-06-04 15:02:44
+1
A:
FYI
Guice 3.0 discussions: https://groups.google.com/group/google-guice-dev/browse_thread/thread/5a00dcc392fc8276?hl=en
Isaac Shum
2010-06-30 00:16:24