Subject Re: [firebird-support] Re: Limiting / Regulating Database Connections
Author Alexandre Benson Smith
msimmons15 wrote:
> Hi Alexandre,
>
> I like the idea of the Mac address. Certainly would be unique!
>
> We have "floating licenses" so any users up to the limit could
> access the software from different clients. Your suggestion about
> an admin function is good, but our existing clients don't have to do
> this now and would object to the increased admin. So that's
> information you didn't have to work with.
>
> The basic problem I'm having is:
> 1. trying to ensure a table record gets deleted when a connection
> drops (normally or abnormally). I'm finding this to be a tough
> one... OR
> 2. Seeing if a connection related to a license usage record still
> exists. This might be a more workable solution, possibly using
> Firebird event processing. I haven't worked through this completely
> yet, but each user could be listening for an event based on a unique
> ID of their license record (such as MAC Address). If they are
> signed on, they would post a reply event. No reply event after a
> reasonable period of time would indicate the license file is not in
> use and the seat could be reused. This is more complicated than I
> wanted to get.
>
> Thanks for your help!
>
> Best,
> Mike
>
>
Hi Mike,

What about if each client execute an SP on logon, this SP would delete
all the records from a license table, and post an event. All stations
should respond to the event inserting a record on the license table,
this would mean "Yes ! I am listenning and running", the app who logs in
the last should count the records on the license table, compare with the
count of available licenses, and decide to login or show a message to
the user that has no license available at that time.

I think that if you use this approach, you should not care about dead
connections, since everytime a user wants to login all running
applications you respond, so you can count easily how much are up.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br