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

RE: notification of connection closure to database backends.



This sounds good to me. The same thing is needed in the LDAP backend. I
never pursued it there, but it is certainly a loose end.

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Bastiaan Bakker
> Sent: Tuesday, June 22, 1999 9:07 AM
> To: 'openldap-devel
> Subject: notification of connection closure to database backends.
>
>
> Hi,
>
> 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.
>
> Bastiaan
>
>
>
>