One persistant database connection per application can improve performance a lot if you use it frequently, which we are doing and we will only be using it more in the future, not less. I think what you are doing makes lots of sense, for what its worth.
On 5/19/06, DongInn Kim <[EMAIL PROTECTED]> wrote:
Hi, As you may have noticed, we have opened a database connection for each script (but not for all scripts) and closed it when the script is done. We have never had any problems with the database connection so far. But we may have some problems in the future if we start to use OPM (Oscar Package Management) which may generate multiple database accesses at the same time. ( Thomas, correct me if this acronym is not correct.) To me, opening a database connection per each database script or per some chunk of database queries is not a good idea and this can make some headache for OPM. Basically, if we open a database connection when it is needed (it starts at package_config_xmls_to_database script for the first time), we do not have to close the connection until the last database query finishes during the oscar installation. So, if we have one big and long database connection, it would be clear and easier to see what's going on the database side. Of course, even if the connection is accidentally disconnected, all the database scripts check to see if the connection is there. If not, they will open it. Otherwise, they will go on with the same one. I believe that this one big and long database connection may be able to save resources because opening a database connection and then closing it are kind of expensive. I have not researched for the differences of the performance between them. I feel the current database processes on trunk seem faster than before since I have tried to keep one database connection on trunk. I may miss some codes which still close the current one when it is done and then make the next codes create another database connection. I will find them and clean them off too. I am sorry that I have not asked for removing the unnecessary database disconnections before I changed the codes. I believe that whether or not we have recreated the database connection, the database codes on trunk do not any problems at all. Any ideas of this would be appreciated. Regards, - DongInn ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Oscar-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oscar-devel
------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Oscar-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oscar-devel
