Ah, of course.  I think it is the right class to extend, but *only* for
unit tests (because DriverManagerConnectionProviderImpl was being used
in unit tests before this was implemented).  So we need a different
solution when using DataSource via JNDI.

Thanks.

On 2013-07-04 09:07, Patrick Huang wrote:
> In
> zanata-war/src/main/java/org/zanata/database/WrappedConnectionProvider.java:
> 
>> @@ -38,11 +38,22 @@
>>   */
>>  public class WrappedConnectionProvider extends DriverManagerConnectionProviderImpl
> 
> After a brief search and read, I think
> DriverManagerConnectionProviderImpl is not the class we want to extend.
> It's javadoc says:
> 
> | * A connection provider that uses the {@link java.sql.DriverManager} directly to open connections and provides
>  * a very rudimentary connection pool.
>  * <p/>
>  * IMPL NOTE : not intended for production use!
>  *
>  * @author Gavin King
>  * @author Steve Ebersole
>  */
> |
> 
> Seems like if you this, it will try to use driver manager directly
> rather than using data source to obtain connection. And it will use
> hibernate internal pooling which is NOT production ready.
> 
> We may need to just implement the ConnectionProvider interface and then
> use JNDI to look up datasource here.
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zanata/zanata-server/pull/15/files#r5022350>.
> 


-- 
Sean Flanigan

Senior Software Engineer
Engineering - Internationalisation
Red Hat