Re: Microsoft Data Access Block and static methods
From: Ravichandran J.V. (jvravichandran_at_yahoo.com)
Date: 12/17/04
- Next message: Tom Porterfield: "Re: change decimal point inf format double to string"
- Previous message: Wilfried Mestdagh: "change decimal point inf format double to string"
- Maybe in reply to: Scott Allen: "Re: Microsoft Data Access Block and static methods"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 06:39:45 -0800
"If User A calls my web service at the same time User B calls it, isn't
it possible that B might get A's result, or vice versa?"
You could set EnableSessionState to true in the WebMethod atribute so
that the webservice could maintain the state for the client until the
method completes its execution. Anyway, it is not just session state
that is important when using a webservice as a Data Access Layer, it is
also the TransactionContext. More on transactions in Web Services upon
your reply.
"Any public static (Shared in Visual Basic) members of this type are afe
for multithreaded operations. Any instance members are not guaranteed to
be thread safe."
"I would figure it to be completely opposite - that if multiple threads
are hitting a static member, it'd be possible those results could get
returned to the wrong user, whereas in an instance member, each method
being called is a separate logical piece, so there's no results being
misguided."
It is not the opposite, though, you would need to lock the application
state, if you are talking about the ASP.Net environment (and if you are
not, I am), before writing or accessing a static member.
with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Tom Porterfield: "Re: change decimal point inf format double to string"
- Previous message: Wilfried Mestdagh: "change decimal point inf format double to string"
- Maybe in reply to: Scott Allen: "Re: Microsoft Data Access Block and static methods"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|