I'd like to provide a DataSource using the Guice 2.0 @Provides
annotation. Right now I'm forced to pass a Provider class into the
SqlSessionFactoryModule constructor. Here are two possibilities...
1. Using the default constructor should imply that the DataSource is
bound by another module, as opposed to assuming the use of
PooledDataSource.
2. Alternatively, use the Builder design pattern in place of
SqlSessionFactoryModule's constructor because you will probably need
to add more arguments in the future.
Gili
Thanks a lot, very interesting hints, maybe the point nr. 2 could
really improve the APIs, let's think about it :)
We designed the DataSource injection in the way you found since we
thought adding support of 3rd parties DataSource as well (c3p0, apache
commons-dbcp), so users are free to inject their preferred DS library
without any restriction. BTW suggestions are always more than
welcome!!!
See you, have a nice day,
Simo
http://people.apache.org/~simonetripodi/
> --
> To unsubscribe, reply using "remove me" as the subject.
>