Ping Thanks & Regards Danushka Fernando Senior Software Engineer WSO2 inc. http://wso2.com/ Mobile : +94716332729
On Fri, Jun 17, 2016 at 1:55 PM, Sabra Ossen <sa...@wso2.com> wrote: > Hi All, > > What is the best practice for closing database connections when we are > using the DAO Pattern with DAO Manager? > > According to [1] the suggestion is to create a DAO Manager and include the > database connection object within the DAO Manager. Each DAO Object is > instantiated by passing the database connection and the connection is > closed from the DAO Manager after execution of the query. > > I went through a lot of WSO2 product related code but was not able to see > the usage of a DAO Manager and I saw that the database connections were > closed in the DAO class itself. > > What is the suggested practice? Any clarification on this issue is > appreciated. > > [1] http://tutorials.jenkov.com/java-persistence/dao-manager.html > > Thanks and Regards. > > -- > *Sabra Ossen* > *Software Engineer* > Email: sa...@wso2.com > Mobile: +94 767 837356 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev