Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/AbstractDBAPI2AdaptorLayer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6412/Modeling/DatabaseAdaptors/AbstractDBAPI2AdaptorLayer
Modified Files:
AbstractDBAPI2AdaptorContext.py
Log Message:
Env. variable MDL_PERMANENT_DB_CONNECTION is now deprecated and has no
effect anymore. It has been replaced by MDL_TRANSIENT_DB_CONNECTION which
has the inverse semantics --see the User's Guide, appendix Environment
Variables, for details.
Index: AbstractDBAPI2AdaptorContext.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/AbstractDBAPI2AdaptorLayer/AbstractDBAPI2AdaptorContext.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AbstractDBAPI2AdaptorContext.py 7 Mar 2003 18:02:12 -0000 1.5
--- AbstractDBAPI2AdaptorContext.py 28 Jan 2004 14:54:09 -0000 1.6
***************
*** 76,83 ****
AdaptorChannel.
! Default behaviour closes the connection to the database if the
! AdaptorContext has no opened channels ; setting the environment variable
! 'MDL_PERMANENT_DB_CONNECTION' to any true value prevents the database
! connection to be closed in such a situation.
You do not need to override this method when designing a concrete
--- 76,83 ----
AdaptorChannel.
! Default behaviour leaves the connection to the database open, even when
! the AdaptorContext has no opened channels ; setting the environment
! variable 'MDL_TRANSIENT_DB_CONNECTION' to any true value closes the
! database connection the AdaptorContext has no opened channels anymore.
You do not need to override this method when designing a concrete
***************
*** 96,100 ****
db_debug('Channels are now all closed')
! if self._cnx and not os.environ.get('MDL_PERMANENT_DB_CONNECTION'):
db_info('Closing the connection to the database')
self._cnx.close()
--- 96,100 ----
db_debug('Channels are now all closed')
! if self._cnx and os.environ.get('MDL_TRANSIENT_DB_CONNECTION'):
db_info('Closing the connection to the database')
self._cnx.close()
|