Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Replacing Semaphore Functionality
Thu, Jul 26 2007 11:41 AMPermanent Link

Gordon Turner
In DBIsam, I used semaphore locks to control how many users had access
to my application.  On startup, I added a semaphore lock to a specific
table, and when the app closed, I cleared the semaphore lock.  Since I
license by specific user I could track both the valid user names (stored
in an application table) and the number of times the application
connected to the data files.  This prevented multiple instances of the
application (on different workstations) from connecting with the same
user name.

Since EDB doesn't support semaphores, what options are available to me
to track the number of application instances connecting to local tables?

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Thu, Jul 26 2007 11:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Gordon


In response to a post of mine last October

FROM TIM
No, it won't have semaphore locks, but it does have options to control the
number of concurrent sessions on a given database (specified when the
database is created) and/or application configuration file (specified via
the TEDBEngine component).  One is a subset of the other, and both work with
remote C/S *and* local sessions.

Roy Lambert
Thu, Jul 26 2007 12:02 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Gordon


The thread is in the elevatedb.general newsgroup

Apparently ....

Actually, it's easier than even using a stored procedure.  You could simply
just issue the query directly:

SELECT Count(*) FROM ServerSessions WHERE Name='MyTag'

using a TEDBQuery.

......

But remember this is counting sessions not logons.

Roy Lambert
Thu, Jul 26 2007 1:29 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< Since EDB doesn't support semaphores, what options are available to me to
track the number of application instances connecting to local tables? >>

The TEDBEngine.LicensedSessions property will control the max number of
sessions permitted, but it doesn't do everything that you want in terms of
per-user tracking:

http://www.elevatesoft.com/edb1d7_tedbengine_licensedsessions.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jul 26 2007 4:01 PMPermanent Link

Gordon Turner
Roy Lambert wrote:
>
> Actually, it's easier than even using a stored procedure.  You could simply
> just issue the query directly:
>
> SELECT Count(*) FROM ServerSessions WHERE Name='MyTag'
>
> using a TEDBQuery.

That query does not seem to work for local tables.  I tried just a
straight "select count(*) from ServerSessions" in the EDBManager and got
a count of zero, even when the application was running and a table was
opened in the EDBManager.  Am I missing something?

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Thu, Jul 26 2007 4:03 PMPermanent Link

Gordon Turner
Tim Young [Elevate Software] wrote:
>
> The TEDBEngine.LicensedSessions property will control the max number of
> sessions permitted, but it doesn't do everything that you want in terms of
> per-user tracking:

I assume that you can only change the value when the TEDBEngine is
inactive.  In the past I have stored licensing information in the
application data files, so to set the number of sessions, I'd have to
read the value from the table, set the TEDBEngine to Inactive, adjust
the value, and then set the TEDBEngine to Active again.

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Fri, Jul 27 2007 4:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< That query does not seem to work for local tables. >>

It won't - it only applies to the ElevateDB Server.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 27 2007 4:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< I assume that you can only change the value when the TEDBEngine is
inactive. >>

Correct.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image