Destroy Web Services instances from the client.

I

ism_robin

Hi, i have a very big problem. In my organization we use a web service
to control information about the company, we have many clients that
access this web services, the problem is that the provider limited the
number of instances to 5 for us. My client is implemented in java ,
could any one tell me how can i destroy the instances that i create
with a client. thank you.
 
S

Scott M.

When you consume a web service, you are (in VS.NET anyway), making an
instance of a proxy class that, in turn, contacts the remote server and
invokes the method call of a remote class by instantiating it. As with all
managed instances, the object is sent for garbage collection as soon as the
function ends. You could set the object variable to null (C#) or Nothing
(VB.NET) in your method before the end of the function to make this happen a
bit sooner. Remember though...just because an object variable falls off the
stack, doesn't mean the garbage collection has immediately cleaned it from
the heap.

I'm guessing that the service provider isn't counting instances on the heap
waiting to be collection by GC though (that could easily go over 5 and stay
there for some time). I'm guessing that it is limiting you to 5 active
instances.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top