Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SyncLock
Message
From
16/01/2011 19:19:45
 
 
To
15/01/2011 10:22:01
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01496120
Message ID:
01496341
Views:
53
>Yes, I understood that ... and I assume the code you posted is in the oProcess object. But, I must apologize for my stupid question; I had been thinking that the LoadDataDictionary() method was in oApp & it's not. So, forget that question ... unless that method is loading up a DataDictionary that's part of oApp? You haven't really said where this DataDictionary is.
>
>Maybe what you really should be checking is the DataDictionary itself? I typically use code like this (similar to what Viv posted). I've seen it referred to as the "double-check locking pattern":
>
>
>If MyDataDictionary Is Nothing Then
>    SyncLock LockDictionaryObject
>        If MyDataDictionary Is Nothing Then
>            If Not LoadDataDictionary() Then
>                Return False
>            End If
>            ' Do other stuff
>        End If
>    End SyncLock
>End If	
>
The LoadDataDictionary() is initiated from a hit to the Web site. But, that method, makes some calls to the oApp.Tables collection object to load the data dictionary into. So, that's why I figured out that I should apply a lock at the Web site level (the hit in progress, for the first one that gets into the app). Then, even if LoadDataDictonary() is executed some calls to oApp.Tables collection related loading issues, this shouldn't be a factor as the lock should be already in place.

But, I will check it out more tomorrow.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform