Simple WebService question

A

Ali

I'm wondering what happend when two separate clients create two
instances of the same remote web service.

I know that each client is essentially creating local stub
object/wrapper that will make the invocations on the web service on
the server side. But conceptually what happens to the instance
variables of the web service. Will there be two separate instances of
it.

Asumme I have class :
class Simple extends webservice..... {
public Integer x;
public Simple(int start) { x=start };
public Integer get() { return x; }
}

Will two clients creating two instances of the Simple class have two
seperate instances of Simple.x or are they shared?

kind regards.
 
A

Alfred B. Thordarson

There will be two instances of the Simple class created. This means
that the x member is different for the two instances. However, if I
understand the WebService container in IIS correctly then you can
share members by making them static. In addition I think, in your
Simple class example, there must be a default constructor for it to
work.

-Alfred
 

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

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top