Sure, but only if you stop using red text. ;-)

The basic idea is that any requests to go to Crystal are placed into a FIFO queue (first in, first out). Say you have 10 concurrent licenses for Crystal. You'd create an object in the application scope, the object would contain a few member variables:

The queue variable is simply an ordered list, each element in the list contains a request for a report from Crystal.

The crystalRequests variable is a structure (or some other datatype) with a maximum of 10 elements representing each of the 10 concurrent licenses. Within each element there are two elements, the first is a flag to indicate if the license is in use or not (e.g. a boolean flag named isInUse) and the second element holds a connection to Crystal reports.

The idea is that when a request for a report from Crystal comes in it is put into the ordered list. Then the class checks for an available license by looping over the structure looking for a license who's isInUse flag is false. The flag is flipped to true (make sure you lock this so you don't get resource contention) and then the process uses the available license to process the request. When the request finishes OR an exception occurs, the isInUse flag is flipped back to false and the object is available for another user.

When you have a lot of requests, they stack up in the queue waiting for their opportunity to be processed. Some of these requests may wait for an available license, but none of the users should get an error message regarding the license, because you will never use more than your configured number of licenses.

Are there parts of this that are not well thought through? Absolutely. But you should be able to implement this pretty easily. With the threading in Scoprio it would probably be easier... until then I'd even suggest writing a Java class to handle all of this for you.

-dhs


Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"Dissent is the purest form of patriotism."
    --Thomas Jefferson


On Jun 15, 2007, at 9:39 AM, Mischa Uppelschoten ext 10 wrote:

Can you give me a high level picture of a queue? Is it an app var that you update, or a table with a processor template that checks for records etc. ?


: You could implement a queue for requests to ensure you never go over
: concurrent sessions limit. Keep some stats on it for a while (i.e. how often : do all concurrent requests fill and how deep does the queue get) and you'll : be able to determine if you needmore concurrent licenses to meet the load.


: -dhs

:



: Dean H. Saxe, CISSP,  CEH
: [EMAIL PROTECTED]
: "[T]he people can always be brought to the bidding of the leaders. This is : easy. All you have to do is to tell them they are being attacked, and : denounce the pacifists for lack of patriotism and exposing the country to
:  danger. It works the same in every country."
: --Hermann Goering, Hitler's Reich-Marshall at the Nuremberg Trials
:


: On Jun 14, 2007, at 6:10 PM, Douglas Knudsen wrote:
: I'm no CR SME, but looks like more concurrent license are needed. That or
:  design things to slow your users down a bit!  )

: DK


: On 6/14/07, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]>
:  wrote:

: CFMX 7.
: I'm presenting customers with a page of links to their invoices. Every invoice : is a Crystal report and opens in a new window. If the user opens too many new
:  windows too quickly, some of them throw an error:


: A Crystal Reports job failed because a free license could not be obtained in
:  the time allocated.
: Hitting refresh on that page a bit later brings up the page allright. Can : anyone think of a way to prevent this? The error is properly caught with
:  cfcatch...
: Thanks!
: Mischa. ------------------------------------------------------------- Annual : Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this : list, manage your profile @ http://www.acfug.org? fa=login.edituserform For
:  more info,see http://www.acfug.org/mailinglists Archive @
:  http://www.mail-archive.com/discussion%40acfug.org/ List hosted by
:  http://www.fusionlink.com
:  -------------------------------------------------------------


: --
: Douglas Knudsen
: http://www.cubicleman.com
: this is my signature, like it?
: -------------------------------------------------------------
: Annual Sponsor - Figleaf Software
:
: To unsubscribe from this list, manage your profile @
: http://www.acfug.org?fa=login.edituserform
:
: For more info, see http://www.acfug.org/mailinglists
: Archive @ http://www.mail-archive.com/discussion%40acfug.org/
: List hosted by FusionLink
: -------------------------------------------------------------




Mischa Uppelschoten
The Banker's Exchange, Inc.
2020 Hills Avenue NW
Atlanta, GA  30318

Phone:    (404) 605-0100 ext. 10
Fax:    (404) 355-7930
Web:    www.BankersX.com
Follow this link for Instant Web Chat:
http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN
----------------------- Original Message -----------------------

From: "Dean H. Saxe" <[EMAIL PROTECTED]>
To: [email protected]
Date: Thu, 14 Jun 2007 18:38:03 -0400
Subject: Re: [ACFUG Discuss] Crystal free license error

You could implement a queue for requests to ensure you never go over concurrent sessions limit. Keep some stats on it for a while (i.e. how often do all concurrent requests fill and how deep does the queue get) and you'll be able to determine if you need more concurrent licenses to meet the load.

-dhs


Dean H. Saxe, CISSP,  CEH
[EMAIL PROTECTED]
"[T]he people can always be brought to the bidding of the leaders. This is easy. All you have to do is to tell them they are being attacked, and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in every country."
    --Hermann Goering, Hitler's Reich-Marshall at the Nuremberg Trials


On Jun 14, 2007, at 6:10 PM, Douglas Knudsen wrote:

I'm no CR SME, but looks like more concurrent license are needed. That or design things to slow your users down a bit! ;)

DK

On 6/14/07, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]> wrote:
CFMX 7.

I'm presenting customers with a page of links to their invoices. Every invoice is a Crystal report and opens in a new window. If the user opens too many new windows too quickly, some of them throw an error:


A Crystal Reports job failed because a free license could not be obtained in the time allocated.

Hitting refresh on that page a bit later brings up the page allright. Can anyone think of a way to prevent this? The error is properly caught with cfcatch...

Thanks!

Mischa.

------------------------------------------------------------- Annual Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this list, manage your profile @ http:// www.acfug.org?fa=login.edituserform For more info, see http:// www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/ discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------



--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
-------------------------------------------------------------
Annual Sponsor - Figleaf Software

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

------------------------------------------------------------- Annual Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this list, manage your profile @ http:// www.acfug.org?fa=login.edituserform For more info, see http:// www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/ discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------

Reply via email to