[Date Prev][Date Next]
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
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
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.
fn: Bastiaan Bakker
org: LifeLine Networks BV