Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Major mixup in two ASP.NET transactions
Message
From
04/09/2006 12:19:34
 
 
To
04/09/2006 11:59:20
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01150471
Message ID:
01150726
Views:
44
Hi,
>>That code is fine - you're creating a new Framework object for every hit. But then you said that, to avoid the initialisation overhead you wanted to use:
>>
>>  oApp=LXFramework
>>
>>where LXFramework was the global framework object. That's where you'd have the problem.
>
>Ok, that is what I thought when reading your message after. Ok, for sure, I have something safe as it is now.
>
>To enhance that, in order to avoid doing the framework initialization every time, I was thinking of using a copy of the application framework object. But, as you said, doing it as I first thought wouldn't work. My question is is there a way in .NET to take a copy of an object or we can only have references to them? Lets say basically that I would have a customer object. In my code, I would want to have four identical copies of the customer objects so I can have them in the code in the same method to apply specific business logic. Would it there be a way in .NET to obtain four copies instead of references?

I think to do that you'd need to make a 'deep-copy' (cloning just gives a shallow copy). It's possible to do that by serializing an object and deserializing to a new object - but all contained objects also need to be serializable so, for a complex object, it can easily become too complicated and time consuming.

Did you consider the suggestion of using a class scoped to the request?

Regards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform