Simple WebService question

Discussion in 'ASP .Net Web Services' started by Ali, Dec 2, 2003.

  1. Ali

    Ali Guest

    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.
     
    Ali, Dec 2, 2003
    #1
    1. Advertising

  2. 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

    (Ali) wrote in message news:<>...
    > 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.
     
    Alfred B. Thordarson, Dec 2, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave E
    Replies:
    7
    Views:
    749
    Josh Twist
    Jan 11, 2006
  2. batista
    Replies:
    1
    Views:
    928
    Laurent Bugnion
    Jan 26, 2006
  3. batista
    Replies:
    0
    Views:
    570
    batista
    Jan 26, 2006
  4. Mr. x
    Replies:
    2
    Views:
    722
    Andrew
    Oct 10, 2003
  5. Dave E
    Replies:
    7
    Views:
    212
    Josh Twist
    Jan 11, 2006
Loading...

Share This Page