DbiConnectionMaintainer Class Reference

#include <DbiConnectionMaintainer.h>

List of all members.

Public Member Functions

 DbiConnectionMaintainer (DbiCascader *cascader=0)
virtual ~DbiConnectionMaintainer ()

Private Attributes

DbiCascaderfCascader
 May be null if made by (useless) default ctor.

Detailed Description

Id
DbiConnectionMaintainer.h,v 1.2 2006/08/08 10:51:32 west Exp

Definition at line 27 of file DbiConnectionMaintainer.h.


Constructor & Destructor Documentation

DbiConnectionMaintainer::DbiConnectionMaintainer ( DbiCascader cascader = 0  ) 

Definition at line 17 of file DbiConnectionMaintainer.cxx.

References Msg::kVerbose, LEA_CTOR, and MSG.

00017                                                                       {
00018 
00019 // For database connections that are not permanent, the connection is
00020 // closed as soon as the last associated DbiStatement is
00021 // deleted. However, standard context queries involve several separate
00022 // SQL queries, each using its own DbiStatement and hence each involving
00023 // a separate connection.  To maintain a single connection for the entire
00024 // set of SQL queries a DbiConnectionMaintainer can be use.  On creation
00025 // it connects to every DbiConnection which prevents it from closing.  On
00026 // destruction it disconnects from them allowing them to close, if
00027 // temporary, once any other associated DbiStatement has been deleted.
00028 
00029   LEA_CTOR    //Leak Checker
00030 
00031   MSG("Dbi", Msg::kVerbose) << "Creating DbiConnectionMaintainer" << endl;
00032 
00033   fCascader = cascader;
00034   if ( fCascader ) fCascader->HoldConnections();
00035 
00036 }

DbiConnectionMaintainer::~DbiConnectionMaintainer (  )  [virtual]

Definition at line 40 of file DbiConnectionMaintainer.cxx.

References fCascader, Msg::kVerbose, LEA_DTOR, MSG, and DbiCascader::ReleaseConnections().

00040                                                   {
00041 
00042   if ( fCascader ) fCascader->ReleaseConnections();
00043 
00044   LEA_DTOR    //Leak Checker
00045 
00046   MSG("Dbi", Msg::kVerbose) << "Destroying DbiConnectionMaintainer" << endl;
00047 
00048 }


Member Data Documentation

May be null if made by (useless) default ctor.

Definition at line 42 of file DbiConnectionMaintainer.h.

Referenced by ~DbiConnectionMaintainer().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1