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: [email protected]
Mobile: +94 767 837356
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to