I had such a behavior once. In the end I had one point in the code where I 
injected the interface and another where I injected the concrete instance. 
Guice created a just in time binding for the concrete inatance. This was the 
reason the constructor was called twice.

Am 10. August 2016 16:43:32 MESZ, schrieb Luke Sandberg 
<lukeisandb...@gmail.com>:
>Can you share a test case that demonstrates this?
>
>On Tue, Aug 9, 2016, 8:36 PM Yashiro Nanakase <yashi...@gmail.com>
>wrote:
>
>> hi Witold,
>>
>> I'm having this problem too, did you get it solved? Can you please
>share
>> the solution? thanks.
>>
>> Regards,
>> Yashiro
>>
>> On Friday, December 18, 2009 at 7:37:27 PM UTC+8, Witold Szczerba
>wrote:
>>>
>>> 2009/12/18 Witold Szczerba <pljos...@gmail.com>:
>>> > threads! So, I placed breakpoint inside TaskBrowserCtr constructor
>and
>>> > it was caught TWICE during Guice's Injector initialization
>>> > (Stage.PRODUCTION).
>>>
>>> Now I can see it happens only when Stage.PRODUCTION is used.
>>> Going back to the above problem, the MainFrame singleton's
>constructor
>>> itself was called twice, not just the TaskBrowserCtrTimer...
>>> In the constructor of MainFrame I have entered
>Thread.dumpStackTrace()
>>> and two dumps were printed (see attachments). Third attachment was
>>> taken during initialization of Stage.DEVELOPMENT injector.
>>>
>> --
>> You received this message because you are subscribed to the Google
>Groups
>> "google-guice" group.
>> To unsubscribe from this group and stop receiving emails from it,
>send an
>> email to google-guice+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-guice@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-guice.
>> To view this discussion on the web visit
>>
>https://groups.google.com/d/msgid/google-guice/b76baba6-578a-453e-b7a5-30c10c06555d%40googlegroups.com
>>
><https://groups.google.com/d/msgid/google-guice/b76baba6-578a-453e-b7a5-30c10c06555d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "google-guice" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to google-guice+unsubscr...@googlegroups.com.
>To post to this group, send email to google-guice@googlegroups.com.
>Visit this group at https://groups.google.com/group/google-guice.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/google-guice/CAO9V1ML2CWEFsEgcAWZr%2B31Mn6ozbZ7vRpce8xLOw7YYWUO6cQ%40mail.gmail.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/1FE397A3-E79D-4AA4-BD6C-41AA99321B42%40gmx.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to