|
-
Apr 22nd, 2007, 02:07 PM
#1
Thread Starter
Frenzied Member
[2005] should i dispose connection in web services ?
dear all,
i know the difference between close and dispose, close returns the connection to the pool and dispose cleans out its unmanaged resources and drops it out of pool ( kill it).
in web services , i think there is no pools.
because each call to a web service runs as a separate application right ??
as a result there is no pool of connections to return back to when the web service is done working.
so in your opinion should i dispose the connection in web services after closing them as the server will handle tons of requests ( this is a heavy traffic service ? ???? )
thx in advance for all
-
Apr 22nd, 2007, 05:11 PM
#2
Re: [2005] should i dispose connection in web services ?
Disposing an object and closing a connection, are different things! if you created connection object let say "myConn" and you make connection then when you close the connection the object is still available for another connection! but if you dispose the object than it will disconnect the object and dispose it (Note "myConn" variable points to Nothing) so you can't use the object any more but to create a new object. Saying that, I don't think you need to dispose the object after closing it. There is no reason to dispose and create the object for any connection or disconnection, just use the same object. dispose the object if you don't need it any more (when you close the app).
-
Apr 23rd, 2007, 04:04 AM
#3
Thread Starter
Frenzied Member
Re: [2005] should i dispose connection in web services ?
dispose the object if you don't need it any more (when you close the app)
then my idea is right. i should dispose the connection in the end of webservice call. because i will never use it again.
thank you for your help and i am still willing to hear other opinions.
rgds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|