Re: Multiple instances of a view

2013-04-15 Thread deepak chauhan
@Thomas: I am using @Singleton annotation also. Now I am getting friendly with Guice and GWT combination. Thanks all for your support. On Sat, Apr 13, 2013 at 2:40 PM, Thomas Broyer t.bro...@gmail.com wrote: On Saturday, April 13, 2013 12:48:21 AM UTC+2, Andrea Boscolo wrote: This is how

Re: Multiple instances of a view

2013-04-13 Thread Thomas Broyer
On Saturday, April 13, 2013 12:48:21 AM UTC+2, Andrea Boscolo wrote: This is how GIN works, it always inject a new instance when requested. If you want to inject the same instance, bind the dependency into Singleton scope, using bind(YourClass.class).in(Singleton.class), inside you

Multiple instances of a view

2013-04-12 Thread deepak chauhan
Hi, I am using GIN in my project and facing a weird issue. If I inject a dependency in a single class then I see only one instance of the the dependency. But, when I inject the same dependency into more than one class, I see more then one instance of the same dependency and breaking the

Re: Multiple instances of a view

2013-04-12 Thread Andrea Boscolo
This is how GIN works, it always inject a new instance when requested. If you want to inject the same instance, bind the dependency into Singleton scope, using bind(YourClass.class).in(Singleton.class), inside you GinModule. -- You received this message because you are subscribed to the

Re: Multiple instances of a view

2013-04-12 Thread deepak chauhan
Thanks Andrea. It worked. On Sat, Apr 13, 2013 at 4:18 AM, Andrea Boscolo andrew...@gmail.com wrote: This is how GIN works, it always inject a new instance when requested. If you want to inject the same instance, bind the dependency into Singleton scope, using