BTW you can simply realize it reusing the
com.googlecode.ibaguice.core.XMLSqlSessionFactoryProvider with a few
tricks:
first of all, implement the binding annotations like @DataSource1,
@DataSource2, then in you modules just bind:
@Override
protected void configure() {
this.bind(SqlSessionFactory.class).annotatedWith(DataSource1.class).toProvider(new
SqlSessionFactoryProviderType("/com/acme/sqlsession1.xml")).in(Scopes.SINGLETON);
this.bind(SqlSessionFactory.class).annotatedWith(DataSource2.class).toProvider(new
SqlSessionFactoryProviderType("/com/acme/sqlsession2.xml")).in(Scopes.SINGLETON);
}
Hope this helps as first idea... if you have better ideas and would
like to contribute, you're more than welcome!!!
Saludos, hasta pronto!
Simo
http://people.apache.org/~simonetripodi/
And how far are you from deploying in maven central?
regards Nino
2010/6/6 Simone Tripodi <simone....@gmail.com>:
http://people.apache.org/~simonetripodi/
On Sun, Jun 6, 2010 at 7:13 PM, nino martinez wael