I've my own Guice module and in the configure method, I've provided my own bindings as under -
public void configure() {
MapBinder<String, ExternalDatabaseConnection> m = MapBinder.newMapBinder(binder(), String.class, ExternalDatabaseConnection.class);
m.addBinding("DBServer1").to(ExternalDBServer1Connection.class);
m.addBinding("DBServer2").to(ExternalDBServer2Connection.class);
}
The above is deployed as a web application. I want to let third party providers be able to provide there own implementations and give a jar file for connection class. How do I do that? That is instead of modifying code above to add new binding like below -
m.addBinding("DBServer3").to(ExternalDBServer3Connection.class);