You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Open Source Hunter <op...@gmail.com> on 2008/06/05 08:44:39 UTC

Cache SqlMapClient in HttpSession - Good Practice?

Is it a good practice to cache an instance of SqlMapClient in the
HttpSession for each user? I cannot use generic database connections
since data access is granted based on the username and password for
each user.

Re: Cache SqlMapClient in HttpSession - Good Practice?

Posted by Jeff Butler <je...@gmail.com>.
It will work.

It would be far better to use generic connections and do security some
other way.  Under this scenario you will end up with far more open
connections to the DB and far more resources consumed both on the web
server and the database server.

Jeff Butler


On Thu, Jun 5, 2008 at 1:44 AM, Open Source Hunter
<op...@gmail.com> wrote:
> Is it a good practice to cache an instance of SqlMapClient in the
> HttpSession for each user? I cannot use generic database connections
> since data access is granted based on the username and password for
> each user.
>