ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Jayakumar" <prasad.jayaku...@gmail.com>
Subject Re: Closing a connection
Date Wed, 02 Aug 2006 06:41:29 GMT
Hi

Thanks for you reply.  You were right.  We should have used Connection
Pooling methodology.

I was searching on the mail archive of iBatis.  I got the following
information from other thread

Excerpt

DaoManager should NEVER go out of scope unless your application shuts down.
Otherwise you're probably misusing the DAO framework...*you should have only
one instance of DaoManager*, and you should keep it around for as long as
your application is running (think singleton).

Cheers,
Clinton

This helped to solve my problem.  Sorry for providing in-sufficient data.
Actually I was trying to send username and password at run-time.  In this
process, I create new DaoManager for every call.  Later I modified to store
DaoManager in Hashtable with username+password as key. I tried to
getDaoManager by providing username and password. If not available, I
created and put in Hashtable.

Thank you

Prasad Jayakumar

Mime
View raw message