You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Todd Allen <tb...@copart.com> on 2007/10/09 07:41:51 UTC

Re: [axis2] About multiple thread

What is the default scope in Axis2?


At 01:35 AM 10/9/2007, Deepal jayasinghe wrote:
>Hi ,
>
>If you deploy the service in application scope then there will be only
>one service instance , however if you deploy the service in other scope
>there will be a number of service instances. For example if you deploy
>the service in request scope then there will be service instance for
>each and every request.
>
>Thanks
>Deepal
> > Hi,everyone,
> >     I have got a question about the web service class,for example,I
> > got the following class that provides the web service of getting the
> > price of the potato and tomato:
> >
> > import statements;
> > public class Service {
> >       /**
> >       * The soap response that will return to the client.
> >       */
> >       private OMElement response = null;
> >
> >       public OMElement getPotatoPrice(OMElement soap){
> >               some operations;
> >               return response;
> >       }
> >       public OMElement getTomatoPrice(OMElement soap){
> >               some operations;
> >               return response;
> >       }
> > }
> >
> > Here,I did some operations,etc,database query,and then return the
> > constructed response object.If there are multiple client call the web
> > service at the same time,is it safe to declare the response object as
> > the Service class's member variable?Does the axis2 just create one
> > Service instance and maintain it in the whole service life cycle?
> >
> > any advice will be appreciated!
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] About multiple thread

Posted by Deepal Jayasinghe <de...@opensource.lk>.

Todd Allen wrote:
> What is the default scope in Axis2?
Request .


>
>
> At 01:35 AM 10/9/2007, Deepal jayasinghe wrote:
>> Hi ,
>>
>> If you deploy the service in application scope then there will be only
>> one service instance , however if you deploy the service in other scope
>> there will be a number of service instances. For example if you deploy
>> the service in request scope then there will be service instance for
>> each and every request.
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] About multiple thread

Posted by zhongliang zhang <zh...@gmail.com>.
The default scope is request scope,so,if I did not specify it in my
services.xml,then there will be service instance for each and every
request.
thanks a lot.

On 09/10/2007, Todd Allen <tb...@copart.com> wrote:
> What is the default scope in Axis2?
>
>
> At 01:35 AM 10/9/2007, Deepal jayasinghe wrote:
> >Hi ,
> >
> >If you deploy the service in application scope then there will be only
> >one service instance , however if you deploy the service in other scope
> >there will be a number of service instances. For example if you deploy
> >the service in request scope then there will be service instance for
> >each and every request.
> >
> >Thanks
> >Deepal
> > > Hi,everyone,
> > >     I have got a question about the web service class,for example,I
> > > got the following class that provides the web service of getting the
> > > price of the potato and tomato:
> > >
> > > import statements;
> > > public class Service {
> > >       /**
> > >       * The soap response that will return to the client.
> > >       */
> > >       private OMElement response = null;
> > >
> > >       public OMElement getPotatoPrice(OMElement soap){
> > >               some operations;
> > >               return response;
> > >       }
> > >       public OMElement getTomatoPrice(OMElement soap){
> > >               some operations;
> > >               return response;
> > >       }
> > > }
> > >
> > > Here,I did some operations,etc,database query,and then return the
> > > constructed response object.If there are multiple client call the web
> > > service at the same time,is it safe to declare the response object as
> > > the Service class's member variable?Does the axis2 just create one
> > > Service instance and maintain it in the whole service life cycle?
> > >
> > > any advice will be appreciated!
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org