Wednesday, October 26, 2016

How to bind essential singletons in multi-module GIN app and avoid duplicate binding

[ Original post on StackOverflow ]

It's a simple selfdescriptive question (subj).

Anyway, just to give an example. We have a main app module and some visual components module (some reusable module for many apps), both constructed with GIN. Needless to say, that such instances as EventBusScheduler etc. are usually bound as singletons and they get injected here and there. So, if we consider the aforementioned visual components module as a somewhat independent instance, which requires minimum work on a part of a client to get it inherited, then it should contain its own GIN configuration module, where it binds those singletons - same the main app configuration module usually has. And the compiler obviously won't let duplicates to coexist.

What's the best practice to avoid such a duplication conflict.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment