Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Interface Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWDBDatabaseCallbackImp

Module:  DB Interface Module   Group:  Callback Classes


RWDBDatabaseCallbackImp RWDBReference

Local Index

Members

Synopsis

#include <rw/db/dbasecbi.h>

class MyDBaseCallbackImp : public RWDBDatabaseCallbackImp {
public:
    // PostEnvAllocate callback
    virtual void postEnvAllocate();
    
    // Connection callback producer
    virtual RWDBConnCallback produceConnCallback();
};

RWDBDatabase dBase = 
  RWDBManager::database("accessLib", "Servername",
                        "Username", "PassWord",
                        "DatabaseName",
             RWDBDATABASECALLBACK(MyDBaseCallbackImp) );

Description

RWDBDatabaseCallbackImp is an implementation class and is reference counted.

It is the abstract base class for implementing database callbacks. You will need to derive from this class to implement your custom database callbacks.

This class provides three database callback methods preEnvAllocate(), postEnvAllocate() and preEnvDestroy(). It also provides a connection callback producer method produceConnCallback(). Please refer to the DB Interface Module User's Guide and applicable DB Access Module User's Guide for more information on these methods. You will need to redefine the methods to implement database callbacks and/or produce connection callback instances.

Protected Constructors

RWDBDatabaseCallbackImp();

Public Member Functions

virtual void
preEnvAllocate();
virtual void
postEnvAllocate();
virtual void
preEnvDestroy();
virtual RWDBConnCallback
produceConnCallback();

NOTE -- Redefining this method to return multiple types of connection callback objects might affect your use of the connection pool, as the connection pool might contain connections associated with different connection callback objects.
RWDBEnvironmentHandle*
environmentHandle() const;
RWCString
serverType() const;
RWDBStatus
status() const;
void
setError(RWDBStatus::ErrorCode code,
                  const RWCString& message,
                  const RWCString& vendorMessage1 =
                                   RWCString(),
                  const RWCString& vendorMessage2 =
                                   RWCString(),
                  long             vendorError1 = 0,
                  long             vendorError2 = 0,
                  bool             isTerminal 
                                     = false,
                  bool             invokeErrorHandler
                                     = true,
                  bool             invalidateDatabase
                                     = false);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.