Might you have a circular dependency? Ie. one of your classes injects
something that injects itself. When that happens, Guice 2.0 would
sometimes call a constructor 2x, only to discard the second instance.
You can grab a copy of Guice that has the fix from SVN, or tweak your
code to avoid the circular dependency. Or add @Singleton to
TaskBrowserCtr, which seems like the most durable fix.
  svn checkout http://google-guice.googlecode.com/svn/trunk/ google-
guice
  http://code.google.com/p/google-guice/source/detail?r=1114

In general I dislike heavyweight side effects that come as a
consequence of object construction. Instead, trigger heavyweight
actions (starting threads, binding to ports, etc.) in a separate
startup() method after your injector has been created.

--

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