Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion from C# to VB.NET
Message
De
17/04/2013 13:07:00
 
 
À
17/04/2013 13:00:21
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01571173
Message ID:
01571244
Vues:
41
>I don't think you need to clone
>
>replace
>
>  oProcess.oApp = App.oApp.Clone()
>
>
>by
>
>
>  oProcess.oApp = App.oApp
>
>
>Since this will give you the current reference of oApp
>
>
>The App Class can replace oApp at any time. When it does, oProcess will still hold a reference to the previous oApp

This is what I have been having for four years. The problem is App.oApp is shared. Thus, if a hit in progress is ongoing, and another hit sees that App.oApp.Tables has to be re-initialize, this will affect the first hit, the one that is not finished, and an object reference is not found will occur, if that first hit requires oApp.Tables, for example, at the same time the reset is done by the other hit. As the other hit is doing something like oApp.Tables.Clear and this is why the first hit might be jeopardized.

This is why I decided to clone it. It helps but still not perfect. And, this is why I discovered that cloning is not exactly what it says, thus not a deep copy. This is why I started to look at a deep copy approach but all this is way too much complicated to implement just for the need I have. I believe the Clone support in .NET should have been enhanced to support the cloning of everything under the object or accept a parameter to be able to support it.

Do you understand better my situation? If yes, do you have further recommandations?
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform