Static DatabaseConnection class

Is it a good idea to store the DatabaseConnection class (a standard class with a static pool) in the session? On each view, we can grab the class from the session and re-use the pooled connection? Any issues doing this?

Without in-depth investigation, that sounds like trouble to me for several potential reasons; my gut feeling is that you should keep your data access stuff to the data access layer.


thanks. i am thinking of a static databasehelper class (containing a static pool) and methods which return sqlcontainers (eg getuserlist(userno), getprojectdetails(projectid) etc ).

is this the recommended approach? as many users will access the statics databasehelper class simulatneously, i wondered if
the methods which return different datasets (sqlcontainers) should be created by each ui…