[Date Prev][Date Next] [Chronological] [Thread] [Top]

notification of connection closure to database backends.


While working on the CORBA database backend I noticed that there's no
way for a backend to receive a notification of the closing of a client
connection. In most cases this is not a problem, but the CORBA backend
needs to maintain state on a per connection basis. If it doesn't know
when a connection closes, it cannot release its state nor notify the
backend server to release any resources (both CPU and memory) in use for
that connection.
The way I would like to add notification support is to include a NULL
terminated list notification callback functions in each connection
structure. Each backend interested in the destruction of the connection
can add its own callback function to this list. The
'connection_destroy()' operation shall call each of the functions in the
list with a pointer to the connection as argument.
The overhead of this feature is small: addition of a void** member to
the ldap_conn struct and an 'if !=NULL call all in the list' in the
'connection_destroy()' method.
If anyone has objections to this approach or knows a better way to do
the same, please let me know or I'll start coding.


begin:          vcard
fn:             Bastiaan Bakker
n:              Bakker;Bastiaan
org:            LifeLine Networks BV
email;internet: Bastiaan.Bakker@lifeline.nl
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard